azureauth 0.12.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/install.cjs +9 -9
- package/package.json +3 -5
package/dist/install.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";var us=Object.create;var vt=Object.defineProperty;var ls=Object.getOwnPropertyDescriptor;var cs=Object.getOwnPropertyNames;var xs=Object.getPrototypeOf,ds=Object.prototype.hasOwnProperty;var m=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),hs=(e,t)=>{for(var r in t)vt(e,r,{get:t[r],enumerable:!0})},gi=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of cs(t))!ds.call(e,n)&&n!==r&&vt(e,n,{get:()=>t[n],enumerable:!(i=ls(t,n))||i.enumerable});return e};var gt=(e,t,r)=>(r=e!=null?us(xs(e)):{},gi(t||!e||!e.__esModule?vt(r,"default",{value:e,enumerable:!0}):r,e)),ps=e=>gi(vt({},"__esModule",{value:!0}),e);var Fi=m(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.DownloaderHelper=Ce.DH_STATES=void 0;var xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ms=function(){function e(t,r){for(var i,n=0;n<r.length;n++)i=r[n],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),_s=require("fs"),Y=wt(_s),Be=require("url"),ys=require("path"),Ee=wt(ys),vs=require("http"),wi=wt(vs),gs=require("https"),bi=wt(gs),ws=require("events");function wt(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function bs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ei(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Es(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Si=Ce.DH_STATES={IDLE:"IDLE",SKIPPED:"SKIPPED",STARTED:"STARTED",DOWNLOADING:"DOWNLOADING",RETRY:"RETRY",PAUSED:"PAUSED",RESUMED:"RESUMED",STOPPED:"STOPPED",FINISHED:"FINISHED",FAILED:"FAILED"},Ju=Ce.DownloaderHelper=function(e){function t(r,i){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{};bs(this,t);var a=Ei(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{captureRejections:!0}));return a.__validate(r,i)?(a.url=a.requestURL=r.trim(),a.state=Si.IDLE,a.__defaultOpts={body:null,retry:!1,method:"GET",headers:{},fileName:"",timeout:-1,metadata:null,override:!1,forceResume:!1,removeOnStop:!0,removeOnFail:!0,progressThrottle:1e3,httpRequestOptions:{},httpsRequestOptions:{},resumeOnIncomplete:!0,resumeIfFileExists:!1,resumeOnIncompleteMaxRetry:5},a.__opts=Object.assign({},a.__defaultOpts),a.__pipes=[],a.__total=0,a.__downloaded=0,a.__progress=0,a.__retryCount=0,a.__retryTimeout=null,a.__resumeRetryCount=0,a.__states=Si,a.__promise=null,a.__request=null,a.__response=null,a.__isAborted=!1,a.__isResumed=!1,a.__isResumable=!1,a.__isRedirected=!1,a.__destFolder=i,a.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},a.__fileName="",a.__filePath="",a.updateOptions(n),a):Ei(a)}return Es(t,e),ms(t,[{key:"start",value:function(){var i=this,n=function(){return new Promise(function(a,o){i.__promise={resolve:a,reject:o},i.__start()})};return this.__opts.resumeIfFileExists&&this.state!==this.__states.RESUMED?this.getTotalSize().then(function(a){var o=a.name,s=a.total,u=i.__opts.override;if(i.__opts.override=!0,i.__filePath=i.__getFilePath(o),i.__opts.override=u,i.__filePath&&Y.existsSync(i.__filePath)){var x=i.__getFilesizeInBytes(i.__filePath);return x===s?n():i.resumeFromFile(i.__filePath,{total:s,fileName:o})}return n()}):n()}},{key:"pause",value:function(){var i=this;return this.state===this.__states.STOPPED?Promise.resolve(!0):(this.__response&&(this.__response.unpipe(),this.__pipes.forEach(function(n){return n.stream.unpipe()})),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then(function(){return i.__setState(i.__states.PAUSED),i.emit("pause"),!0}))}},{key:"resume",value:function(){return this.__promise?this.state===this.__states.STOPPED?Promise.resolve(!1):(this.__setState(this.__states.RESUMED),this.__isResumable&&(this.__isResumed=!0,this.__reqOptions.headers.range="bytes="+this.__downloaded+"-"),this.emit("resume",this.__isResumed),this.__start()):this.start()}},{key:"stop",value:function(){var i=this;if(this.state===this.__states.STOPPED)return Promise.resolve(!0);var n=function(){return new Promise(function(a,o){Y.access(i.__filePath,function(s){return s?(i.__emitStop(),a(!0)):void Y.unlink(i.__filePath,function(u){return u?(i.__setState(i.__states.FAILED),i.emit("error",u),o(u)):(i.__emitStop(),void a(!0))})})})};return this.__requestAbort(),this.__closeFileStream().then(function(){return i.__opts.removeOnStop?n():(i.__emitStop(),Promise.resolve(!0))})}},{key:"pipe",value:function(i){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;return this.__pipes.push({stream:i,options:n}),i}},{key:"unpipe",value:function(){var i=this,n=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,a=function(s){return i.__response?i.__response.unpipe(s):s.unpipe()};if(n){var o=this.__pipes.find(function(s){return s.stream===n});return void(o&&(a(n),this.__pipes=this.__pipes.filter(function(s){return s.stream!==n})))}this.__pipes.forEach(function(s){return a(s.stream)}),this.__pipes=[]}},{key:"getDownloadPath",value:function(){return this.__filePath}},{key:"isResumable",value:function(){return this.__isResumable}},{key:"updateOptions",value:function(i){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"";this.__opts=Object.assign({},this.__opts,i),this.__headers=this.__opts.headers,-1<this.__opts.timeout&&(this.__opts.httpRequestOptions.timeout=this.__opts.timeout,this.__opts.httpsRequestOptions.timeout=this.__opts.timeout),(typeof this.__opts.progressThrottle!="number"||0>this.__opts.progressThrottle)&&(this.__opts.progressThrottle=this.__defaultOpts.progressThrottle),this.url=n||this.url,this.__reqOptions=this.__getReqOptions(this.__opts.method,this.url,this.__opts.headers),this.__initProtocol(this.url)}},{key:"getOptions",value:function(){return this.__opts}},{key:"getMetadata",value:function(){return this.__opts.metadata}},{key:"getStats",value:function(){return{total:this.__total,name:this.__fileName,downloaded:this.__downloaded,progress:this.__progress,speed:this.__statsEstimate.bytes}}},{key:"getTotalSize",value:function(){var i=this;return new Promise(function(n,a){var o=function(u){i.__initProtocol(u);var x=Object.assign({},i.__headers);x.hasOwnProperty("range")&&delete x.range;var l=i.__getReqOptions("HEAD",u,x);return Object.assign({},i.__reqOptions,l)},s=function(u,x){var l=i.__protocol.request(x,function(c){if(i.__isRequireRedirect(c)){var f=/^https?:\/\//.test(c.headers.location)?c.headers.location:new Be.URL(c.headers.location,u).href;return i.emit("redirected",f,u),s(f,o(f))}return c.statusCode===200?void n({name:i.__getFileNameFromHeaders(c.headers,c),total:parseInt(c.headers["content-length"])||null}):a(new Error("Response status was "+c.statusCode))});l.on("error",function(c){return a(c)}),l.on("timeout",function(){return a(new Error("timeout"))}),l.on("uncaughtException",function(c){return a(c)}),l.end()};s(i.url,o(i.url))})}},{key:"getResumeState",value:function(){return{downloaded:this.__downloaded,filePath:this.__filePath,fileName:this.__fileName,total:this.__total}}},{key:"resumeFromFile",value:function(i){var n=this,a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};return this.__opts.override=!0,this.__filePath=i,(a.total&&a.fileName?Promise.resolve({name:a.fileName,total:a.total}):this.getTotalSize()).then(function(o){var s=o.name,u=o.total;return n.__total=a.total||u,n.__fileName=a.fileName||s,n.__downloaded=a.downloaded||n.__getFilesizeInBytes(n.__filePath),n.__reqOptions.headers.range="bytes="+n.__downloaded+"-",n.__isResumed=!0,n.__isResumable=!0,n.__setState(n.__states.RESUMED),n.emit("resume",n.__isResumed),new Promise(function(x,l){n.__promise={resolve:x,reject:l},n.__start()})})}},{key:"__start",value:function(){this.__isRedirected||this.state===this.__states.RESUMED||(this.emit("start"),this.__setState(this.__states.STARTED),this.__initProtocol(this.url)),this.__response=null,this.__isAborted=!1,this.__request&&!this.__request.destroyed&&this.__request.destroy(),this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__request=this.__downloadRequest(this.__promise.resolve,this.__promise.reject),this.__request.on("error",this.__onError(this.__promise.resolve,this.__promise.reject)),this.__request.on("timeout",this.__onTimeout(this.__promise.resolve,this.__promise.reject)),this.__request.on("uncaughtException",this.__onError(this.__promise.resolve,this.__promise.reject,!0)),this.__opts.body&&this.__request.write(this.__opts.body),this.__request.end()}},{key:"__resolvePending",value:function(){if(this.__promise){var i=this.__promise.resolve;return this.__promise=null,i(!0)}}},{key:"__downloadRequest",value:function(i,n){var a=this;return this.__protocol.request(this.__reqOptions,function(o){if(a.__response=o,a.__isResumed||(a.__total=parseInt(o.headers["content-length"])||null,a.__resetStats()),a.__isRequireRedirect(o)){var s=/^https?:\/\//.test(o.headers.location)?o.headers.location:new Be.URL(o.headers.location,a.url).href;return a.__isRedirected=!0,a.__initProtocol(s),a.emit("redirected",s,a.url),a.__start()}if(o.statusCode!==200&&o.statusCode!==206){var u=new Error("Response status was "+o.statusCode);return u.status=o.statusCode||0,u.body=o.body||"",a.__setState(a.__states.FAILED),a.emit("error",u),n(u)}(a.__opts.forceResume||o.headers.hasOwnProperty("accept-ranges")&&o.headers["accept-ranges"]!=="none")&&(a.__isResumable=!0),a.__startDownload(o,i,n)})}},{key:"__startDownload",value:function(i,n,a){var o=this,s=i;if(this.__isResumed)this.__fileStream=Y.createWriteStream(this.__filePath,{flags:"a"});else{var u=this.__getFileNameFromHeaders(i.headers);if(this.__filePath=this.__getFilePath(u),this.__fileName=this.__filePath.split(Ee.sep).pop(),Y.existsSync(this.__filePath)){var x=this.__getFilesizeInBytes(this.__filePath),l=this.__total?this.__total:0;if(xr(this.__opts.override)==="object"&&this.__opts.override.skip&&(this.__opts.override.skipSmaller||x>=l))return this.emit("skip",{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:x}),this.__setState(this.__states.SKIPPED),n(!0)}this.__fileStream=Y.createWriteStream(this.__filePath,{})}this.emit("download",{fileName:this.__fileName,filePath:this.__filePath,totalSize:this.__total,isResumed:this.__isResumed,downloadedSize:this.__downloaded}),this.__retryCount=0,this.__isResumed=!1,this.__isRedirected=!1,this.__setState(this.__states.DOWNLOADING),this.__statsEstimate.time=new Date,this.__statsEstimate.throttleTime=new Date,s.on("data",function(c){return o.__calculateStats(c.length)}),this.__pipes.forEach(function(c){s.pipe(c.stream,c.options),s=c.stream}),s.pipe(this.__fileStream),s.on("error",this.__onError(n,a)),this.__fileStream.on("finish",this.__onFinished(n,a)),this.__fileStream.on("error",this.__onError(n,a))}},{key:"__hasFinished",value:function(){return!this.__isAborted&&[this.__states.PAUSED,this.__states.STOPPED,this.__states.RETRY,this.__states.FAILED,this.__states.RESUMED].indexOf(this.state)===-1}},{key:"__isRequireRedirect",value:function(i){return 300<i.statusCode&&400>i.statusCode&&i.headers.hasOwnProperty("location")&&i.headers.location}},{key:"__onFinished",value:function(i,n){var a=this;return function(){a.__fileStream.close(function(o){if(o)return n(o);if(a.__hasFinished()){var s=!!a.__total&&a.__downloaded!==a.__total;if(s&&a.__isResumable&&a.__opts.resumeOnIncomplete&&a.__resumeRetryCount<=a.__opts.resumeOnIncompleteMaxRetry)return a.__resumeRetryCount++,a.emit("warning",new Error("uncomplete download, retrying")),a.resume();a.__setState(a.__states.FINISHED),a.__pipes=[],a.emit("end",{fileName:a.__fileName,filePath:a.__filePath,totalSize:a.__total,incomplete:s,onDiskSize:a.__getFilesizeInBytes(a.__filePath),downloadedSize:a.__downloaded})}return i(a.__downloaded===a.__total)})}}},{key:"__closeFileStream",value:function(){var i=this;return this.__fileStream?new Promise(function(n,a){i.__fileStream.close(function(o){return o?a(o):n(!0)})}):Promise.resolve(!0)}},{key:"__onError",value:function(i,n){var a=this,o=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return function(s){return a.__pipes=[],o&&a.__requestAbort(),a.state===a.__states.STOPPED||a.state===a.__states.FAILED?void 0:a.__opts.retry?a.__retry(s).catch(function(u){a.__removeFile().finally(function(){a.__setState(a.__states.FAILED),a.emit("error",u||s),n(u||s)})}):a.__removeFile().finally(function(){a.__setState(a.__states.FAILED),a.emit("error",s),n(s)})}}},{key:"__retry",value:function(){var i=this,n=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;if(!this.__opts.retry||xr(this.__opts.retry)!=="object")return Promise.reject(n||new Error("wrong retry options"));var a=this.__opts.retry,o=a.delay,s=o===void 0?0:o,u=a.maxRetries,x=u===void 0?999:u;return this.__retryCount>=x?Promise.reject(n||new Error("reached the maximum retries")):(this.__retryCount++,this.__setState(this.__states.RETRY),this.emit("retry",this.__retryCount,this.__opts.retry,n),this.__response&&(this.__response.unpipe(),this.__pipes.forEach(function(l){return l.stream.unpipe()})),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then(function(){return new Promise(function(l){return i.__retryTimeout=setTimeout(function(){return l(0<i.__downloaded?i.resume():i.__start())},s)})}))}},{key:"__onTimeout",value:function(i,n){var a=this;return function(){return a.__requestAbort(),a.__opts.retry?a.__retry(new Error("timeout")).catch(function(o){a.__removeFile().finally(function(){a.__setState(a.__states.FAILED),o?n(o):(a.emit("timeout"),n(new Error("timeout")))})}):a.__removeFile().finally(function(){a.__setState(a.__states.FAILED),a.emit("timeout"),n(new Error("timeout"))})}}},{key:"__resetStats",value:function(){this.__retryCount=0,this.__downloaded=0,this.__progress=0,this.__resumeRetryCount=0,this.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0}}},{key:"__getFileNameFromHeaders",value:function(i,n){var a="",o=/.*filename\*=.*?'.*?'([^"].+?[^"])(?:(?:;)|$)/i,s=/.*filename="(.*?)";?/i,u=/.*filename=([^"].+?[^"])(?:(?:;)|$)/i,x=i.hasOwnProperty("content-disposition"),l=x?i["content-disposition"].match(o):null,c=!x||l?null:i["content-disposition"].match(s),f=!x||l||c?null:i["content-disposition"].match(u);return x&&(l||c||f)?(a=i["content-disposition"],a=a.trim(),l?a=l[1]:c?a=c[1]:f&&(a=f[1]),a=a.replace(/[/\\]/g,"")):0<Ee.basename(new Be.URL(this.requestURL).pathname).length?a=Ee.basename(new Be.URL(this.requestURL).pathname):a=new Be.URL(this.requestURL).hostname+".html",this.__opts.fileName?this.__getFileNameFromOpts(a,n):a.replace(/\.*$/,"")}},{key:"__getFilePath",value:function(i){var n=Ee.join(this.__destFolder,i),a=n;return this.__opts.override||this.state===this.__states.RESUMED||(a=this.__uniqFileNameSync(a),n!==a&&this.emit("renamed",{path:a,fileName:a.split(Ee.sep).pop(),prevPath:n,prevFileName:n.split(Ee.sep).pop()})),a}},{key:"__getFileNameFromOpts",value:function(i,n){if(!this.__opts.fileName)return i;if(typeof this.__opts.fileName=="string")return this.__opts.fileName;if(typeof this.__opts.fileName=="function"){var a=Ee.join(this.__destFolder,i);return n&&n.headers||this.__response&&this.__response.headers?this.__opts.fileName(i,a,(n||this.__response).headers["content-type"]):this.__opts.fileName(i,a)}if(xr(this.__opts.fileName)==="object"){var o=this.__opts.fileName,s=o.name,u=!!o.hasOwnProperty("ext")&&o.ext;if(typeof u=="string")return s+"."+u;if(typeof u=="boolean"){if(u)return s;var x=i.includes(".")?i.split(".").pop():"";return x===""?s:s+"."+x}}return i}},{key:"__calculateStats",value:function(i){var n=new Date,a=n-this.__statsEstimate.time,o=n-this.__statsEstimate.throttleTime,s=this.__total||0;i&&(this.__downloaded+=i,this.__progress=s===0?0:100*(this.__downloaded/s),(this.__downloaded===s||1e3<a)&&(this.__statsEstimate.time=n,this.__statsEstimate.bytes=this.__downloaded-this.__statsEstimate.prevBytes,this.__statsEstimate.prevBytes=this.__downloaded),(this.__downloaded===s||o>this.__opts.progressThrottle)&&(this.__statsEstimate.throttleTime=n,this.emit("progress.throttled",this.getStats())),this.emit("progress",this.getStats()))}},{key:"__setState",value:function(i){this.state=i,this.emit("stateChanged",this.state)}},{key:"__getReqOptions",value:function(i,n){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{},o=new Be.URL(n),s={protocol:o.protocol,host:o.hostname,port:o.port,path:o.pathname+o.search,method:i};return a&&(s.headers=a),s}},{key:"__getFilesizeInBytes",value:function(i){try{var n=Y.statSync(i,{throwIfNoEntry:!1}),a=n.size||0;return a}catch(o){this.emit("warning",o)}return 0}},{key:"__validate",value:function(i,n){if(typeof i!="string")throw new Error("URL should be an string");if(i.trim()==="")throw new Error("URL couldn't be empty");if(typeof n!="string")throw new Error("Destination Folder should be an string");if(n.trim()==="")throw new Error("Destination Folder couldn't be empty");if(!Y.existsSync(n))throw new Error("Destination Folder must exist");var a=Y.statSync(n);if(!a.isDirectory())throw new Error("Destination Folder must be a directory");try{Y.accessSync(n,Y.constants.W_OK)}catch{throw new Error("Destination Folder must be writable")}return!0}},{key:"__initProtocol",value:function(i){var n=this.__getReqOptions(this.__opts.method,i,this.__headers);this.requestURL=i,-1<i.indexOf("https://")?(this.__protocol=bi,n.agent=new bi.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},n,this.__opts.httpsRequestOptions)):(this.__protocol=wi,n.agent=new wi.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},n,this.__opts.httpRequestOptions))}},{key:"__uniqFileNameSync",value:function(i){if(typeof i!="string"||i==="")return i;try{Y.accessSync(i,Y.F_OK);var n=i.match(/(.*)(\([0-9]+\))(\..*)$/),a=n?n[1].trim():i,o=n?parseInt(n[2].replace(/\(|\)/,"")):0,s=i.split(".").pop();return s!==i&&0<s.length?(s="."+s,a=a.replace(s,"")):s="",this.__uniqFileNameSync(a+" ("+ ++o+")"+s)}catch{return i}}},{key:"__removeFile",value:function(){var i=this;return new Promise(function(n){return i.__fileStream?void i.__fileStream.close(function(a){return a&&i.emit("warning",a),i.__opts.removeOnFail?Y.access(i.__filePath,function(o){return o?n():void Y.unlink(i.__filePath,function(s){s&&i.emit("warning",a),n()})}):void n()}):n()})}},{key:"__requestAbort",value:function(){this.__isAborted=!0,this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__response&&this.__response.destroy(),this.__request&&(this.__request.destroy?this.__request.destroy():this.__request.abort())}},{key:"__emitStop",value:function(){this.__resolvePending(),this.__setState(this.__states.STOPPED),this.emit("stop")}}]),t}(ws.EventEmitter)});var Oi=m((tl,Ri)=>{var he=require("constants"),Ss=process.cwd,bt=null,Fs=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return bt||(bt=Ss.call(process)),bt};try{process.cwd()}catch{}typeof process.chdir=="function"&&(dr=process.chdir,process.chdir=function(e){bt=null,dr.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,dr));var dr;Ri.exports=Rs;function Rs(e){he.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=a(e.chown),e.fchown=a(e.fchown),e.lchown=a(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=o(e.chownSync),e.fchownSync=o(e.fchownSync),e.lchownSync=o(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=s(e.stat),e.fstat=s(e.fstat),e.lstat=s(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(l,c,f){f&&process.nextTick(f)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(l,c,f,h){h&&process.nextTick(h)},e.lchownSync=function(){}),Fs==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(l){function c(f,h,p){var _=Date.now(),d=0;l(f,h,function v(g){if(g&&(g.code==="EACCES"||g.code==="EPERM"||g.code==="EBUSY")&&Date.now()-_<6e4){setTimeout(function(){e.stat(h,function(E,z){E&&E.code==="ENOENT"?l(f,h,v):p(g)})},d),d<100&&(d+=10);return}p&&p(g)})}return Object.setPrototypeOf&&Object.setPrototypeOf(c,l),c}(e.rename)),e.read=typeof e.read!="function"?e.read:function(l){function c(f,h,p,_,d,v){var g;if(v&&typeof v=="function"){var E=0;g=function(z,O,X){if(z&&z.code==="EAGAIN"&&E<10)return E++,l.call(e,f,h,p,_,d,g);v.apply(this,arguments)}}return l.call(e,f,h,p,_,d,g)}return Object.setPrototypeOf&&Object.setPrototypeOf(c,l),c}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(l){return function(c,f,h,p,_){for(var d=0;;)try{return l.call(e,c,f,h,p,_)}catch(v){if(v.code==="EAGAIN"&&d<10){d++;continue}throw v}}}(e.readSync);function t(l){l.lchmod=function(c,f,h){l.open(c,he.O_WRONLY|he.O_SYMLINK,f,function(p,_){if(p){h&&h(p);return}l.fchmod(_,f,function(d){l.close(_,function(v){h&&h(d||v)})})})},l.lchmodSync=function(c,f){var h=l.openSync(c,he.O_WRONLY|he.O_SYMLINK,f),p=!0,_;try{_=l.fchmodSync(h,f),p=!1}finally{if(p)try{l.closeSync(h)}catch{}else l.closeSync(h)}return _}}function r(l){he.hasOwnProperty("O_SYMLINK")&&l.futimes?(l.lutimes=function(c,f,h,p){l.open(c,he.O_SYMLINK,function(_,d){if(_){p&&p(_);return}l.futimes(d,f,h,function(v){l.close(d,function(g){p&&p(v||g)})})})},l.lutimesSync=function(c,f,h){var p=l.openSync(c,he.O_SYMLINK),_,d=!0;try{_=l.futimesSync(p,f,h),d=!1}finally{if(d)try{l.closeSync(p)}catch{}else l.closeSync(p)}return _}):l.futimes&&(l.lutimes=function(c,f,h,p){p&&process.nextTick(p)},l.lutimesSync=function(){})}function i(l){return l&&function(c,f,h){return l.call(e,c,f,function(p){x(p)&&(p=null),h&&h.apply(this,arguments)})}}function n(l){return l&&function(c,f){try{return l.call(e,c,f)}catch(h){if(!x(h))throw h}}}function a(l){return l&&function(c,f,h,p){return l.call(e,c,f,h,function(_){x(_)&&(_=null),p&&p.apply(this,arguments)})}}function o(l){return l&&function(c,f,h){try{return l.call(e,c,f,h)}catch(p){if(!x(p))throw p}}}function s(l){return l&&function(c,f,h){typeof f=="function"&&(h=f,f=null);function p(_,d){d&&(d.uid<0&&(d.uid+=4294967296),d.gid<0&&(d.gid+=4294967296)),h&&h.apply(this,arguments)}return f?l.call(e,c,f,p):l.call(e,c,p)}}function u(l){return l&&function(c,f){var h=f?l.call(e,c,f):l.call(e,c);return h&&(h.uid<0&&(h.uid+=4294967296),h.gid<0&&(h.gid+=4294967296)),h}}function x(l){if(!l||l.code==="ENOSYS")return!0;var c=!process.getuid||process.getuid()!==0;return!!(c&&(l.code==="EINVAL"||l.code==="EPERM"))}}});var Bi=m((rl,Ti)=>{var Ai=require("stream").Stream;Ti.exports=Os;function Os(e){return{ReadStream:t,WriteStream:r};function t(i,n){if(!(this instanceof t))return new t(i,n);Ai.call(this);var a=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,n=n||{};for(var o=Object.keys(n),s=0,u=o.length;s<u;s++){var x=o[s];this[x]=n[x]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(l,c){if(l){a.emit("error",l),a.readable=!1;return}a.fd=c,a.emit("open",c),a._read()})}function r(i,n){if(!(this instanceof r))return new r(i,n);Ai.call(this),this.path=i,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var a=Object.keys(n),o=0,s=a.length;o<s;o++){var u=a[o];this[u]=n[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Di=m((il,Ci)=>{"use strict";Ci.exports=Ts;var As=Object.getPrototypeOf||function(e){return e.__proto__};function Ts(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:As(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var Ii=m((nl,mr)=>{var N=require("fs"),Bs=Oi(),Cs=Bi(),Ds=Di(),Et=require("util"),W,Ft;typeof Symbol=="function"&&typeof Symbol.for=="function"?(W=Symbol.for("graceful-fs.queue"),Ft=Symbol.for("graceful-fs.previous")):(W="___graceful-fs.queue",Ft="___graceful-fs.previous");function Ps(){}function ki(e,t){Object.defineProperty(e,W,{get:function(){return t}})}var Se=Ps;Et.debuglog?Se=Et.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Se=function(){var e=Et.format.apply(Et,arguments);e="GFS4: "+e.split(/\n/).join(`
|
|
2
|
-
GFS4: `),console.error(e)});N[W]||(Pi=global[W]||[],ki(N,Pi),N.close=function(e){function t(r,i){return e.call(N,r,function(n){n||qi(),typeof i=="function"&&i.apply(this,arguments)})}return Object.defineProperty(t,Ft,{value:e}),t}(N.close),N.closeSync=function(e){function t(r){e.apply(N,arguments),qi()}return Object.defineProperty(t,Ft,{value:e}),t}(N.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Se(N[W]),require("assert").equal(N[W].length,0)}));var Pi;global[W]||ki(global,N[W]);mr.exports=hr(Ds(N));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!N.__patched&&(mr.exports=hr(N),N.__patched=!0);function hr(e){Bs(e),e.gracefulify=hr,e.createReadStream=O,e.createWriteStream=X;var t=e.readFile;e.readFile=r;function r(y,w,b){return typeof w=="function"&&(b=w,w=null),C(y,w,b);function C(D,B,S,F){return t(D,B,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?De([C,[D,B,S],R,F||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var i=e.writeFile;e.writeFile=n;function n(y,w,b,C){return typeof b=="function"&&(C=b,b=null),D(y,w,b,C);function D(B,S,F,R,M){return i(B,S,F,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?De([D,[B,S,F,R],T,M||Date.now(),Date.now()]):typeof R=="function"&&R.apply(this,arguments)})}}var a=e.appendFile;a&&(e.appendFile=o);function o(y,w,b,C){return typeof b=="function"&&(C=b,b=null),D(y,w,b,C);function D(B,S,F,R,M){return a(B,S,F,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?De([D,[B,S,F,R],T,M||Date.now(),Date.now()]):typeof R=="function"&&R.apply(this,arguments)})}}var s=e.copyFile;s&&(e.copyFile=u);function u(y,w,b,C){return typeof b=="function"&&(C=b,b=0),D(y,w,b,C);function D(B,S,F,R,M){return s(B,S,F,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?De([D,[B,S,F,R],T,M||Date.now(),Date.now()]):typeof R=="function"&&R.apply(this,arguments)})}}var x=e.readdir;e.readdir=c;var l=/^v[0-5]\./;function c(y,w,b){typeof w=="function"&&(b=w,w=null);var C=l.test(process.version)?function(S,F,R,M){return x(S,D(S,F,R,M))}:function(S,F,R,M){return x(S,F,D(S,F,R,M))};return C(y,w,b);function D(B,S,F,R){return function(M,T){M&&(M.code==="EMFILE"||M.code==="ENFILE")?De([C,[B,S,F],M,R||Date.now(),Date.now()]):(T&&T.sort&&T.sort(),typeof F=="function"&&F.call(this,M,T))}}}if(process.version.substr(0,4)==="v0.8"){var f=Cs(e);v=f.ReadStream,E=f.WriteStream}var h=e.ReadStream;h&&(v.prototype=Object.create(h.prototype),v.prototype.open=g);var p=e.WriteStream;p&&(E.prototype=Object.create(p.prototype),E.prototype.open=z),Object.defineProperty(e,"ReadStream",{get:function(){return v},set:function(y){v=y},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return E},set:function(y){E=y},enumerable:!0,configurable:!0});var _=v;Object.defineProperty(e,"FileReadStream",{get:function(){return _},set:function(y){_=y},enumerable:!0,configurable:!0});var d=E;Object.defineProperty(e,"FileWriteStream",{get:function(){return d},set:function(y){d=y},enumerable:!0,configurable:!0});function v(y,w){return this instanceof v?(h.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}function g(){var y=this;j(y.path,y.flags,y.mode,function(w,b){w?(y.autoClose&&y.destroy(),y.emit("error",w)):(y.fd=b,y.emit("open",b),y.read())})}function E(y,w){return this instanceof E?(p.apply(this,arguments),this):E.apply(Object.create(E.prototype),arguments)}function z(){var y=this;j(y.path,y.flags,y.mode,function(w,b){w?(y.destroy(),y.emit("error",w)):(y.fd=b,y.emit("open",b))})}function O(y,w){return new e.ReadStream(y,w)}function X(y,w){return new e.WriteStream(y,w)}var I=e.open;e.open=j;function j(y,w,b,C){return typeof b=="function"&&(C=b,b=null),D(y,w,b,C);function D(B,S,F,R,M){return I(B,S,F,function(T,P){T&&(T.code==="EMFILE"||T.code==="ENFILE")?De([D,[B,S,F,R],T,M||Date.now(),Date.now()]):typeof R=="function"&&R.apply(this,arguments)})}}return e}function De(e){Se("ENQUEUE",e[0].name,e[1]),N[W].push(e),pr()}var St;function qi(){for(var e=Date.now(),t=0;t<N[W].length;++t)N[W][t].length>2&&(N[W][t][3]=e,N[W][t][4]=e);pr()}function pr(){if(clearTimeout(St),St=void 0,N[W].length!==0){var e=N[W].shift(),t=e[0],r=e[1],i=e[2],n=e[3],a=e[4];if(n===void 0)Se("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-n>=6e4){Se("TIMEOUT",t.name,r);var o=r.pop();typeof o=="function"&&o.call(null,i)}else{var s=Date.now()-a,u=Math.max(a-n,1),x=Math.min(u*1.2,100);s>=x?(Se("RETRY",t.name,r),t.apply(null,r.concat([n]))):N[W].push(e)}St===void 0&&(St=setTimeout(pr,0))}}});var _r=m((al,zi)=>{"use strict";zi.exports=e=>{let t=new Uint8Array(e);if(!(t&&t.length>1))return null;let r=(i,n)=>{n=Object.assign({offset:0},n);for(let a=0;a<i.length;a++)if(i[a]!==t[a+n.offset])return!1;return!0};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])&&r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r([80,75,3,4])&&r([77,69,84,65,45,73,78,70,47,109,111,122,105,108,108,97,46,114,115,97],{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([0,0,0])&&(t[3]===24||t[3]===32)&&r([102,116,121,112],{offset:4})||r([51,103,112,53])||r([0,0,0,28,102,116,121,112,109,112,52,50])&&r([109,112,52,49,109,112,52,50,105,115,111,109],{offset:16})||r([0,0,0,28,102,116,121,112,105,115,111,109])||r([0,0,0,28,102,116,121,112,109,112,52,50,0,0,0,0]))return{ext:"mp4",mime:"video/mp4"};if(r([0,0,0,28,102,116,121,112,77,52,86]))return{ext:"m4v",mime:"video/x-m4v"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let i=t.subarray(4,4100),n=i.findIndex((a,o,s)=>s[o]===66&&s[o+1]===130);if(n>=0){let a=n+3,o=s=>Array.from(s).every((u,x)=>i[a+x]===u.charCodeAt(0));if(o("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(o("webm"))return{ext:"webm",mime:"video/webm"}}}return r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4})?{ext:"mov",mime:"video/quicktime"}:r([82,73,70,70])&&r([65,86,73],{offset:8})?{ext:"avi",mime:"video/x-msvideo"}:r([48,38,178,117,142,102,207,17,166,217])?{ext:"wmv",mime:"video/x-ms-wmv"}:r([0,0,1,186])?{ext:"mpg",mime:"video/mpeg"}:r([73,68,51])||r([255,251])?{ext:"mp3",mime:"audio/mpeg"}:r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32])?{ext:"m4a",mime:"audio/m4a"}:r([79,112,117,115,72,101,97,100],{offset:28})?{ext:"opus",mime:"audio/opus"}:r([79,103,103,83])?{ext:"ogg",mime:"audio/ogg"}:r([102,76,97,67])?{ext:"flac",mime:"audio/x-flac"}:r([82,73,70,70])&&r([87,65,86,69],{offset:8})?{ext:"wav",mime:"audio/x-wav"}:r([35,33,65,77,82,10])?{ext:"amr",mime:"audio/amr"}:r([37,80,68,70])?{ext:"pdf",mime:"application/pdf"}:r([77,90])?{ext:"exe",mime:"application/x-msdownload"}:(t[0]===67||t[0]===70)&&r([87,83],{offset:1})?{ext:"swf",mime:"application/x-shockwave-flash"}:r([123,92,114,116,102])?{ext:"rtf",mime:"application/rtf"}:r([0,97,115,109])?{ext:"wasm",mime:"application/wasm"}:r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff",mime:"font/woff"}:r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff2",mime:"font/woff2"}:r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8}))?{ext:"eot",mime:"application/octet-stream"}:r([0,1,0,0,0])?{ext:"ttf",mime:"font/ttf"}:r([79,84,84,79,0])?{ext:"otf",mime:"font/otf"}:r([0,0,1,0])?{ext:"ico",mime:"image/x-icon"}:r([70,76,86,1])?{ext:"flv",mime:"video/x-flv"}:r([37,33])?{ext:"ps",mime:"application/postscript"}:r([253,55,122,88,90,0])?{ext:"xz",mime:"application/x-xz"}:r([83,81,76,105])?{ext:"sqlite",mime:"application/x-sqlite3"}:r([78,69,83,26])?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:r([67,114,50,52])?{ext:"crx",mime:"application/x-google-chrome-extension"}:r([77,83,67,70])||r([73,83,99,40])?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121])?{ext:"deb",mime:"application/x-deb"}:r([33,60,97,114,99,104,62])?{ext:"ar",mime:"application/x-unix-archive"}:r([237,171,238,219])?{ext:"rpm",mime:"application/x-rpm"}:r([31,160])||r([31,157])?{ext:"Z",mime:"application/x-compress"}:r([76,90,73,80])?{ext:"lz",mime:"application/x-lzip"}:r([208,207,17,224,161,177,26,225])?{ext:"msi",mime:"application/x-msi"}:r([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196}))?{ext:"mts",mime:"video/mp2t"}:r([66,76,69,78,68,69,82])?{ext:"blend",mime:"application/x-blender"}:r([66,80,71,251])?{ext:"bpg",mime:"image/bpg"}:null}});var Rt=m((ol,Ni)=>{"use strict";var oe=Ni.exports=function(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"};oe.writable=function(e){return oe(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object"};oe.readable=function(e){return oe(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object"};oe.duplex=function(e){return oe.writable(e)&&oe.readable(e)};oe.transform=function(e){return oe.duplex(e)&&typeof e._transform=="function"&&typeof e._transformState=="object"}});var Ke=m((sl,yr)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?yr.exports={nextTick:qs}:yr.exports=process;function qs(e,t,r,i){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,a,o;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,r)});case 4:return process.nextTick(function(){e.call(null,t,r,i)});default:for(a=new Array(n-1),o=0;o<a.length;)a[o++]=arguments[o];return process.nextTick(function(){e.apply(null,a)})}}});var ji=m((fl,Li)=>{var ks={}.toString;Li.exports=Array.isArray||function(e){return ks.call(e)=="[object Array]"}});var vr=m((ul,Mi)=>{Mi.exports=require("stream")});var Xe=m((gr,Wi)=>{var Ot=require("buffer"),se=Ot.Buffer;function Ui(e,t){for(var r in e)t[r]=e[r]}se.from&&se.alloc&&se.allocUnsafe&&se.allocUnsafeSlow?Wi.exports=Ot:(Ui(Ot,gr),gr.Buffer=Pe);function Pe(e,t,r){return se(e,t,r)}Ui(se,Pe);Pe.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return se(e,t,r)};Pe.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=se(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};Pe.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return se(e)};Pe.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Ot.SlowBuffer(e)}});var qe=m(Z=>{function Is(e){return Array.isArray?Array.isArray(e):At(e)==="[object Array]"}Z.isArray=Is;function zs(e){return typeof e=="boolean"}Z.isBoolean=zs;function Ns(e){return e===null}Z.isNull=Ns;function Ls(e){return e==null}Z.isNullOrUndefined=Ls;function js(e){return typeof e=="number"}Z.isNumber=js;function Ms(e){return typeof e=="string"}Z.isString=Ms;function Us(e){return typeof e=="symbol"}Z.isSymbol=Us;function Ws(e){return e===void 0}Z.isUndefined=Ws;function Hs(e){return At(e)==="[object RegExp]"}Z.isRegExp=Hs;function $s(e){return typeof e=="object"&&e!==null}Z.isObject=$s;function Gs(e){return At(e)==="[object Date]"}Z.isDate=Gs;function Zs(e){return At(e)==="[object Error]"||e instanceof Error}Z.isError=Zs;function Ys(e){return typeof e=="function"}Z.isFunction=Ys;function Ks(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}Z.isPrimitive=Ks;Z.isBuffer=require("buffer").Buffer.isBuffer;function At(e){return Object.prototype.toString.call(e)}});var Hi=m((cl,wr)=>{typeof Object.create=="function"?wr.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:wr.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var ke=m((xl,Er)=>{try{if(br=require("util"),typeof br.inherits!="function")throw"";Er.exports=br.inherits}catch{Er.exports=Hi()}var br});var Gi=m((dl,Sr)=>{"use strict";function Xs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var $i=Xe().Buffer,Ve=require("util");function Vs(e,t,r){e.copy(t,r)}Sr.exports=function(){function e(){Xs(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},e.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},e.prototype.concat=function(r){if(this.length===0)return $i.alloc(0);for(var i=$i.allocUnsafe(r>>>0),n=this.head,a=0;n;)Vs(n.data,i,a),a+=n.data.length,n=n.next;return i},e}();Ve&&Ve.inspect&&Ve.inspect.custom&&(Sr.exports.prototype[Ve.inspect.custom]=function(){var e=Ve.inspect({length:this.length});return this.constructor.name+" "+e})});var Fr=m((hl,Zi)=>{"use strict";var Tt=Ke();function Qs(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Tt.nextTick(Bt,this,e)):Tt.nextTick(Bt,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,Tt.nextTick(Bt,r,a)):Tt.nextTick(Bt,r,a):t&&t(a)}),this)}function Js(){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 Bt(e,t){e.emit("error",t)}Zi.exports={destroy:Qs,undestroy:Js}});var Ki=m((pl,Yi)=>{Yi.exports=require("util").deprecate});var Or=m((ml,nn)=>{"use strict";var Fe=Ke();nn.exports=U;function Vi(e){var t=this;this.next=null,this.entry=null,this.finish=function(){_0(t,e)}}var e0=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Fe.nextTick,Ie;U.WritableState=Je;var Qi=Object.create(qe());Qi.inherits=ke();var t0={deprecate:Ki()},Ji=vr(),Dt=Xe().Buffer,r0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i0(e){return Dt.from(e)}function n0(e){return Dt.isBuffer(e)||e instanceof r0}var en=Fr();Qi.inherits(U,Ji);function a0(){}function Je(e,t){Ie=Ie||Re(),e=e||{};var r=t instanceof Ie;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=e.writableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),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(s){x0(t,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Vi(this)}Je.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Je.prototype,"buffer",{get:t0.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Ct;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ct=Function.prototype[Symbol.hasInstance],Object.defineProperty(U,Symbol.hasInstance,{value:function(e){return Ct.call(this,e)?!0:this!==U?!1:e&&e._writableState instanceof Je}})):Ct=function(e){return e instanceof this};function U(e){if(Ie=Ie||Re(),!Ct.call(U,this)&&!(this instanceof Ie))return new U(e);this._writableState=new Je(e,this),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)),Ji.call(this)}U.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function o0(e,t){var r=new Error("write after end");e.emit("error",r),Fe.nextTick(t,r)}function s0(e,t,r,i){var n=!0,a=!1;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),Fe.nextTick(i,a),n=!1),n}U.prototype.write=function(e,t,r){var i=this._writableState,n=!1,a=!i.objectMode&&n0(e);return a&&!Dt.isBuffer(e)&&(e=i0(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=a0),i.ended?o0(this,r):(a||s0(this,i,e,r))&&(i.pendingcb++,n=u0(this,i,a,e,t,r)),n};U.prototype.cork=function(){var e=this._writableState;e.corked++};U.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&tn(this,e))};U.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function f0(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Dt.from(t,r)),t}Object.defineProperty(U.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function u0(e,t,r,i,n,a){if(!r){var o=f0(t,i,n);i!==o&&(r=!0,n="buffer",i=o)}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var x=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},x?x.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Rr(e,t,!1,s,i,n,a);return u}function Rr(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function l0(e,t,r,i,n){--t.pendingcb,r?(Fe.nextTick(n,i),Fe.nextTick(Qe,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),Qe(e,t))}function c0(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function x0(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(c0(r),t)l0(e,r,i,t,n);else{var a=rn(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&tn(e,r),i?e0(Xi,e,r,a,n):Xi(e,r,a,n)}}function Xi(e,t,r,i){r||d0(e,t),t.pendingcb--,i(),Qe(e,t)}function d0(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function tn(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var o=0,s=!0;r;)n[o]=r,r.isBuf||(s=!1),r=r.next,o+=1;n.allBuffers=s,Rr(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new Vi(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,x=r.encoding,l=r.callback,c=t.objectMode?1:u.length;if(Rr(e,t,!1,c,u,x,l),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}U.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};U.prototype._writev=null;U.prototype.end=function(e,t,r){var i=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||m0(this,i,r)};function rn(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function h0(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),Qe(e,t)})}function p0(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,Fe.nextTick(h0,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function Qe(e,t){var r=rn(t);return r&&(p0(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function m0(e,t,r){t.ending=!0,Qe(e,t),r&&(t.finished?Fe.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function _0(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(U.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});U.prototype.destroy=en.destroy;U.prototype._undestroy=en.undestroy;U.prototype._destroy=function(e,t){this.end(),t(e)}});var Re=m((_l,fn)=>{"use strict";var an=Ke(),y0=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};fn.exports=fe;var on=Object.create(qe());on.inherits=ke();var sn=Br(),Tr=Or();on.inherits(fe,sn);for(Ar=y0(Tr.prototype),Pt=0;Pt<Ar.length;Pt++)qt=Ar[Pt],fe.prototype[qt]||(fe.prototype[qt]=Tr.prototype[qt]);var Ar,qt,Pt;function fe(e){if(!(this instanceof fe))return new fe(e);sn.call(this,e),Tr.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",v0)}Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function v0(){this.allowHalfOpen||this._writableState.ended||an.nextTick(g0,this)}function g0(e){e.end()}Object.defineProperty(fe.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}});fe.prototype._destroy=function(e,t){this.push(null),this.end(),an.nextTick(t,e)}});var Pr=m(ln=>{"use strict";var Dr=Xe().Buffer,un=Dr.isEncoding||function(e){switch(e=""+e,e&&e.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 w0(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function b0(e){var t=w0(e);if(typeof t!="string"&&(Dr.isEncoding===un||!un(e)))throw new Error("Unknown encoding: "+e);return t||e}ln.StringDecoder=et;function et(e){this.encoding=b0(e);var t;switch(this.encoding){case"utf16le":this.text=A0,this.end=T0,t=4;break;case"utf8":this.fillLast=F0,t=4;break;case"base64":this.text=B0,this.end=C0,t=3;break;default:this.write=D0,this.end=P0;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Dr.allocUnsafe(t)}et.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};et.prototype.end=O0;et.prototype.text=R0;et.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Cr(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function E0(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Cr(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Cr(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Cr(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function S0(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function F0(e){var t=this.lastTotal-this.lastNeed,r=S0(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function R0(e,t){var r=E0(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function O0(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function A0(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function T0(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function B0(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function C0(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function D0(e){return e.toString(this.encoding)}function P0(e){return e&&e.length?this.write(e):""}});var Br=m((gl,bn)=>{"use strict";var Ne=Ke();bn.exports=q;var q0=ji(),tt;q.ReadableState=_n;var vl=require("events").EventEmitter,hn=function(e,t){return e.listeners(t).length},Nr=vr(),rt=Xe().Buffer,k0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function I0(e){return rt.from(e)}function z0(e){return rt.isBuffer(e)||e instanceof k0}var pn=Object.create(qe());pn.inherits=ke();var qr=require("util"),A=void 0;qr&&qr.debuglog?A=qr.debuglog("stream"):A=function(){};var N0=Gi(),mn=Fr(),ze;pn.inherits(q,Nr);var kr=["error","close","destroy","pause","resume"];function L0(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):q0(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function _n(e,t){tt=tt||Re(),e=e||{};var r=t instanceof tt;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=e.readableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new N0,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.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(ze||(ze=Pr().StringDecoder),this.decoder=new ze(e.encoding),this.encoding=e.encoding)}function q(e){if(tt=tt||Re(),!(this instanceof q))return new q(e);this._readableState=new _n(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Nr.call(this)}Object.defineProperty(q.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});q.prototype.destroy=mn.destroy;q.prototype._undestroy=mn.undestroy;q.prototype._destroy=function(e,t){this.push(null),t(e)};q.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=rt.from(e,t),t=""),i=!0),yn(this,e,t,!1,i)};q.prototype.unshift=function(e){return yn(this,e,null,!0,!1)};function yn(e,t,r,i,n){var a=e._readableState;if(t===null)a.reading=!1,W0(e,a);else{var o;n||(o=j0(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==rt.prototype&&(t=I0(t)),i?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):Ir(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Ir(e,a,t,!1):vn(e,a)):Ir(e,a,t,!1))):i||(a.reading=!1)}return M0(a)}function Ir(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&kt(e)),vn(e,t)}function j0(e,t){var r;return!z0(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function M0(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}q.prototype.isPaused=function(){return this._readableState.flowing===!1};q.prototype.setEncoding=function(e){return ze||(ze=Pr().StringDecoder),this._readableState.decoder=new ze(e),this._readableState.encoding=e,this};var cn=8388608;function U0(e){return e>=cn?e=cn:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function xn(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=U0(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}q.prototype.read=function(e){A("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return A("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?zr(this):kt(this),null;if(e=xn(e,t),e===0&&t.ended)return t.length===0&&zr(this),null;var i=t.needReadable;A("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,A("length less than watermark",i)),t.ended||t.reading?(i=!1,A("reading or ended",i)):i&&(A("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=xn(r,t)));var n;return e>0?n=gn(e,t):n=null,n===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&zr(this)),n!==null&&this.emit("data",n),n};function W0(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,kt(e)}}function kt(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(A("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Ne.nextTick(dn,e):dn(e))}function dn(e){A("emit readable"),e.emit("readable"),Lr(e)}function vn(e,t){t.readingMore||(t.readingMore=!0,Ne.nextTick(H0,e,t))}function H0(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(A("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}q.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};q.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,A("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=n?s:d;i.endEmitted?Ne.nextTick(a):r.once("end",a),e.on("unpipe",o);function o(v,g){A("onunpipe"),v===r&&g&&g.hasUnpiped===!1&&(g.hasUnpiped=!0,l())}function s(){A("onend"),e.end()}var u=$0(r);e.on("drain",u);var x=!1;function l(){A("cleanup"),e.removeListener("close",p),e.removeListener("finish",_),e.removeListener("drain",u),e.removeListener("error",h),e.removeListener("unpipe",o),r.removeListener("end",s),r.removeListener("end",d),r.removeListener("data",f),x=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}var c=!1;r.on("data",f);function f(v){A("ondata"),c=!1;var g=e.write(v);g===!1&&!c&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&wn(i.pipes,e)!==-1)&&!x&&(A("false write response, pause",i.awaitDrain),i.awaitDrain++,c=!0),r.pause())}function h(v){A("onerror",v),d(),e.removeListener("error",h),hn(e,"error")===0&&e.emit("error",v)}L0(e,"error",h);function p(){e.removeListener("finish",_),d()}e.once("close",p);function _(){A("onfinish"),e.removeListener("close",p),d()}e.once("finish",_);function d(){A("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(A("pipe resume"),r.resume()),e};function $0(e){return function(){var t=e._readableState;A("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&hn(e,"data")&&(t.flowing=!0,Lr(e))}}q.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=wn(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};q.prototype.on=function(e,t){var r=Nr.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&kt(this):Ne.nextTick(G0,this))}return r};q.prototype.addListener=q.prototype.on;function G0(e){A("readable nexttick read 0"),e.read(0)}q.prototype.resume=function(){var e=this._readableState;return e.flowing||(A("resume"),e.flowing=!0,Z0(this,e)),this};function Z0(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Ne.nextTick(Y0,e,t))}function Y0(e,t){t.reading||(A("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Lr(e),t.flowing&&!t.reading&&e.read(0)}q.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Lr(e){var t=e._readableState;for(A("flow",t.flowing);t.flowing&&e.read()!==null;);}q.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(A("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(A("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=function(o){return function(){return e[o].apply(e,arguments)}}(n));for(var a=0;a<kr.length;a++)e.on(kr[a],this.emit.bind(this,kr[a]));return this._read=function(o){A("wrapped _read",o),i&&(i=!1,e.resume())},this};Object.defineProperty(q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});q._fromList=gn;function gn(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=K0(e,t.buffer,t.decoder),r}function K0(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?i=t.shift():i=r?X0(e,t):V0(e,t),i}function X0(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),e-=o,e===0){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function V0(e,t){var r=rt.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),e-=o,e===0){o===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++n}return t.length-=n,r}function zr(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Ne.nextTick(Q0,t,e))}function Q0(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function wn(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var jr=m((wl,Fn)=>{"use strict";Fn.exports=ue;var It=Re(),Sn=Object.create(qe());Sn.inherits=ke();Sn.inherits(ue,It);function J0(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function ue(e){if(!(this instanceof ue))return new ue(e);It.call(this,e),this._transformState={afterTransform:J0.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",ef)}function ef(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){En(e,t,r)}):En(this,null,null)}ue.prototype.push=function(e,t){return this._transformState.needTransform=!1,It.prototype.push.call(this,e,t)};ue.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};ue.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};ue.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};ue.prototype._destroy=function(e,t){var r=this;It.prototype._destroy.call(this,e,function(i){t(i),r.emit("close")})};function En(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var Tn=m((bl,An)=>{"use strict";An.exports=it;var Rn=jr(),On=Object.create(qe());On.inherits=ke();On.inherits(it,Rn);function it(e){if(!(this instanceof it))return new it(e);Rn.call(this,e)}it.prototype._transform=function(e,t,r){r(null,e)}});var Le=m((H,zt)=>{var ee=require("stream");process.env.READABLE_STREAM==="disable"&&ee?(zt.exports=ee,H=zt.exports=ee.Readable,H.Readable=ee.Readable,H.Writable=ee.Writable,H.Duplex=ee.Duplex,H.Transform=ee.Transform,H.PassThrough=ee.PassThrough,H.Stream=ee):(H=zt.exports=Br(),H.Stream=ee||H,H.Readable=H,H.Writable=Or(),H.Duplex=Re(),H.Transform=jr(),H.PassThrough=Tn())});var Cn=m((El,Bn)=>{Bn.exports=Le().Duplex});var qn=m((Mr,Pn)=>{var Nt=require("buffer"),te=Nt.Buffer;function Dn(e,t){for(var r in e)t[r]=e[r]}te.from&&te.alloc&&te.allocUnsafe&&te.allocUnsafeSlow?Pn.exports=Nt:(Dn(Nt,Mr),Mr.Buffer=Oe);function Oe(e,t,r){return te(e,t,r)}Oe.prototype=Object.create(te.prototype);Dn(te,Oe);Oe.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return te(e,t,r)};Oe.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=te(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};Oe.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return te(e)};Oe.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Nt.SlowBuffer(e)}});var In=m((Sl,kn)=>{var Ur=Cn(),tf=require("util"),je=qn().Buffer;function L(e){if(!(this instanceof L))return new L(e);if(this._bufs=[],this.length=0,typeof e=="function"){this._callback=e;var t=function(i){this._callback&&(this._callback(i),this._callback=null)}.bind(this);this.on("pipe",function(i){i.on("error",t)}),this.on("unpipe",function(i){i.removeListener("error",t)})}else this.append(e);Ur.call(this)}tf.inherits(L,Ur);L.prototype._offset=function(t){var r=0,i=0,n;if(t===0)return[0,0];for(;i<this._bufs.length;i++){if(n=r+this._bufs[i].length,t<n||i==this._bufs.length-1)return[i,t-r];r=n}};L.prototype.append=function(t){var r=0;if(je.isBuffer(t))this._appendBuffer(t);else if(Array.isArray(t))for(;r<t.length;r++)this.append(t[r]);else if(t instanceof L)for(;r<t._bufs.length;r++)this.append(t._bufs[r]);else t!=null&&(typeof t=="number"&&(t=t.toString()),this._appendBuffer(je.from(t)));return this};L.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};L.prototype._write=function(t,r,i){this._appendBuffer(t),typeof i=="function"&&i()};L.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)};L.prototype.end=function(t){Ur.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)};L.prototype.get=function(t){return this.slice(t,t+1)[0]};L.prototype.slice=function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)};L.prototype.copy=function(t,r,i,n){if((typeof i!="number"||i<0)&&(i=0),(typeof n!="number"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return t||je.alloc(0);var a=!!t,o=this._offset(i),s=n-i,u=s,x=a&&r||0,l=o[1],c,f;if(i===0&&n==this.length){if(!a)return this._bufs.length===1?this._bufs[0]:je.concat(this._bufs,this.length);for(f=0;f<this._bufs.length;f++)this._bufs[f].copy(t,x),x+=this._bufs[f].length;return t}if(u<=this._bufs[o[0]].length-l)return a?this._bufs[o[0]].copy(t,r,l,l+u):this._bufs[o[0]].slice(l,l+u);for(a||(t=je.allocUnsafe(s)),f=o[0];f<this._bufs.length;f++){if(c=this._bufs[f].length-l,u>c)this._bufs[f].copy(t,x,l),x+=c;else{this._bufs[f].copy(t,x,l,l+u),x+=c;break}u-=c,l&&(l=0)}return t.length>x?t.slice(0,x):t};L.prototype.shallowSlice=function(t,r){t=t||0,r=r||this.length,t<0&&(t+=this.length),r<0&&(r+=this.length);var i=this._offset(t),n=this._offset(r),a=this._bufs.slice(i[0],n[0]+1);return n[1]==0?a.pop():a[a.length-1]=a[a.length-1].slice(0,n[1]),i[1]!=0&&(a[0]=a[0].slice(i[1])),new L(a)};L.prototype.toString=function(t,r,i){return this.slice(r,i).toString(t)};L.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};L.prototype.duplicate=function(){for(var t=0,r=new L;t<this._bufs.length;t++)r.append(this._bufs[t]);return r};L.prototype.destroy=function(){this._bufs.length=0,this.length=0,this.push(null)};(function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1};for(var t in e)(function(r){L.prototype[r]=function(i){return this.slice(i,i+e[r])[r](0)}})(t)})();kn.exports=L});var Nn=m((Fl,zn)=>{zn.exports=nf;var rf=Object.prototype.hasOwnProperty;function nf(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)rf.call(r,i)&&(e[i]=r[i])}return e}});var Wr=m((Rl,jn)=>{jn.exports=of;var Ln=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from:af;function af(e,t){return new Buffer(e,t)}function of(e,t){if(Buffer.isBuffer(e))return e;if(typeof e=="string")return Ln(e,t);if(Array.isArray(e))return Ln(e);throw new Error("Input should be a buffer or a string")}});var Un=m((Ol,Mn)=>{var sf=function(){try{if(!Buffer.isEncoding("latin1"))return!1;var e=Buffer.alloc?Buffer.alloc(4):new Buffer(4);return e.fill("ab","ucs2"),e.toString("hex")==="61006200"}catch{return!1}}();function ff(e){return e.length===1&&e.charCodeAt(0)<256}function Lt(e,t,r,i){if(r<0||i>e.length)throw new RangeError("Out of range index");return r=r>>>0,i=i===void 0?e.length:i>>>0,i>r&&e.fill(t,r,i),e}function uf(e,t,r,i){if(r<0||i>e.length)throw new RangeError("Out of range index");if(i<=r)return e;r=r>>>0,i=i===void 0?e.length:i>>>0;for(var n=r,a=t.length;n<=i-a;)t.copy(e,n),n+=a;return n!==i&&t.copy(e,n,0,i-n),e}function lf(e,t,r,i,n){if(sf)return e.fill(t,r,i,n);if(typeof t=="number")return Lt(e,t,r,i);if(typeof t=="string"){if(typeof r=="string"?(n=r,r=0,i=e.length):typeof i=="string"&&(n=i,i=e.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(n==="latin1"&&(n="binary"),typeof n=="string"&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(t==="")return Lt(e,0,r,i);if(ff(t))return Lt(e,t.charCodeAt(0),r,i);t=new Buffer(t,n)}return Buffer.isBuffer(t)?uf(e,t,r,i):Lt(e,0,r,i)}Mn.exports=lf});var Hn=m((Al,Wn)=>{function cf(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative');return Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e)}Wn.exports=cf});var Hr=m((Tl,Gn)=>{var $n=Un(),xf=Hn();Gn.exports=function(t,r,i){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative');if(Buffer.alloc)return Buffer.alloc(t,r,i);var n=xf(t);return t===0?n:r===void 0?$n(n,0):(typeof i!="string"&&(i=void 0),$n(n,r,i))}});var Gr=m(Ue=>{var df=Wr(),hf=Hr(),pf="0000000000000000000",mf="7777777777777777777",Zn=48,_f="ustar\x0000",yf=parseInt("7777",8),vf=function(e,t,r){return typeof e!="number"?r:(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0)},gf=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},wf=function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},Yn=function(e,t,r,i){for(;r<i;r++)if(e[r]===t)return r;return i},Kn=function(e){for(var t=256,r=0;r<148;r++)t+=e[r];for(var i=156;i<512;i++)t+=e[i];return t},pe=function(e,t){return e=e.toString(8),e.length>t?mf.slice(0,t)+" ":pf.slice(0,t-e.length)+e+" "};function bf(e){var t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;for(var r=!1,i=[],n=e.length-1;n>0;n--){var a=e[n];t?i.push(a):r&&a===0?i.push(0):r?(r=!1,i.push(256-a)):i.push(255-a)}var o=0,s=i.length;for(n=0;n<s;n++)o+=i[n]*Math.pow(256,n);return t?o:-1*o}var me=function(e,t,r){if(e=e.slice(t,t+r),t=0,e[t]&128)return bf(e);for(;t<e.length&&e[t]===32;)t++;for(var i=vf(Yn(e,32,t,e.length),e.length,e.length);t<i&&e[t]===0;)t++;return i===t?0:parseInt(e.slice(t,i).toString(),8)},Me=function(e,t,r,i){return e.slice(t,Yn(e,0,t,t+r)).toString(i)},$r=function(e){var t=Buffer.byteLength(e),r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e};Ue.decodeLongPath=function(e,t){return Me(e,0,e.length,t)};Ue.encodePax=function(e){var t="";e.name&&(t+=$r(" path="+e.name+`
|
|
3
|
-
`)),e.linkname&&(t
|
|
4
|
-
`));var r=e.pax;if(r)for(var i in r)t
|
|
5
|
-
`);return df(t)};Ue.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&e[r]!==32;)r++;var i=parseInt(e.slice(0,r).toString(),10);if(!i)return t;var n=e.slice(r+1,i-1).toString(),a=n.indexOf("=");if(a===-1)return t;t[n.slice(0,a)]=n.slice(a+1),e=e.slice(i)}return t};Ue.encode=function(e){var t=hf(512),r=e.name,i="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var n=r.indexOf("/");if(n===-1)return null;i+=i?"/"+r.slice(0,n):r.slice(0,n),r=r.slice(n+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(i)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(r),t.write(pe(e.mode&yf,6),100),t.write(pe(e.uid,6),108),t.write(pe(e.gid,6),116),t.write(pe(e.size,11),124),t.write(pe(e.mtime.getTime()/1e3|0,11),136),t[156]=Zn+wf(e.type),e.linkname&&t.write(e.linkname,157),t.write(_f,257),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(pe(e.devmajor||0,6),329),t.write(pe(e.devminor||0,6),337),i&&t.write(i,345),t.write(pe(Kn(t),6),148),t)};Ue.decode=function(e,t){var r=e[156]===0?0:e[156]-Zn,i=Me(e,0,100,t),n=me(e,100,8),a=me(e,108,8),o=me(e,116,8),s=me(e,124,12),u=me(e,136,12),x=gf(r),l=e[157]===0?null:Me(e,157,100,t),c=Me(e,265,32),f=Me(e,297,32),h=me(e,329,8),p=me(e,337,8);e[345]&&(i=Me(e,345,155,t)+"/"+i),r===0&&i&&i[i.length-1]==="/"&&(r=5);var _=Kn(e);if(_===8*32)return null;if(_!==me(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");return{name:i,mode:n,uid:a,gid:o,size:s,mtime:new Date(1e3*u),type:x,linkname:l,uname:c,gname:f,devmajor:h,devminor:p}}});var ra=m((Cl,ta)=>{var Vn=require("util"),Ef=In(),Sf=Nn(),nt=Gr(),Qn=Le().Writable,Jn=Le().PassThrough,ea=function(){},Xn=function(e){return e&=511,e&&512-e},Ff=function(e,t){var r=new jt(e,t);return r.end(),r},Rf=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},jt=function(e,t){this._parent=e,this.offset=t,Jn.call(this)};Vn.inherits(jt,Jn);jt.prototype.destroy=function(e){this._parent.destroy(e)};var le=function(e){if(!(this instanceof le))return new le(e);Qn.call(this,e),e=e||{},this._offset=0,this._buffer=Ef(),this._missing=0,this._partial=!1,this._onparse=ea,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,r=t._buffer,i=function(){t._continue()},n=function(f){if(t._locked=!1,f)return t.destroy(f);t._stream||i()},a=function(){t._stream=null;var f=Xn(t._header.size);f?t._parse(f,o):t._parse(512,c),t._locked||i()},o=function(){t._buffer.consume(Xn(t._header.size)),t._parse(512,c),i()},s=function(){var f=t._header.size;t._paxGlobal=nt.decodePax(r.slice(0,f)),r.consume(f),a()},u=function(){var f=t._header.size;t._pax=nt.decodePax(r.slice(0,f)),t._paxGlobal&&(t._pax=Sf(t._paxGlobal,t._pax)),r.consume(f),a()},x=function(){var f=t._header.size;this._gnuLongPath=nt.decodeLongPath(r.slice(0,f),e.filenameEncoding),r.consume(f),a()},l=function(){var f=t._header.size;this._gnuLongLinkPath=nt.decodeLongPath(r.slice(0,f),e.filenameEncoding),r.consume(f),a()},c=function(){var f=t._offset,h;try{h=t._header=nt.decode(r.slice(0,512),e.filenameEncoding)}catch(p){t.emit("error",p)}if(r.consume(512),!h){t._parse(512,c),i();return}if(h.type==="gnu-long-path"){t._parse(h.size,x),i();return}if(h.type==="gnu-long-link-path"){t._parse(h.size,l),i();return}if(h.type==="pax-global-header"){t._parse(h.size,s),i();return}if(h.type==="pax-header"){t._parse(h.size,u),i();return}if(t._gnuLongPath&&(h.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(h.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=h=Rf(h,t._pax),t._pax=null),t._locked=!0,!h.size||h.type==="directory"){t._parse(512,c),t.emit("entry",h,Ff(t,f),n);return}t._stream=new jt(t,f),t.emit("entry",h,t._stream,n),t._parse(h.size,a),i()};this._onheader=c,this._parse(512,c)};Vn.inherits(le,Qn);le.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};le.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)};le.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=ea,this._overflow?this._write(this._overflow,void 0,e):e()}};le.prototype._write=function(e,t,r){if(!this._destroyed){var i=this._stream,n=this._buffer,a=this._missing;if(e.length&&(this._partial=!0),e.length<a)return this._missing-=e.length,this._overflow=null,i?i.write(e,r):(n.append(e),r());this._cb=r,this._missing=0;var o=null;e.length>a&&(o=e.slice(a),e=e.slice(0,a)),i?i.end(e):n.append(e),this._overflow=o,this._onparse()}};le.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()};ta.exports=le});var na=m((Dl,ia)=>{ia.exports=require("fs").constants||require("constants")});var sa=m((Pl,oa)=>{oa.exports=aa;function aa(e,t){if(e&&t)return aa(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(i){r[i]=e[i]}),r;function r(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];var a=e.apply(this,i),o=i[i.length-1];return typeof a=="function"&&a!==o&&Object.keys(o).forEach(function(s){a[s]=o[s]}),a}}});var la=m((ql,Zr)=>{var fa=sa();Zr.exports=fa(Mt);Zr.exports.strict=fa(ua);Mt.proto=Mt(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Mt(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return ua(this)},configurable:!0})});function Mt(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function ua(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var da=m((kl,xa)=>{var Of=la(),Af=function(){},Tf=function(e){return e.setHeader&&typeof e.abort=="function"},Bf=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},ca=function(e,t,r){if(typeof t=="function")return ca(e,null,t);t||(t={}),r=Of(r||Af);var i=e._writableState,n=e._readableState,a=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,s=!1,u=function(){e.writable||x()},x=function(){o=!1,a||r.call(e)},l=function(){a=!1,o||r.call(e)},c=function(d){r.call(e,d?new Error("exited with error code: "+d):null)},f=function(d){r.call(e,d)},h=function(){process.nextTick(p)},p=function(){if(!s){if(a&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"));if(o&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"))}},_=function(){e.req.on("finish",x)};return Tf(e)?(e.on("complete",x),e.on("abort",h),e.req?_():e.on("request",_)):o&&!i&&(e.on("end",u),e.on("close",u)),Bf(e)&&e.on("exit",c),e.on("end",l),e.on("finish",x),t.error!==!1&&e.on("error",f),e.on("close",h),function(){s=!0,e.removeListener("complete",x),e.removeListener("abort",h),e.removeListener("request",_),e.req&&e.req.removeListener("finish",x),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",x),e.removeListener("exit",c),e.removeListener("end",l),e.removeListener("error",f),e.removeListener("close",h)}};xa.exports=ca});var ya=m((Il,_a)=>{var We=na(),ha=da(),Wt=require("util"),Cf=Hr(),Df=Wr(),pa=Le().Readable,He=Le().Writable,Pf=require("string_decoder").StringDecoder,Ut=Gr(),qf=parseInt("755",8),kf=parseInt("644",8),ma=Cf(1024),Kr=function(){},Yr=function(e,t){t&=511,t&&e.push(ma.slice(0,512-t))};function If(e){switch(e&We.S_IFMT){case We.S_IFBLK:return"block-device";case We.S_IFCHR:return"character-device";case We.S_IFDIR:return"directory";case We.S_IFIFO:return"fifo";case We.S_IFLNK:return"symlink"}return"file"}var Ht=function(e){He.call(this),this.written=0,this._to=e,this._destroyed=!1};Wt.inherits(Ht,He);Ht.prototype._write=function(e,t,r){if(this.written+=e.length,this._to.push(e))return r();this._to._drain=r};Ht.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var $t=function(){He.call(this),this.linkname="",this._decoder=new Pf("utf-8"),this._destroyed=!1};Wt.inherits($t,He);$t.prototype._write=function(e,t,r){this.linkname+=this._decoder.write(e),r()};$t.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var at=function(){He.call(this),this._destroyed=!1};Wt.inherits(at,He);at.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))};at.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var re=function(e){if(!(this instanceof re))return new re(e);pa.call(this,e),this._drain=Kr,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};Wt.inherits(re,pa);re.prototype.entry=function(e,t,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof t=="function"&&(r=t,t=null),r||(r=Kr);var i=this;if((!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=If(e.mode)),e.mode||(e.mode=e.type==="directory"?qf:kf),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof t=="string"&&(t=Df(t)),Buffer.isBuffer(t))return e.size=t.length,this._encode(e),this.push(t),Yr(i,e.size),process.nextTick(r),new at;if(e.type==="symlink"&&!e.linkname){var n=new $t;return ha(n,function(o){if(o)return i.destroy(),r(o);e.linkname=n.linkname,i._encode(e),r()}),n}if(this._encode(e),e.type!=="file"&&e.type!=="contiguous-file")return process.nextTick(r),new at;var a=new Ht(this);return this._stream=a,ha(a,function(o){if(i._stream=null,o)return i.destroy(),r(o);if(a.written!==e.size)return i.destroy(),r(new Error("size mismatch"));Yr(i,e.size),i._finalizing&&i.finalize(),r()}),a}};re.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(ma),this.push(null))};re.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};re.prototype._encode=function(e){if(!e.pax){var t=Ut.encode(e);if(t){this.push(t);return}}this._encodePax(e)};re.prototype._encodePax=function(e){var t=Ut.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(Ut.encode(r)),this.push(t),Yr(this,t.length),r.size=e.size,r.type=e.type,this.push(Ut.encode(r))};re.prototype._read=function(e){var t=this._drain;this._drain=Kr,t()};_a.exports=re});var va=m(Xr=>{Xr.extract=ra();Xr.pack=ya()});var Gt=m((Nl,wa)=>{"use strict";var ga=_r(),zf=Rt(),Nf=va();wa.exports=()=>e=>{if(!Buffer.isBuffer(e)&&!zf(e))return Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`));if(Buffer.isBuffer(e)&&(!ga(e)||ga(e).ext!=="tar"))return Promise.resolve([]);let t=Nf.extract(),r=[];t.on("entry",(n,a,o)=>{let s=[];a.on("data",u=>s.push(u)),a.on("end",()=>{let u={data:Buffer.concat(s),mode:n.mode,mtime:n.mtime,path:n.name,type:n.type};(n.type==="symlink"||n.type==="link")&&(u.linkname=n.linkname),r.push(u),o()})});let i=new Promise((n,a)=>{Buffer.isBuffer(e)||e.on("error",a),t.on("finish",()=>n(r)),t.on("error",a)});return t.then=i.then.bind(i),t.catch=i.catch.bind(i),Buffer.isBuffer(e)?t.end(e):e.pipe(t),t}});var Ea=m((Ll,ba)=>{"use strict";var $e=e=>Array.from(e).map(t=>t.charCodeAt(0)),Lf=$e("META-INF/mozilla.rsa"),jf=$e("[Content_Types].xml"),Mf=$e("_rels/.rels");ba.exports=e=>{let t=new Uint8Array(e);if(!(t&&t.length>1))return null;let r=(i,n)=>{n=Object.assign({offset:0},n);for(let a=0;a<i.length;a++)if(n.mask){if(i[a]!==(n.mask[a]&t[a+n.offset]))return!1}else if(i[a]!==t[a+n.offset])return!1;return!0};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(Lf,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(r(jf,{offset:30})||r(Mf,{offset:30})){let i=t.subarray(4,2004),n=o=>o.findIndex((s,u,x)=>x[u]===80&&x[u+1]===75&&x[u+2]===3&&x[u+3]===4),a=n(i);if(a!==-1){let o=t.subarray(a+8,a+8+1e3),s=n(o);if(s!==-1){let u=8+a+s+30;if(r($e("word/"),{offset:u}))return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(r($e("ppt/"),{offset:u}))return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(r($e("xl/"),{offset:u}))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}}}}if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([51,103,112,53])||r([0,0,0])&&r([102,116,121,112],{offset:4})&&(r([109,112,52,49],{offset:8})||r([109,112,52,50],{offset:8})||r([105,115,111,109],{offset:8})||r([105,115,111,50],{offset:8})||r([109,109,112,52],{offset:8})||r([77,52,86],{offset:8})||r([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let i=t.subarray(4,4100),n=i.findIndex((a,o,s)=>s[o]===66&&s[o+1]===130);if(n!==-1){let a=n+3,o=s=>Array.from(s).every((u,x)=>i[a+x]===u.charCodeAt(0));if(o("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(o("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([82,73,70,70])&&r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/x-msvideo"};if(r([48,38,178,117,142,102,207,17,166,217]))return{ext:"wmv",mime:"video/x-ms-wmv"};if(r([0,0,1,186]))return{ext:"mpg",mime:"video/mpeg"};for(let i=0;i<2&&i<t.length-16;i++)if(r([73,68,51],{offset:i})||r([255,226],{offset:i,mask:[255,226]}))return{ext:"mp3",mime:"audio/mpeg"};return r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32])?{ext:"m4a",mime:"audio/m4a"}:r([79,112,117,115,72,101,97,100],{offset:28})?{ext:"opus",mime:"audio/opus"}:r([79,103,103,83])?{ext:"ogg",mime:"audio/ogg"}:r([102,76,97,67])?{ext:"flac",mime:"audio/x-flac"}:r([82,73,70,70])&&r([87,65,86,69],{offset:8})?{ext:"wav",mime:"audio/x-wav"}:r([35,33,65,77,82,10])?{ext:"amr",mime:"audio/amr"}:r([37,80,68,70])?{ext:"pdf",mime:"application/pdf"}:r([77,90])?{ext:"exe",mime:"application/x-msdownload"}:(t[0]===67||t[0]===70)&&r([87,83],{offset:1})?{ext:"swf",mime:"application/x-shockwave-flash"}:r([123,92,114,116,102])?{ext:"rtf",mime:"application/rtf"}:r([0,97,115,109])?{ext:"wasm",mime:"application/wasm"}:r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff",mime:"font/woff"}:r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff2",mime:"font/woff2"}:r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8}))?{ext:"eot",mime:"application/octet-stream"}:r([0,1,0,0,0])?{ext:"ttf",mime:"font/ttf"}:r([79,84,84,79,0])?{ext:"otf",mime:"font/otf"}:r([0,0,1,0])?{ext:"ico",mime:"image/x-icon"}:r([70,76,86,1])?{ext:"flv",mime:"video/x-flv"}:r([37,33])?{ext:"ps",mime:"application/postscript"}:r([253,55,122,88,90,0])?{ext:"xz",mime:"application/x-xz"}:r([83,81,76,105])?{ext:"sqlite",mime:"application/x-sqlite3"}:r([78,69,83,26])?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:r([67,114,50,52])?{ext:"crx",mime:"application/x-google-chrome-extension"}:r([77,83,67,70])||r([73,83,99,40])?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121])?{ext:"deb",mime:"application/x-deb"}:r([33,60,97,114,99,104,62])?{ext:"ar",mime:"application/x-unix-archive"}:r([237,171,238,219])?{ext:"rpm",mime:"application/x-rpm"}:r([31,160])||r([31,157])?{ext:"Z",mime:"application/x-compress"}:r([76,90,73,80])?{ext:"lz",mime:"application/x-lzip"}:r([208,207,17,224,161,177,26,225])?{ext:"msi",mime:"application/x-msi"}:r([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196}))?{ext:"mts",mime:"video/mp2t"}:r([66,76,69,78,68,69,82])?{ext:"blend",mime:"application/x-blender"}:r([66,80,71,251])?{ext:"bpg",mime:"image/bpg"}:null}});var Ra=m((jl,Fa)=>{var Sa=[0,1,3,7,15,31,63,127,255],ot=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};ot.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)};ot.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var r=8-this.bitOffset;if(e>=r)t<<=r,t|=Sa[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=r;else{t<<=e;var i=r-e;t|=(this.curByte&Sa[e]<<i)>>i,this.bitOffset+=e,e=0}}return t};ot.prototype.seek=function(e){var t=e%8,r=(e-t)/8;this.bitOffset=t,this.stream.seek(r),this.hasByte=!1};ot.prototype.pi=function(){var e=new Buffer(6),t;for(t=0;t<e.length;t++)e[t]=this.read(8);return e.toString("hex")};Fa.exports=ot});var Aa=m((Ml,Oa)=>{var Ae=function(){};Ae.prototype.readByte=function(){throw new Error("abstract method readByte() not implemented")};Ae.prototype.read=function(e,t,r){for(var i=0;i<r;){var n=this.readByte();if(n<0)return i===0?-1:i;e[t++]=n,i++}return i};Ae.prototype.seek=function(e){throw new Error("abstract method seek() not implemented")};Ae.prototype.writeByte=function(e){throw new Error("abstract method readByte() not implemented")};Ae.prototype.write=function(e,t,r){var i;for(i=0;i<r;i++)this.writeByte(e[t++]);return r};Ae.prototype.flush=function(){};Oa.exports=Ae});var Ba=m((Ul,Ta)=>{Ta.exports=function(){var e=new Uint32Array([0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188]),t=function(){var r=4294967295;this.getCRC=function(){return~r>>>0},this.updateCRC=function(i){r=r<<8^e[(r>>>24^i)&255]},this.updateCRCRun=function(i,n){for(;n-- >0;)r=r<<8^e[(r>>>24^i)&255]}};return t}()});var Ca=m((Wl,Uf)=>{Uf.exports={name:"seek-bzip",version:"1.0.6",contributors:["C. Scott Ananian (http://cscott.net)","Eli Skeggs","Kevin Kwok","Rob Landley (http://landley.net)"],description:"a pure-JavaScript Node.JS module for random-access decoding bzip2 data",main:"./lib/index.js",repository:{type:"git",url:"https://github.com/cscott/seek-bzip.git"},license:"MIT",bin:{"seek-bunzip":"./bin/seek-bunzip","seek-table":"./bin/seek-bzip-table"},directories:{test:"test"},dependencies:{commander:"^2.8.1"},devDependencies:{fibers:"~1.0.6",mocha:"~2.2.5"},scripts:{test:"mocha"}}});var La=m((Hl,Na)=>{var Wf=Ra(),st=Aa(),ka=Ba(),Ia=Ca(),Zt=20,Da=258,Pa=0,Hf=1,$f=2,Gf=6,Zf=50,Yf="314159265359",Kf="177245385090",qa=function(e,t){var r=e[t],i;for(i=t;i>0;i--)e[i]=e[i-1];return e[0]=r,r},k={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},_e={};_e[k.LAST_BLOCK]="Bad file checksum";_e[k.NOT_BZIP_DATA]="Not bzip data";_e[k.UNEXPECTED_INPUT_EOF]="Unexpected input EOF";_e[k.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF";_e[k.DATA_ERROR]="Data error";_e[k.OUT_OF_MEMORY]="Out of memory";_e[k.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var $=function(e,t){var r=_e[e]||"unknown error";t&&(r+=": "+t);var i=new TypeError(r);throw i.errorCode=e,i},K=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};K.prototype._init_block=function(){var e=this._get_next_block();return e?(this.blockCRC=new ka,!0):(this.writeCount=-1,!1)};K.prototype._start_bunzip=function(e,t){var r=new Buffer(4);(e.read(r,0,4)!==4||String.fromCharCode(r[0],r[1],r[2])!=="BZh")&&$(k.NOT_BZIP_DATA,"bad magic");var i=r[3]-48;(i<1||i>9)&&$(k.NOT_BZIP_DATA,"level out of range"),this.reader=new Wf(e),this.dbufSize=1e5*i,this.nextoutput=0,this.outputStream=t,this.streamCRC=0};K.prototype._get_next_block=function(){var e,t,r,i=this.reader,n=i.pi();if(n===Kf)return!1;n!==Yf&&$(k.NOT_BZIP_DATA),this.targetBlockCRC=i.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,i.read(1)&&$(k.OBSOLETE_INPUT);var a=i.read(24);a>this.dbufSize&&$(k.DATA_ERROR,"initial position out of bounds");var o=i.read(16),s=new Buffer(256),u=0;for(e=0;e<16;e++)if(o&1<<15-e){var x=e*16;for(r=i.read(16),t=0;t<16;t++)r&1<<15-t&&(s[u++]=x+t)}var l=i.read(3);(l<$f||l>Gf)&&$(k.DATA_ERROR);var c=i.read(15);c===0&&$(k.DATA_ERROR);var f=new Buffer(256);for(e=0;e<l;e++)f[e]=e;var h=new Buffer(c);for(e=0;e<c;e++){for(t=0;i.read(1);t++)t>=l&&$(k.DATA_ERROR);h[e]=qa(f,t)}var p=u+2,_=[],d;for(t=0;t<l;t++){var v=new Buffer(p),g=new Uint16Array(Zt+1);for(o=i.read(5),e=0;e<p;e++){for(;(o<1||o>Zt)&&$(k.DATA_ERROR),!!i.read(1);)i.read(1)?o--:o++;v[e]=o}var E,z;for(E=z=v[0],e=1;e<p;e++)v[e]>z?z=v[e]:v[e]<E&&(E=v[e]);d={},_.push(d),d.permute=new Uint16Array(Da),d.limit=new Uint32Array(Zt+2),d.base=new Uint32Array(Zt+1),d.minLen=E,d.maxLen=z;var O=0;for(e=E;e<=z;e++)for(g[e]=d.limit[e]=0,o=0;o<p;o++)v[o]===e&&(d.permute[O++]=o);for(e=0;e<p;e++)g[v[e]]++;for(O=o=0,e=E;e<z;e++)O+=g[e],d.limit[e]=O-1,O<<=1,o+=g[e],d.base[e+1]=O-o;d.limit[z+1]=Number.MAX_VALUE,d.limit[z]=O+g[z]-1,d.base[E]=0}var X=new Uint32Array(256);for(e=0;e<256;e++)f[e]=e;var I=0,j=0,y=0,w,b=this.dbuf=new Uint32Array(this.dbufSize);for(p=0;;){for(p--||(p=Zf-1,y>=c&&$(k.DATA_ERROR),d=_[h[y++]]),e=d.minLen,t=i.read(e);e>d.maxLen&&$(k.DATA_ERROR),!(t<=d.limit[e]);e++)t=t<<1|i.read(1);t-=d.base[e],(t<0||t>=Da)&&$(k.DATA_ERROR);var C=d.permute[t];if(C===Pa||C===Hf){I||(I=1,o=0),C===Pa?o+=I:o+=2*I,I<<=1;continue}if(I)for(I=0,j+o>this.dbufSize&&$(k.DATA_ERROR),w=s[f[0]],X[w]+=o;o--;)b[j++]=w;if(C>u)break;j>=this.dbufSize&&$(k.DATA_ERROR),e=C-1,w=qa(f,e),w=s[w],X[w]++,b[j++]=w}for((a<0||a>=j)&&$(k.DATA_ERROR),t=0,e=0;e<256;e++)r=t+X[e],X[e]=t,t=r;for(e=0;e<j;e++)w=b[e]&255,b[X[w]]|=e<<8,X[w]++;var D=0,B=0,S=0;return j&&(D=b[a],B=D&255,D>>=8,S=-1),this.writePos=D,this.writeCurrent=B,this.writeCount=j,this.writeRun=S,!0};K.prototype._read_bunzip=function(e,t){var r,i,n;if(this.writeCount<0)return 0;for(var a=0,o=this.dbuf,s=this.writePos,u=this.writeCurrent,x=this.writeCount,l=this.outputsize,c=this.writeRun;x;){for(x--,i=u,s=o[s],u=s&255,s>>=8,c++===3?(r=u,n=i,u=-1):(r=1,n=u),this.blockCRC.updateCRCRun(n,r);r--;)this.outputStream.writeByte(n),this.nextoutput++;u!=i&&(c=0)}return this.writeCount=x,this.blockCRC.getCRC()!==this.targetBlockCRC&&$(k.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var Vr=function(e){if("readByte"in e)return e;var t=new st;return t.pos=0,t.readByte=function(){return e[this.pos++]},t.seek=function(r){this.pos=r},t.eof=function(){return this.pos>=e.length},t},za=function(e){var t=new st,r=!0;if(e)if(typeof e=="number")t.buffer=new Buffer(e),r=!1;else{if("writeByte"in e)return e;t.buffer=e,r=!1}else t.buffer=new Buffer(16384);return t.pos=0,t.writeByte=function(i){if(r&&this.pos>=this.buffer.length){var n=new Buffer(this.buffer.length*2);this.buffer.copy(n),this.buffer=n}this.buffer[this.pos++]=i},t.getBuffer=function(){if(this.pos!==this.buffer.length){if(!r)throw new TypeError("outputsize does not match decoded input");var i=new Buffer(this.pos);this.buffer.copy(i,0,0,this.pos),this.buffer=i}return this.buffer},t._coerced=!0,t};K.Err=k;K.decode=function(e,t,r){for(var i=Vr(e),n=za(t),a=new K(i,n);!("eof"in i&&i.eof());)if(a._init_block())a._read_bunzip();else{var o=a.reader.read(32)>>>0;if(o!==a.streamCRC&&$(k.DATA_ERROR,"Bad stream CRC (got "+a.streamCRC.toString(16)+" expected "+o.toString(16)+")"),r&&"eof"in i&&!i.eof())a._start_bunzip(i,n);else break}if("getBuffer"in n)return n.getBuffer()};K.decodeBlock=function(e,t,r){var i=Vr(e),n=za(r),a=new K(i,n);a.reader.seek(t);var o=a._get_next_block();if(o&&(a.blockCRC=new ka,a.writeCopies=0,a._read_bunzip()),"getBuffer"in n)return n.getBuffer()};K.table=function(e,t,r){var i=new st;i.delegate=Vr(e),i.pos=0,i.readByte=function(){return this.pos++,this.delegate.readByte()},i.delegate.eof&&(i.eof=i.delegate.eof.bind(i.delegate));var n=new st;n.pos=0,n.writeByte=function(){this.pos++};for(var a=new K(i,n),o=a.dbufSize;!("eof"in i&&i.eof());){var s=i.pos*8+a.reader.bitOffset;if(a.reader.hasByte&&(s-=8),a._init_block()){var u=n.pos;a._read_bunzip(),t(s,n.pos-u)}else{var x=a.reader.read(32);if(r&&"eof"in i&&!i.eof())a._start_bunzip(i,n),console.assert(a.dbufSize===o,"shouldn't change block size within multistream file");else break}}};K.Stream=st;K.version=Ia.version;K.license=Ia.license;Na.exports=K});var Ua=m((ja,Ma)=>{var Xf=require("stream");ja=Ma.exports=Qr;Qr.through=Qr;function Qr(e,t,r){e=e||function(l){this.queue(l)},t=t||function(){this.queue(null)};var i=!1,n=!1,a=[],o=!1,s=new Xf;s.readable=s.writable=!0,s.paused=!1,s.autoDestroy=!(r&&r.autoDestroy===!1),s.write=function(l){return e.call(this,l),!s.paused};function u(){for(;a.length&&!s.paused;){var l=a.shift();if(l===null)return s.emit("end");s.emit("data",l)}}s.queue=s.push=function(l){return o||(l===null&&(o=!0),a.push(l),u()),s},s.on("end",function(){s.readable=!1,!s.writable&&s.autoDestroy&&process.nextTick(function(){s.destroy()})});function x(){s.writable=!1,t.call(s),!s.readable&&s.autoDestroy&&s.destroy()}return s.end=function(l){if(!i)return i=!0,arguments.length&&s.write(l),x(),s},s.destroy=function(){if(!n)return n=!0,i=!0,a.length=0,s.writable=s.readable=!1,s.emit("close"),s},s.pause=function(){if(!s.paused)return s.paused=!0,s},s.resume=function(){return s.paused&&(s.paused=!1,s.emit("resume")),u(),s.paused||s.emit("drain"),s},s}});var Ha=m(($l,Wa)=>{function Jr(e){this.name="Bzip2Error",this.message=e,this.stack=new Error().stack}Jr.prototype=new Error;var G={Error:function(e){throw new Jr(e)}},ie={};ie.Bzip2Error=Jr;ie.crcTable=[0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188];ie.array=function(e){var t=0,r=0,i=[0,1,3,7,15,31,63,127,255];return function(n){for(var a=0;n>0;){var o=8-t;n>=o?(a<<=o,a|=i[o]&e[r++],t=0,n-=o):(a<<=n,a|=(e[r]&i[n]<<8-n-t)>>8-n-t,t+=n,n=0)}return a}};ie.simple=function(e,t){var r=ie.array(e),i=ie.header(r),n=!1,a=1e5*i,o=new Int32Array(a);do n=ie.decompress(r,t,o,a);while(!n)};ie.header=function(e){this.byteCount=new Int32Array(256),this.symToByte=new Uint8Array(256),this.mtfSymbol=new Int32Array(256),this.selectors=new Uint8Array(32768),e(8*3)!=4348520&&G.Error("No magic number found");var t=e(8)-48;return(t<1||t>9)&&G.Error("Not a BZIP archive"),t};ie.decompress=function(e,t,r,i,n){for(var a=20,o=258,s=0,u=1,x=50,l=-1,c="",f=0;f<6;f++)c+=e(8).toString(16);if(c=="177245385090"){var h=e(32)|0;return h!==n&&G.Error("Error in bzip2: crc32 do not match"),e(null),null}c!="314159265359"&&G.Error("eek not valid bzip data");var p=e(32)|0;e(1)&&G.Error("unsupported obsolete version");var _=e(24);_>i&&G.Error("Initial position larger than buffer size");var d=e(16),v=0;for(f=0;f<16;f++)if(d&1<<15-f){var g=e(16);for(P=0;P<16;P++)g&1<<15-P&&(this.symToByte[v++]=16*f+P)}var E=e(3);(E<2||E>6)&&G.Error("another error");var z=e(15);z==0&&G.Error("meh");for(var f=0;f<E;f++)this.mtfSymbol[f]=f;for(var f=0;f<z;f++){for(var P=0;e(1);P++)P>=E&&G.Error("whoops another error");for(var O=this.mtfSymbol[P],g=P-1;g>=0;g--)this.mtfSymbol[g+1]=this.mtfSymbol[g];this.mtfSymbol[0]=O,this.selectors[f]=O}for(var R=v+2,X=[],I=new Uint8Array(o),j=new Uint16Array(a+1),y,P=0;P<E;P++){d=e(5);for(var f=0;f<R;f++){for(;(d<1||d>a)&&G.Error("I gave up a while ago on writing error messages"),!!e(1);)e(1)?d--:d++;I[f]=d}var w,b;w=b=I[0];for(var f=1;f<R;f++)I[f]>b?b=I[f]:I[f]<w&&(w=I[f]);y=X[P]={},y.permute=new Int32Array(o),y.limit=new Int32Array(a+1),y.base=new Int32Array(a+1),y.minLen=w,y.maxLen=b;for(var C=y.base,D=y.limit,B=0,f=w;f<=b;f++)for(var d=0;d<R;d++)I[d]==f&&(y.permute[B++]=d);for(f=w;f<=b;f++)j[f]=D[f]=0;for(f=0;f<R;f++)j[I[f]]++;for(B=d=0,f=w;f<b;f++)B+=j[f],D[f]=B-1,B<<=1,C[f+1]=B-(d+=j[f]);D[b]=B+j[b]-1,C[w]=0}for(var f=0;f<256;f++)this.mtfSymbol[f]=f,this.byteCount[f]=0;var S,F,R,M;for(S=F=R=M=0;;){for(R--||(R=x-1,M>=z&&G.Error("meow i'm a kitty, that's an error"),y=X[this.selectors[M++]],C=y.base,D=y.limit),f=y.minLen,P=e(f);f>y.maxLen&&G.Error("rawr i'm a dinosaur"),!(P<=D[f]);)f++,P=P<<1|e(1);P-=C[f],(P<0||P>=o)&&G.Error("moo i'm a cow");var T=y.permute[P];if(T==s||T==u){S||(S=1,d=0),T==s?d+=S:d+=2*S,S<<=1;continue}if(S)for(S=0,F+d>i&&G.Error("Boom."),O=this.symToByte[this.mtfSymbol[0]],this.byteCount[O]+=d;d--;)r[F++]=O;if(T>v)break;F>=i&&G.Error("I can't think of anything. Error"),f=T-1,O=this.mtfSymbol[f];for(var g=f-1;g>=0;g--)this.mtfSymbol[g+1]=this.mtfSymbol[g];this.mtfSymbol[0]=O,O=this.symToByte[O],this.byteCount[O]++,r[F++]=O}(_<0||_>=F)&&G.Error("I'm a monkey and I'm throwing something at someone, namely you");for(var P=0,f=0;f<256;f++)g=P+this.byteCount[f],this.byteCount[f]=P,P=g;for(var f=0;f<F;f++)O=r[f]&255,r[this.byteCount[O]]|=f<<8,this.byteCount[O]++;var we=0,be=0,ur=0;F&&(we=r[_],be=we&255,we>>=8,ur=-1),F=F;for(var lr,cr,yt;F;){for(F--,cr=be,we=r[we],be=we&255,we>>=8,ur++==3?(lr=be,yt=cr,be=-1):(lr=1,yt=be);lr--;)l=(l<<8^this.crcTable[(l>>24^yt)&255])&4294967295,t(yt);be!=cr&&(ur=0)}return l=(l^-1)>>>0,(l|0)!=(p|0)&&G.Error("Error in bzip2: crc32 do not match"),n=(l^(n<<1|n>>>31))&4294967295,n};Wa.exports=ie});var Za=m((Gl,Ga)=>{var $a=[0,1,3,7,15,31,63,127,255];Ga.exports=function(t){var r=0,i=0,n=t(),a=function(o){if(o===null&&r!=0){r=0,i++;return}for(var s=0;o>0;){i>=n.length&&(i=0,n=t());var u=8-r;r===0&&o>0&&a.bytesRead++,o>=u?(s<<=u,s|=$a[u]&n[i++],r=0,o-=u):(s<<=o,s|=(n[i]&$a[o]<<8-o-r)>>8-o-r,r+=o,o=0)}return s};return a.bytesRead=0,a}});var Xa=m((Zl,Ka)=>{var Vf=Ua(),Ya=Ha(),Qf=Za();Ka.exports=Jf;function Jf(){var e=[],t=0,r=0,i=!1,n=!1,a=null,o=null;function s(l){if(r){var c=1e5*r,f=new Int32Array(c),h=[],p=function(_){h.push(_)};return o=Ya.decompress(a,p,f,c,o),o===null?(r=0,!1):(l(Buffer.from(h)),!0)}else return r=Ya.header(a),o=0,!0}var u=0;function x(l){if(!i)try{return s(function(c){l.queue(c),c!==null&&(u+=c.length)})}catch(c){return l.emit("error",c),i=!0,!1}}return Vf(function(c){for(e.push(c),t+=c.length,a===null&&(a=Qf(function(){return e.shift()}));!i&&t-a.bytesRead+1>=(25e3+1e5*r||4);)x(this)},function(c){for(;!i&&a&&t>a.bytesRead;)x(this);i||(o!==null&&this.emit("error",new Error("input stream ended prematurely")),this.queue(null))})}});var eo=m((Yl,Ja)=>{"use strict";var Va=Gt(),Qa=Ea(),eu=Rt(),tu=La(),ru=Xa();Ja.exports=()=>e=>!Buffer.isBuffer(e)&&!eu(e)?Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`)):Buffer.isBuffer(e)&&(!Qa(e)||Qa(e).ext!=="bz2")?Promise.resolve([]):Buffer.isBuffer(e)?Va()(tu.decode(e)):Va()(e.pipe(ru()))});var io=m((Kl,ro)=>{"use strict";var iu=require("zlib"),nu=Gt(),to=_r(),au=Rt();ro.exports=()=>e=>{if(!Buffer.isBuffer(e)&&!au(e))return Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`));if(Buffer.isBuffer(e)&&(!to(e)||to(e).ext!=="gz"))return Promise.resolve([]);let t=iu.createGunzip(),r=nu()(t);return Buffer.isBuffer(e)?t.end(e):e.pipe(t),r}});var ao=m((Xl,no)=>{"use strict";no.exports=function(e){return e&&e.length>1?e[0]===255&&e[1]===216&&e[2]===255?{ext:"jpg",mime:"image/jpeg"}:e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71?{ext:"png",mime:"image/png"}:e[0]===71&&e[1]===73&&e[2]===70?{ext:"gif",mime:"image/gif"}:e[8]===87&&e[9]===69&&e[10]===66&&e[11]===80?{ext:"webp",mime:"image/webp"}:e[0]===70&&e[1]===76&&e[2]===73&&e[3]===70?{ext:"flif",mime:"image/flif"}:(e[0]===73&&e[1]===73&&e[2]===42&&e[3]===0||e[0]===77&&e[1]===77&&e[2]===0&&e[3]===42)&&e[8]===67&&e[9]===82?{ext:"cr2",mime:"image/x-canon-cr2"}:e[0]===73&&e[1]===73&&e[2]===42&&e[3]===0||e[0]===77&&e[1]===77&&e[2]===0&&e[3]===42?{ext:"tif",mime:"image/tiff"}:e[0]===66&&e[1]===77?{ext:"bmp",mime:"image/bmp"}:e[0]===73&&e[1]===73&&e[2]===188?{ext:"jxr",mime:"image/vnd.ms-photo"}:e[0]===56&&e[1]===66&&e[2]===80&&e[3]===83?{ext:"psd",mime:"image/vnd.adobe.photoshop"}:e[0]===80&&e[1]===75&&e[2]===3&&e[3]===4&&e[30]===109&&e[31]===105&&e[32]===109&&e[33]===101&&e[34]===116&&e[35]===121&&e[36]===112&&e[37]===101&&e[38]===97&&e[39]===112&&e[40]===112&&e[41]===108&&e[42]===105&&e[43]===99&&e[44]===97&&e[45]===116&&e[46]===105&&e[47]===111&&e[48]===110&&e[49]===47&&e[50]===101&&e[51]===112&&e[52]===117&&e[53]===98&&e[54]===43&&e[55]===122&&e[56]===105&&e[57]===112?{ext:"epub",mime:"application/epub+zip"}:e[0]===80&&e[1]===75&&e[2]===3&&e[3]===4&&e[30]===77&&e[31]===69&&e[32]===84&&e[33]===65&&e[34]===45&&e[35]===73&&e[36]===78&&e[37]===70&&e[38]===47&&e[39]===109&&e[40]===111&&e[41]===122&&e[42]===105&&e[43]===108&&e[44]===108&&e[45]===97&&e[46]===46&&e[47]===114&&e[48]===115&&e[49]===97?{ext:"xpi",mime:"application/x-xpinstall"}:e[0]===80&&e[1]===75&&(e[2]===3||e[2]===5||e[2]===7)&&(e[3]===4||e[3]===6||e[3]===8)?{ext:"zip",mime:"application/zip"}:e[257]===117&&e[258]===115&&e[259]===116&&e[260]===97&&e[261]===114?{ext:"tar",mime:"application/x-tar"}:e[0]===82&&e[1]===97&&e[2]===114&&e[3]===33&&e[4]===26&&e[5]===7&&(e[6]===0||e[6]===1)?{ext:"rar",mime:"application/x-rar-compressed"}:e[0]===31&&e[1]===139&&e[2]===8?{ext:"gz",mime:"application/gzip"}:e[0]===66&&e[1]===90&&e[2]===104?{ext:"bz2",mime:"application/x-bzip2"}:e[0]===55&&e[1]===122&&e[2]===188&&e[3]===175&&e[4]===39&&e[5]===28?{ext:"7z",mime:"application/x-7z-compressed"}:e[0]===120&&e[1]===1?{ext:"dmg",mime:"application/x-apple-diskimage"}:e[0]===0&&e[1]===0&&e[2]===0&&(e[3]===24||e[3]===32)&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112||e[0]===51&&e[1]===103&&e[2]===112&&e[3]===53||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===109&&e[9]===112&&e[10]===52&&e[11]===50&&e[16]===109&&e[17]===112&&e[18]===52&&e[19]===49&&e[20]===109&&e[21]===112&&e[22]===52&&e[23]===50&&e[24]===105&&e[25]===115&&e[26]===111&&e[27]===109||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===105&&e[9]===115&&e[10]===111&&e[11]===109||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===109&&e[9]===112&&e[10]===52&&e[11]===50&&e[12]===0&&e[13]===0&&e[14]===0&&e[15]===0?{ext:"mp4",mime:"video/mp4"}:e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===77&&e[9]===52&&e[10]===86?{ext:"m4v",mime:"video/x-m4v"}:e[0]===77&&e[1]===84&&e[2]===104&&e[3]===100?{ext:"mid",mime:"audio/midi"}:e[31]===109&&e[32]===97&&e[33]===116&&e[34]===114&&e[35]===111&&e[36]===115&&e[37]===107&&e[38]===97?{ext:"mkv",mime:"video/x-matroska"}:e[0]===26&&e[1]===69&&e[2]===223&&e[3]===163?{ext:"webm",mime:"video/webm"}:e[0]===0&&e[1]===0&&e[2]===0&&e[3]===20&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112?{ext:"mov",mime:"video/quicktime"}:e[0]===82&&e[1]===73&&e[2]===70&&e[3]===70&&e[8]===65&&e[9]===86&&e[10]===73?{ext:"avi",mime:"video/x-msvideo"}:e[0]===48&&e[1]===38&&e[2]===178&&e[3]===117&&e[4]===142&&e[5]===102&&e[6]===207&&e[7]===17&&e[8]===166&&e[9]===217?{ext:"wmv",mime:"video/x-ms-wmv"}:e[0]===0&&e[1]===0&&e[2]===1&&e[3].toString(16)[0]==="b"?{ext:"mpg",mime:"video/mpeg"}:e[0]===73&&e[1]===68&&e[2]===51||e[0]===255&&e[1]===251?{ext:"mp3",mime:"audio/mpeg"}:e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===77&&e[9]===52&&e[10]===65||e[0]===77&&e[1]===52&&e[2]===65&&e[3]===32?{ext:"m4a",mime:"audio/m4a"}:e[28]===79&&e[29]===112&&e[30]===117&&e[31]===115&&e[32]===72&&e[33]===101&&e[34]===97&&e[35]===100?{ext:"opus",mime:"audio/opus"}:e[0]===79&&e[1]===103&&e[2]===103&&e[3]===83?{ext:"ogg",mime:"audio/ogg"}:e[0]===102&&e[1]===76&&e[2]===97&&e[3]===67?{ext:"flac",mime:"audio/x-flac"}:e[0]===82&&e[1]===73&&e[2]===70&&e[3]===70&&e[8]===87&&e[9]===65&&e[10]===86&&e[11]===69?{ext:"wav",mime:"audio/x-wav"}:e[0]===35&&e[1]===33&&e[2]===65&&e[3]===77&&e[4]===82&&e[5]===10?{ext:"amr",mime:"audio/amr"}:e[0]===37&&e[1]===80&&e[2]===68&&e[3]===70?{ext:"pdf",mime:"application/pdf"}:e[0]===77&&e[1]===90?{ext:"exe",mime:"application/x-msdownload"}:(e[0]===67||e[0]===70)&&e[1]===87&&e[2]===83?{ext:"swf",mime:"application/x-shockwave-flash"}:e[0]===123&&e[1]===92&&e[2]===114&&e[3]===116&&e[4]===102?{ext:"rtf",mime:"application/rtf"}:e[0]===119&&e[1]===79&&e[2]===70&&e[3]===70&&(e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0||e[4]===79&&e[5]===84&&e[6]===84&&e[7]===79)?{ext:"woff",mime:"application/font-woff"}:e[0]===119&&e[1]===79&&e[2]===70&&e[3]===50&&(e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0||e[4]===79&&e[5]===84&&e[6]===84&&e[7]===79)?{ext:"woff2",mime:"application/font-woff"}:e[34]===76&&e[35]===80&&(e[8]===0&&e[9]===0&&e[10]===1||e[8]===1&&e[9]===0&&e[10]===2||e[8]===2&&e[9]===0&&e[10]===2)?{ext:"eot",mime:"application/octet-stream"}:e[0]===0&&e[1]===1&&e[2]===0&&e[3]===0&&e[4]===0?{ext:"ttf",mime:"application/font-sfnt"}:e[0]===79&&e[1]===84&&e[2]===84&&e[3]===79&&e[4]===0?{ext:"otf",mime:"application/font-sfnt"}:e[0]===0&&e[1]===0&&e[2]===1&&e[3]===0?{ext:"ico",mime:"image/x-icon"}:e[0]===70&&e[1]===76&&e[2]===86&&e[3]===1?{ext:"flv",mime:"video/x-flv"}:e[0]===37&&e[1]===33?{ext:"ps",mime:"application/postscript"}:e[0]===253&&e[1]===55&&e[2]===122&&e[3]===88&&e[4]===90&&e[5]===0?{ext:"xz",mime:"application/x-xz"}:e[0]===83&&e[1]===81&&e[2]===76&&e[3]===105?{ext:"sqlite",mime:"application/x-sqlite3"}:e[0]===78&&e[1]===69&&e[2]===83&&e[3]===26?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:e[0]===67&&e[1]===114&&e[2]===50&&e[3]===52?{ext:"crx",mime:"application/x-google-chrome-extension"}:e[0]===77&&e[1]===83&&e[2]===67&&e[3]===70||e[0]===73&&e[1]===83&&e[2]===99&&e[3]===40?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:e[0]===33&&e[1]===60&&e[2]===97&&e[3]===114&&e[4]===99&&e[5]===104&&e[6]===62&&e[7]===10&&e[8]===100&&e[9]===101&&e[10]===98&&e[11]===105&&e[12]===97&&e[13]===110&&e[14]===45&&e[15]===98&&e[16]===105&&e[17]===110&&e[18]===97&&e[19]===114&&e[20]===121?{ext:"deb",mime:"application/x-deb"}:e[0]===33&&e[1]===60&&e[2]===97&&e[3]===114&&e[4]===99&&e[5]===104&&e[6]===62?{ext:"ar",mime:"application/x-unix-archive"}:e[0]===237&&e[1]===171&&e[2]===238&&e[3]===219?{ext:"rpm",mime:"application/x-rpm"}:e[0]===31&&e[1]===160||e[0]===31&&e[1]===157?{ext:"Z",mime:"application/x-compress"}:e[0]===76&&e[1]===90&&e[2]===73&&e[3]===80?{ext:"lz",mime:"application/x-lzip"}:e[0]===208&&e[1]===207&&e[2]===17&&e[3]===224&&e[4]===161&&e[5]===177&&e[6]===26&&e[7]===225?{ext:"msi",mime:"application/x-msi"}:null:null}});var ho=m((Vl,xo)=>{"use strict";var ti="pending",oo="settled",Yt="fulfilled",Kt="rejected",ou=function(){},so=typeof global<"u"&&typeof global.process<"u"&&typeof global.process.emit=="function",su=typeof setImmediate>"u"?setTimeout:setImmediate,ft=[],ei;function fu(){for(var e=0;e<ft.length;e++)ft[e][0](ft[e][1]);ft=[],ei=!1}function Xt(e,t){ft.push([e,t]),ei||(ei=!0,su(fu,0))}function uu(e,t){function r(n){ri(t,n)}function i(n){ut(t,n)}try{e(r,i)}catch(n){i(n)}}function fo(e){var t=e.owner,r=t._state,i=t._data,n=e[r],a=e.then;if(typeof n=="function"){r=Yt;try{i=n(i)}catch(o){ut(a,o)}}uo(a,i)||(r===Yt&&ri(a,i),r===Kt&&ut(a,i))}function uo(e,t){var r;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(t&&(typeof t=="function"||typeof t=="object")){var i=t.then;if(typeof i=="function")return i.call(t,function(n){r||(r=!0,t===n?lo(e,n):ri(e,n))},function(n){r||(r=!0,ut(e,n))}),!0}}catch(n){return r||ut(e,n),!0}return!1}function ri(e,t){(e===t||!uo(e,t))&&lo(e,t)}function lo(e,t){e._state===ti&&(e._state=oo,e._data=t,Xt(lu,e))}function ut(e,t){e._state===ti&&(e._state=oo,e._data=t,Xt(cu,e))}function co(e){e._then=e._then.forEach(fo)}function lu(e){e._state=Yt,co(e)}function cu(e){e._state=Kt,co(e),!e._handled&&so&&global.process.emit("unhandledRejection",e._data,e)}function xu(e){global.process.emit("rejectionHandled",e)}function V(e){if(typeof e!="function")throw new TypeError("Promise resolver "+e+" is not a function");if(!(this instanceof V))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],uu(e,this)}V.prototype={constructor:V,_state:ti,_then:null,_data:void 0,_handled:!1,then:function(e,t){var r={owner:this,then:new this.constructor(ou),fulfilled:e,rejected:t};return(t||e)&&!this._handled&&(this._handled=!0,this._state===Kt&&so&&Xt(xu,this)),this._state===Yt||this._state===Kt?Xt(fo,r):this._then.push(r),r.then},catch:function(e){return this.then(null,e)}};V.all=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.all().");return new V(function(t,r){var i=[],n=0;function a(u){return n++,function(x){i[u]=x,--n||t(i)}}for(var o=0,s;o<e.length;o++)s=e[o],s&&typeof s.then=="function"?s.then(a(o),r):i[o]=s;n||t(i)})};V.race=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.race().");return new V(function(t,r){for(var i=0,n;i<e.length;i++)n=e[i],n&&typeof n.then=="function"?n.then(t,r):t(n)})};V.resolve=function(e){return e&&typeof e=="object"&&e.constructor===V?e:new V(function(t){t(e)})};V.reject=function(e){return new V(function(t,r){r(e)})};xo.exports=V});var mo=m((Ql,po)=>{"use strict";po.exports=typeof Promise=="function"?Promise:ho()});var ii=m((Jl,yo)=>{"use strict";var _o=Object.getOwnPropertySymbols,du=Object.prototype.hasOwnProperty,hu=Object.prototype.propertyIsEnumerable;function pu(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function mu(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(i.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(a){n[a]=a}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}yo.exports=mu()?Object.assign:function(e,t){for(var r,i=pu(e),n,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var o in r)du.call(r,o)&&(i[o]=r[o]);if(_o){n=_o(r);for(var s=0;s<n.length;s++)hu.call(r,n[s])&&(i[n[s]]=r[n[s]])}}return i}});var go=m((ec,vo)=>{var _u=require("stream").PassThrough,yu=ii();vo.exports=function(e){e=yu({},e);var t=e.array,r=e.encoding,i=r==="buffer",n=!1;t?n=!(r||i):r=r||"utf8",i&&(r=null);var a=0,o=[],s=new _u({objectMode:n});return r&&s.setEncoding(r),s.on("data",function(u){o.push(u),n?a=o.length:a+=u.length}),s.getBufferedValue=function(){return t?o:i?Buffer.concat(o,a):o.join("")},s.getBufferedLength=function(){return a},s}});var bo=m((tc,Vt)=>{"use strict";var wo=mo(),ni=ii(),vu=go();function ai(e,t){if(!e)return wo.reject(new Error("Expected a stream"));t=ni({maxBuffer:1/0},t);var r=t.maxBuffer,i,n,a=new wo(function(o,s){i=vu(t),e.once("error",u),e.pipe(i),i.on("data",function(){i.getBufferedLength()>r&&s(new Error("maxBuffer exceeded"))}),i.once("error",u),i.on("end",o),n=function(){e.unpipe&&e.unpipe(i)};function u(x){x&&(x.bufferedData=i.getBufferedValue()),s(x)}});return a.then(n,n),a.then(function(){return i.getBufferedValue()})}Vt.exports=ai;Vt.exports.buffer=function(e,t){return ai(e,ni({},t,{encoding:"buffer"}))};Vt.exports.array=function(e,t){return ai(e,ni({},t,{array:!0}))}});var oi=m((rc,Fo)=>{"use strict";var Eo=function(e,t,r){return function(){for(var i=this,n=new Array(arguments.length),a=0;a<arguments.length;a++)n[a]=arguments[a];return new t(function(o,s){n.push(function(u,x){if(u)s(u);else if(r.multiArgs){for(var l=new Array(arguments.length-1),c=1;c<arguments.length;c++)l[c-1]=arguments[c];o(l)}else o(x)}),e.apply(i,n)})}},So=Fo.exports=function(e,t,r){typeof t!="function"&&(r=t,t=Promise),r=r||{},r.exclude=r.exclude||[/.+Sync$/];var i=function(a){var o=function(s){return typeof s=="string"?a===s:s.test(a)};return r.include?r.include.some(o):!r.exclude.some(o)},n=typeof e=="function"?function(){return r.excludeMain?e.apply(this,arguments):Eo(e,t,r).apply(this,arguments)}:{};return Object.keys(e).reduce(function(a,o){var s=e[o];return a[o]=typeof s=="function"&&i(o)?Eo(s,t,r):s,a},n)};So.all=So});var To=m((ic,Ao)=>{Ao.exports=Qt;function Qt(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}Qt.prototype.go=function(e){this.pending<this.max?Oo(this,e):this.waiting.push(e)};Qt.prototype.wait=function(e){this.pending===0?e(this.error):this.listeners.push(e)};Qt.prototype.hold=function(){return Ro(this)};function Ro(e){e.pending+=1;var t=!1;return r;function r(n){if(t)throw new Error("callback called twice");if(t=!0,e.error=e.error||n,e.pending-=1,e.waiting.length>0&&e.pending<e.max)Oo(e,e.waiting.shift());else if(e.pending===0){var a=e.listeners;e.listeners=[],a.forEach(i)}}function i(n){n(e.error)}}function Oo(e,t){t(Ro(e))}});var Co=m(ct=>{var lt=require("fs"),Jt=require("util"),si=require("stream"),Bo=si.Readable,fi=si.Writable,gu=si.PassThrough,wu=To(),er=require("events").EventEmitter;ct.createFromBuffer=bu;ct.createFromFd=Eu;ct.BufferSlicer=xe;ct.FdSlicer=ce;Jt.inherits(ce,er);function ce(e,t){t=t||{},er.call(this),this.fd=e,this.pend=new wu,this.pend.max=1,this.refCount=0,this.autoClose=!!t.autoClose}ce.prototype.read=function(e,t,r,i,n){var a=this;a.pend.go(function(o){lt.read(a.fd,e,t,r,i,function(s,u,x){o(),n(s,u,x)})})};ce.prototype.write=function(e,t,r,i,n){var a=this;a.pend.go(function(o){lt.write(a.fd,e,t,r,i,function(s,u,x){o(),n(s,u,x)})})};ce.prototype.createReadStream=function(e){return new tr(this,e)};ce.prototype.createWriteStream=function(e){return new rr(this,e)};ce.prototype.ref=function(){this.refCount+=1};ce.prototype.unref=function(){var e=this;if(e.refCount-=1,e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.autoClose&<.close(e.fd,t);function t(r){r?e.emit("error",r):e.emit("close")}};Jt.inherits(tr,Bo);function tr(e,t){t=t||{},Bo.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end,this.pos=this.start,this.destroyed=!1}tr.prototype._read=function(e){var t=this;if(!t.destroyed){var r=Math.min(t._readableState.highWaterMark,e);if(t.endOffset!=null&&(r=Math.min(r,t.endOffset-t.pos)),r<=0){t.destroyed=!0,t.push(null),t.context.unref();return}t.context.pend.go(function(i){if(t.destroyed)return i();var n=new Buffer(r);lt.read(t.context.fd,n,0,r,t.pos,function(a,o){a?t.destroy(a):o===0?(t.destroyed=!0,t.push(null),t.context.unref()):(t.pos+=o,t.push(n.slice(0,o))),i()})})}};tr.prototype.destroy=function(e){this.destroyed||(e=e||new Error("stream destroyed"),this.destroyed=!0,this.emit("error",e),this.context.unref())};Jt.inherits(rr,fi);function rr(e,t){t=t||{},fi.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end==null?1/0:+t.end,this.bytesWritten=0,this.pos=this.start,this.destroyed=!1,this.on("finish",this.destroy.bind(this))}rr.prototype._write=function(e,t,r){var i=this;if(!i.destroyed){if(i.pos+e.length>i.endOffset){var n=new Error("maximum file length exceeded");n.code="ETOOBIG",i.destroy(),r(n);return}i.context.pend.go(function(a){if(i.destroyed)return a();lt.write(i.context.fd,e,0,e.length,i.pos,function(o,s){o?(i.destroy(),a(),r(o)):(i.bytesWritten+=s,i.pos+=s,i.emit("progress"),a(),r())})})}};rr.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.context.unref())};Jt.inherits(xe,er);function xe(e,t){er.call(this),t=t||{},this.refCount=0,this.buffer=e,this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}xe.prototype.read=function(e,t,r,i,n){var a=i+r,o=a-this.buffer.length,s=o>0?o:r;this.buffer.copy(e,t,i,a),setImmediate(function(){n(null,s)})};xe.prototype.write=function(e,t,r,i,n){e.copy(this.buffer,i,t,t+r),setImmediate(function(){n(null,r,e)})};xe.prototype.createReadStream=function(e){e=e||{};var t=new gu(e);t.destroyed=!1,t.start=e.start||0,t.endOffset=e.end,t.pos=t.endOffset||this.buffer.length;for(var r=this.buffer.slice(t.start,t.pos),i=0;;){var n=i+this.maxChunkSize;if(n>=r.length){i<r.length&&t.write(r.slice(i,r.length));break}t.write(r.slice(i,n)),i=n}return t.end(),t.destroy=function(){t.destroyed=!0},t};xe.prototype.createWriteStream=function(e){var t=this;e=e||{};var r=new fi(e);return r.start=e.start||0,r.endOffset=e.end==null?this.buffer.length:+e.end,r.bytesWritten=0,r.pos=r.start,r.destroyed=!1,r._write=function(i,n,a){if(!r.destroyed){var o=r.pos+i.length;if(o>r.endOffset){var s=new Error("maximum file length exceeded");s.code="ETOOBIG",r.destroyed=!0,a(s);return}i.copy(t.buffer,r.pos,0,i.length),r.bytesWritten+=i.length,r.pos=o,r.emit("progress"),a()}},r.destroy=function(){r.destroyed=!0},r};xe.prototype.ref=function(){this.refCount+=1};xe.prototype.unref=function(){if(this.refCount-=1,this.refCount<0)throw new Error("invalid unref")};function bu(e,t){return new xe(e,t)}function Eu(e,t){return new ce(e,t)}});var qo=m((ac,Po)=>{var ye=require("buffer").Buffer,ui=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(ui=new Int32Array(ui));function Do(e){if(ye.isBuffer(e))return e;var t=typeof ye.alloc=="function"&&typeof ye.from=="function";if(typeof e=="number")return t?ye.alloc(e):new ye(e);if(typeof e=="string")return t?ye.from(e):new ye(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function Su(e){var t=Do(4);return t.writeInt32BE(e,0),t}function li(e,t){e=Do(e),ye.isBuffer(t)&&(t=t.readUInt32BE(0));for(var r=~~t^-1,i=0;i<e.length;i++)r=ui[(r^e[i])&255]^r>>>8;return r^-1}function ci(){return Su(li.apply(null,arguments))}ci.signed=function(){return li.apply(null,arguments)};ci.unsigned=function(){return li.apply(null,arguments)>>>0};Po.exports=ci});var Mo=m(ae=>{var xi=require("fs"),Fu=require("zlib"),ko=Co(),Ru=qo(),ar=require("util"),or=require("events").EventEmitter,Io=require("stream").Transform,di=require("stream").PassThrough,Ou=require("stream").Writable;ae.open=Au;ae.fromFd=zo;ae.fromBuffer=Tu;ae.fromRandomAccessReader=hi;ae.dosDateTimeToDate=Lo;ae.validateFileName=jo;ae.ZipFile=ve;ae.Entry=xt;ae.RandomAccessReader=ge;function Au(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose==null&&(t.autoClose=!0),t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1),r==null&&(r=nr),xi.open(e,"r",function(i,n){if(i)return r(i);zo(n,t,function(a,o){a&&xi.close(n,nr),r(a,o)})})}function zo(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose==null&&(t.autoClose=!1),t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1),r==null&&(r=nr),xi.fstat(e,function(i,n){if(i)return r(i);var a=ko.createFromFd(e,{autoClose:!0});hi(a,n.size,t,r)})}function Tu(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose=!1,t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1);var i=ko.createFromBuffer(e,{maxChunkSize:65536});hi(i,e.length,t,r)}function hi(e,t,r,i){typeof r=="function"&&(i=r,r=null),r==null&&(r={}),r.autoClose==null&&(r.autoClose=!0),r.lazyEntries==null&&(r.lazyEntries=!1),r.decodeStrings==null&&(r.decodeStrings=!0);var n=!!r.decodeStrings;if(r.validateEntrySizes==null&&(r.validateEntrySizes=!0),r.strictFileNames==null&&(r.strictFileNames=!1),i==null&&(i=nr),typeof t!="number")throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER)throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");e.ref();var a=22,o=65535,s=Math.min(a+o,t),u=ne(s),x=t-u.length;Ge(e,u,0,s,x,function(l){if(l)return i(l);for(var c=s-a;c>=0;c-=1)if(u.readUInt32LE(c)===101010256){var f=u.slice(c),h=f.readUInt16LE(4);if(h!==0)return i(new Error("multi-disk zip files are not supported: found disk number: "+h));var p=f.readUInt16LE(10),_=f.readUInt32LE(16),d=f.readUInt16LE(20),v=f.length-a;if(d!==v)return i(new Error("invalid comment length. expected: "+v+". found: "+d));var g=n?ir(f,22,f.length,!1):f.slice(22);if(!(p===65535||_===4294967295))return i(null,new ve(e,_,t,p,g,r.autoClose,r.lazyEntries,n,r.validateEntrySizes,r.strictFileNames));var E=ne(20),z=x+c-E.length;Ge(e,E,0,E.length,z,function(O){if(O)return i(O);if(E.readUInt32LE(0)!==117853008)return i(new Error("invalid zip64 end of central directory locator signature"));var X=Ze(E,8),I=ne(56);Ge(e,I,0,I.length,X,function(j){return j?i(j):I.readUInt32LE(0)!==101075792?i(new Error("invalid zip64 end of central directory record signature")):(p=Ze(I,32),_=Ze(I,48),i(null,new ve(e,_,t,p,g,r.autoClose,r.lazyEntries,n,r.validateEntrySizes,r.strictFileNames)))})});return}i(new Error("end of central directory record signature not found"))})}ar.inherits(ve,or);function ve(e,t,r,i,n,a,o,s,u,x){var l=this;or.call(l),l.reader=e,l.reader.on("error",function(c){No(l,c)}),l.reader.once("close",function(){l.emit("close")}),l.readEntryCursor=t,l.fileSize=r,l.entryCount=i,l.comment=n,l.entriesRead=0,l.autoClose=!!a,l.lazyEntries=!!o,l.decodeStrings=!!s,l.validateEntrySizes=!!u,l.strictFileNames=!!x,l.isOpen=!0,l.emittedError=!1,l.lazyEntries||l._readEntry()}ve.prototype.close=function(){this.isOpen&&(this.isOpen=!1,this.reader.unref())};function J(e,t){e.autoClose&&e.close(),No(e,t)}function No(e,t){e.emittedError||(e.emittedError=!0,e.emit("error",t))}ve.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()};ve.prototype._readEntry=function(){var e=this;if(e.entryCount===e.entriesRead){setImmediate(function(){e.autoClose&&e.close(),!e.emittedError&&e.emit("end")});return}if(!e.emittedError){var t=ne(46);Ge(e.reader,t,0,t.length,e.readEntryCursor,function(r){if(r)return J(e,r);if(!e.emittedError){var i=new xt,n=t.readUInt32LE(0);if(n!==33639248)return J(e,new Error("invalid central directory file header signature: 0x"+n.toString(16)));if(i.versionMadeBy=t.readUInt16LE(4),i.versionNeededToExtract=t.readUInt16LE(6),i.generalPurposeBitFlag=t.readUInt16LE(8),i.compressionMethod=t.readUInt16LE(10),i.lastModFileTime=t.readUInt16LE(12),i.lastModFileDate=t.readUInt16LE(14),i.crc32=t.readUInt32LE(16),i.compressedSize=t.readUInt32LE(20),i.uncompressedSize=t.readUInt32LE(24),i.fileNameLength=t.readUInt16LE(28),i.extraFieldLength=t.readUInt16LE(30),i.fileCommentLength=t.readUInt16LE(32),i.internalFileAttributes=t.readUInt16LE(36),i.externalFileAttributes=t.readUInt32LE(38),i.relativeOffsetOfLocalHeader=t.readUInt32LE(42),i.generalPurposeBitFlag&64)return J(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46,t=ne(i.fileNameLength+i.extraFieldLength+i.fileCommentLength),Ge(e.reader,t,0,t.length,e.readEntryCursor,function(a){if(a)return J(e,a);if(!e.emittedError){var o=(i.generalPurposeBitFlag&2048)!==0;i.fileName=e.decodeStrings?ir(t,0,i.fileNameLength,o):t.slice(0,i.fileNameLength);var s=i.fileNameLength+i.extraFieldLength,u=t.slice(i.fileNameLength,s);i.extraFields=[];for(var x=0;x<u.length-3;){var l=u.readUInt16LE(x+0),c=u.readUInt16LE(x+2),f=x+4,h=f+c;if(h>u.length)return J(e,new Error("extra field length exceeds extra field buffer size"));var p=ne(c);u.copy(p,0,f,h),i.extraFields.push({id:l,data:p}),x=h}if(i.fileComment=e.decodeStrings?ir(t,s,s+i.fileCommentLength,o):t.slice(s,s+i.fileCommentLength),i.comment=i.fileComment,e.readEntryCursor+=t.length,e.entriesRead+=1,i.uncompressedSize===4294967295||i.compressedSize===4294967295||i.relativeOffsetOfLocalHeader===4294967295){for(var _=null,x=0;x<i.extraFields.length;x++){var d=i.extraFields[x];if(d.id===1){_=d.data;break}}if(_==null)return J(e,new Error("expected zip64 extended information extra field"));var v=0;if(i.uncompressedSize===4294967295){if(v+8>_.length)return J(e,new Error("zip64 extended information extra field does not include uncompressed size"));i.uncompressedSize=Ze(_,v),v+=8}if(i.compressedSize===4294967295){if(v+8>_.length)return J(e,new Error("zip64 extended information extra field does not include compressed size"));i.compressedSize=Ze(_,v),v+=8}if(i.relativeOffsetOfLocalHeader===4294967295){if(v+8>_.length)return J(e,new Error("zip64 extended information extra field does not include relative header offset"));i.relativeOffsetOfLocalHeader=Ze(_,v),v+=8}}if(e.decodeStrings)for(var x=0;x<i.extraFields.length;x++){var d=i.extraFields[x];if(d.id===28789){if(d.data.length<6||d.data.readUInt8(0)!==1)continue;var g=d.data.readUInt32LE(1);if(Ru.unsigned(t.slice(0,i.fileNameLength))!==g)continue;i.fileName=ir(d.data,5,d.data.length,!0);break}}if(e.validateEntrySizes&&i.compressionMethod===0){var E=i.uncompressedSize;if(i.isEncrypted()&&(E+=12),i.compressedSize!==E){var z="compressed/uncompressed size mismatch for stored file: "+i.compressedSize+" != "+i.uncompressedSize;return J(e,new Error(z))}}if(e.decodeStrings){e.strictFileNames||(i.fileName=i.fileName.replace(/\\/g,"/"));var O=jo(i.fileName,e.validateFileNameOptions);if(O!=null)return J(e,new Error(O))}e.emit("entry",i),e.lazyEntries||e._readEntry()}})}})}};ve.prototype.openReadStream=function(e,t,r){var i=this,n=0,a=e.compressedSize;if(r==null)r=t,t={};else{if(t.decrypt!=null){if(!e.isEncrypted())throw new Error("options.decrypt can only be specified for encrypted entries");if(t.decrypt!==!1)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()&&t.decompress!==!1)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}if(t.decompress!=null){if(!e.isCompressed())throw new Error("options.decompress can only be specified for compressed entries");if(!(t.decompress===!1||t.decompress===!0))throw new Error("invalid options.decompress value: "+t.decompress)}if(t.start!=null||t.end!=null){if(e.isCompressed()&&t.decompress!==!1)throw new Error("start/end range not allowed for compressed entry without options.decompress === false");if(e.isEncrypted()&&t.decrypt!==!1)throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}if(t.start!=null){if(n=t.start,n<0)throw new Error("options.start < 0");if(n>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(t.end!=null){if(a=t.end,a<0)throw new Error("options.end < 0");if(a>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(a<n)throw new Error("options.end < options.start")}}if(!i.isOpen)return r(new Error("closed"));if(e.isEncrypted()&&t.decrypt!==!1)return r(new Error("entry is encrypted, and options.decrypt !== false"));i.reader.ref();var o=ne(30);Ge(i.reader,o,0,o.length,e.relativeOffsetOfLocalHeader,function(s){try{if(s)return r(s);var u=o.readUInt32LE(0);if(u!==67324752)return r(new Error("invalid local file header signature: 0x"+u.toString(16)));var x=o.readUInt16LE(26),l=o.readUInt16LE(28),c=e.relativeOffsetOfLocalHeader+o.length+x+l,f;if(e.compressionMethod===0)f=!1;else if(e.compressionMethod===8)f=t.decompress!=null?t.decompress:!0;else return r(new Error("unsupported compression method: "+e.compressionMethod));var h=c,p=h+e.compressedSize;if(e.compressedSize!==0&&p>i.fileSize)return r(new Error("file data overflows file bounds: "+h+" + "+e.compressedSize+" > "+i.fileSize));var _=i.reader.createReadStream({start:h+n,end:h+a}),d=_;if(f){var v=!1,g=Fu.createInflateRaw();_.on("error",function(E){setImmediate(function(){v||g.emit("error",E)})}),_.pipe(g),i.validateEntrySizes?(d=new dt(e.uncompressedSize),g.on("error",function(E){setImmediate(function(){v||d.emit("error",E)})}),g.pipe(d)):d=g,d.destroy=function(){v=!0,g!==d&&g.unpipe(d),_.unpipe(g),_.destroy()}}r(null,d)}finally{i.reader.unref()}})};function xt(){}xt.prototype.getLastModDate=function(){return Lo(this.lastModFileDate,this.lastModFileTime)};xt.prototype.isEncrypted=function(){return(this.generalPurposeBitFlag&1)!==0};xt.prototype.isCompressed=function(){return this.compressionMethod===8};function Lo(e,t){var r=e&31,i=(e>>5&15)-1,n=(e>>9&127)+1980,a=0,o=(t&31)*2,s=t>>5&63,u=t>>11&31;return new Date(n,i,r,u,s,o,a)}function jo(e){return e.indexOf("\\")!==-1?"invalid characters in fileName: "+e:/^[a-zA-Z]:/.test(e)||/^\//.test(e)?"absolute path: "+e:e.split("/").indexOf("..")!==-1?"invalid relative path: "+e:null}function Ge(e,t,r,i,n,a){if(i===0)return setImmediate(function(){a(null,ne(0))});e.read(t,r,i,n,function(o,s){if(o)return a(o);if(s<i)return a(new Error("unexpected EOF"));a()})}ar.inherits(dt,Io);function dt(e){Io.call(this),this.actualByteCount=0,this.expectedByteCount=e}dt.prototype._transform=function(e,t,r){if(this.actualByteCount+=e.length,this.actualByteCount>this.expectedByteCount){var i="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return r(new Error(i))}r(null,e)};dt.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()};ar.inherits(ge,or);function ge(){or.call(this),this.refCount=0}ge.prototype.ref=function(){this.refCount+=1};ge.prototype.unref=function(){var e=this;if(e.refCount-=1,e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.close(t);function t(r){if(r)return e.emit("error",r);e.emit("close")}};ge.prototype.createReadStream=function(e){var t=e.start,r=e.end;if(t===r){var i=new di;return setImmediate(function(){i.end()}),i}var n=this._readStreamForRange(t,r),a=!1,o=new sr(this);n.on("error",function(u){setImmediate(function(){a||o.emit("error",u)})}),o.destroy=function(){n.unpipe(o),o.unref(),n.destroy()};var s=new dt(r-t);return o.on("error",function(u){setImmediate(function(){a||s.emit("error",u)})}),s.destroy=function(){a=!0,o.unpipe(s),o.destroy()},n.pipe(o).pipe(s)};ge.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")};ge.prototype.read=function(e,t,r,i,n){var a=this.createReadStream({start:i,end:i+r}),o=new Ou,s=0;o._write=function(u,x,l){u.copy(e,t+s,0,u.length),s+=u.length,l()},o.on("finish",n),a.on("error",function(u){n(u)}),a.pipe(o)};ge.prototype.close=function(e){setImmediate(e)};ar.inherits(sr,di);function sr(e){di.call(this),this.context=e,this.context.ref(),this.unreffedYet=!1}sr.prototype._flush=function(e){this.unref(),e()};sr.prototype.unref=function(e){this.unreffedYet||(this.unreffedYet=!0,this.context.unref())};var Bu="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";function ir(e,t,r,i){if(i)return e.toString("utf8",t,r);for(var n="",a=t;a<r;a++)n+=Bu[e[a]];return n}function Ze(e,t){var r=e.readUInt32LE(t),i=e.readUInt32LE(t+4);return i*4294967296+r}var ne;typeof Buffer.allocUnsafe=="function"?ne=function(e){return Buffer.allocUnsafe(e)}:ne=function(e){return new Buffer(e)};function nr(e){if(e)throw e}});var $o=m((sc,Ho)=>{"use strict";var Uo=ao(),Cu=bo(),Wo=oi(),Du=Mo(),Pu=(e,t)=>{let a=e.versionMadeBy>>8;return(t&61440)===40960?"symlink":(t&61440)===16384||a===0&&e.externalFileAttributes===16?"directory":"file"},qu=(e,t)=>{let r={mode:e.externalFileAttributes>>16&65535,mtime:e.getLastModDate(),path:e.fileName};return r.type=Pu(e,r.mode),r.mode===0&&r.type==="directory"&&(r.mode=493),r.mode===0&&(r.mode=420),Wo(t.openReadStream.bind(t))(e).then(Cu.buffer).then(i=>(r.data=i,r.type==="symlink"&&(r.linkname=i.toString()),r)).catch(i=>{throw t.close(),i})},ku=e=>new Promise((t,r)=>{let i=[];e.readEntry(),e.on("entry",n=>{qu(n,e).catch(r).then(a=>{i.push(a),e.readEntry()})}),e.on("error",r),e.on("end",()=>t(i))});Ho.exports=()=>e=>Buffer.isBuffer(e)?!Uo(e)||Uo(e).ext!=="zip"?Promise.resolve([]):Wo(Du.fromBuffer)(e,{lazyEntries:!0}).then(ku):Promise.reject(new TypeError(`Expected a Buffer, got ${typeof e}`))});var Yo=m((fc,Zo)=>{"use strict";var Go=(e,t)=>function(){let r=t.promiseModule,i=new Array(arguments.length);for(let n=0;n<arguments.length;n++)i[n]=arguments[n];return new r((n,a)=>{t.errorFirst?i.push(function(o,s){if(t.multiArgs){let u=new Array(arguments.length-1);for(let x=1;x<arguments.length;x++)u[x-1]=arguments[x];o?(u.unshift(o),a(u)):n(u)}else o?a(o):n(s)}):i.push(function(o){if(t.multiArgs){let s=new Array(arguments.length-1);for(let u=0;u<arguments.length;u++)s[u]=arguments[u];n(s)}else n(o)}),e.apply(this,i)})};Zo.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=n=>{let a=o=>typeof o=="string"?n===o:o.test(n);return t.include?t.include.some(a):!t.exclude.some(a)},i;typeof e=="function"?i=function(){return t.excludeMain?e.apply(this,arguments):Go(e,t).apply(this,arguments)}:i=Object.create(Object.getPrototypeOf(e));for(let n in e){let a=e[n];i[n]=typeof a=="function"&&r(n)?Go(a,t):a}return i}});var Qo=m((uc,pi)=>{"use strict";var Iu=require("fs"),Te=require("path"),Ko=Yo(),Xo={mode:511&~process.umask(),fs:Iu},Vo=e=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(Te.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}};pi.exports=(e,t)=>Promise.resolve().then(()=>{Vo(e),t=Object.assign({},Xo,t);let r=Ko(t.fs.mkdir),i=Ko(t.fs.stat),n=a=>r(a,t.mode).then(()=>a).catch(o=>{if(o.code==="ENOENT"){if(o.message.includes("null bytes")||Te.dirname(a)===a)throw o;return n(Te.dirname(a)).then(()=>n(a))}return i(a).then(s=>s.isDirectory()?a:Promise.reject()).catch(()=>{throw o})});return n(Te.resolve(e))});pi.exports.sync=(e,t)=>{Vo(e),t=Object.assign({},Xo,t);let r=i=>{try{t.fs.mkdirSync(i,t.mode)}catch(n){if(n.code==="ENOENT"){if(n.message.includes("null bytes")||Te.dirname(i)===i)throw n;return r(Te.dirname(i)),r(i)}try{if(!t.fs.statSync(i).isDirectory())throw new Error("The path is not a directory")}catch{throw n}}return i};return r(Te.resolve(e))}});var es=m((lc,Jo)=>{"use strict";Jo.exports=function(t,r){if(r){if(typeof r!="object")throw new TypeError(String(r)+" is not an object. Expected an object that has boolean `includeZero` property.");if("includeZero"in r){if(typeof r.includeZero!="boolean")throw new TypeError(String(r.includeZero)+" is neither true nor false. `includeZero` option must be a Boolean value.");if(r.includeZero&&t===0)return!0}}return Number.isSafeInteger(t)&&t>=1}});var rs=m((cc,ts)=>{"use strict";var ht=require("path"),pt=require("util"),zu=es();ts.exports=function(t,r,i){if(typeof t!="string")throw new TypeError(pt.inspect(t)+" is not a string. First argument to strip-dirs must be a path string.");if(ht.posix.isAbsolute(t)||ht.win32.isAbsolute(t))throw new Error(`${t} is an absolute path. strip-dirs requires a relative path.`);if(!zu(r,{includeZero:!0}))throw new Error("The Second argument of strip-dirs must be a natural number or 0, but received "+pt.inspect(r)+".");if(i){if(typeof i!="object")throw new TypeError(pt.inspect(i)+" is not an object. Expected an object with a boolean `disallowOverflow` property.");if(Array.isArray(i))throw new TypeError(pt.inspect(i)+" is an array. Expected an object with a boolean `disallowOverflow` property.");if("disallowOverflow"in i&&typeof i.disallowOverflow!="boolean")throw new TypeError(pt.inspect(i.disallowOverflow)+" is neither true nor false. `disallowOverflow` option must be a Boolean value.")}else i={disallowOverflow:!1};let n=ht.normalize(t).split(ht.sep);if(n.length>1&&n[0]==="."&&n.shift(),r>n.length-1){if(i.disallowOverflow)throw new RangeError("Cannot strip more directories than there are.");r=n.length-1}return ht.join.apply(null,n.slice(r))}});var ns=m((xc,is)=>{"use strict";var fr=require("path"),Nu=Ii(),Lu=Gt(),ju=eo(),Mu=io(),Uu=$o(),mi=Qo(),Wu=oi(),Hu=rs(),Q=Wu(Nu),$u=(e,t)=>t.plugins.length===0?Promise.resolve([]):Promise.all(t.plugins.map(r=>r(e,t))).then(r=>r.reduce((i,n)=>i.concat(n))),_i=(e,t)=>Q.realpath(e).catch(r=>{let i=fr.dirname(e);return _i(i,t)}).then(r=>{if(r.indexOf(t)!==0)throw new Error("Refusing to create a directory outside the output path.");return mi(e).then(Q.realpath)}),Gu=(e,t)=>Q.readlink(e).catch(r=>null).then(r=>{if(r)throw new Error("Refusing to write into a symlink");return t}),Zu=(e,t,r)=>$u(e,r).then(i=>(r.strip>0&&(i=i.map(n=>(n.path=Hu(n.path,r.strip),n)).filter(n=>n.path!==".")),typeof r.filter=="function"&&(i=i.filter(r.filter)),typeof r.map=="function"&&(i=i.map(r.map)),t?Promise.all(i.map(n=>{let a=fr.join(t,n.path),o=n.mode&~process.umask(),s=new Date;return n.type==="directory"?mi(t).then(u=>Q.realpath(u)).then(u=>_i(a,u)).then(()=>Q.utimes(a,s,n.mtime)).then(()=>n):mi(t).then(u=>Q.realpath(u)).then(u=>_i(fr.dirname(a),u).then(()=>u)).then(u=>n.type==="file"?Gu(a,u):u).then(u=>Q.realpath(fr.dirname(a)).then(x=>{if(x.indexOf(u)!==0)throw new Error("Refusing to write outside output directory: "+x)})).then(()=>n.type==="link"||n.type==="symlink"&&process.platform==="win32"?Q.link(n.linkname,a):n.type==="symlink"?Q.symlink(n.linkname,a):Q.writeFile(a,n.data,{mode:o})).then(()=>n.type==="file"&&Q.utimes(a,s,n.mtime)).then(()=>n)})):i));is.exports=(e,t,r)=>typeof e!="string"&&!Buffer.isBuffer(e)?Promise.reject(new TypeError("Input file required")):(typeof t=="object"&&(r=t,t=null),r=Object.assign({plugins:[Lu(),ju(),Mu(),Uu()]},r),(typeof e=="string"?Q.readFile(e):Promise.resolve(e)).then(n=>Zu(n,t,r)))});var Vu={};hs(Vu,{AZUREAUTH_NAME:()=>vi,install:()=>fs});module.exports=ps(Vu);var Ye=gt(require("node:path"),1),de=gt(require("node:fs"),1),os=gt(Fi(),1),ss=gt(ns(),1),Yu="0.8.4";async function Ku(e,t){let r=new os.DownloaderHelper(e,t);return new Promise((i,n)=>{r.on("end",()=>i()),r.on("error",a=>n(a)),r.on("progress.throttled",a=>{let o=a.progress<100?a.progress.toPrecision(2):100;console.info(`Downloaded: ${o}%`)}),r.start()})}var _t=process.platform,as=process.arch,mt={name:"azureauth",url:"https://github.com/AzureAD/microsoft-authentication-cli/releases/download/",version:Yu},yi={def:"azureauth",win32:"azureauth.exe",linux:"azureauth.exe"},vi=_t in yi?yi[_t]:yi.def,fs=async()=>{let e=Ye.default.join(__dirname,"..","bin"),t=i=>{try{return de.default.existsSync(i)}catch{return!1}};if(de.default.existsSync(e)||(de.default.mkdirSync(e,{recursive:!0}),console.info(`${e} directory was created`)),t(Ye.default.join(e,"azureauth",vi))){console.log("azureauth is already installed");return}let r={win32:{x64:`azureauth-${mt.version}-win10-x64.zip`},darwin:{x64:`azureauth-${mt.version}-osx-x64.tar.gz`,arm64:`azureauth-${mt.version}-osx-arm64.tar.gz`}};if(_t in r){let i="";if(as in r[_t])i=r[_t][as];else throw new Error("Arch is not supported in azureauth");let n=`${mt.url}${mt.version}/${i}`,a=Ye.default.join(e,"azureauth"),o=Ye.default.join(e,i);console.log(`Downloading azureauth from ${n}`);try{await Ku(n,e)}catch(u){throw new Error(`Download failed: ${u.message}`)}console.log(`Downloaded in ${e}`),de.default.mkdirSync(a,{recursive:!0});let s=Ye.default.join(a,vi);await(0,ss.default)(o,a),t(s)&&(de.default.chmodSync(s,de.default.constants.S_IXUSR||64),de.default.chmodSync(s,493)),console.log(`Unzipped in ${o}`),de.default.unlinkSync(o)}};async function Xu(){for(let t=0;t<3;t++){try{await fs();break}catch(r){console.log(`Install failed: ${r.message}`)}if(t===2)throw new Error("Install failed after 3 attempts")}}Xu().catch(e=>{console.error(e),process.exit(1)});0&&(module.exports={AZUREAUTH_NAME,install});
|
|
1
|
+
"use strict";var pu=Object.create;var kt=Object.defineProperty;var mu=Object.getOwnPropertyDescriptor;var yu=Object.getOwnPropertyNames;var vu=Object.getPrototypeOf,_u=Object.prototype.hasOwnProperty;var d=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gu=(e,t)=>{for(var r in t)kt(e,r,{get:t[r],enumerable:!0})},_n=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of yu(t))!_u.call(e,n)&&n!==r&&kt(e,n,{get:()=>t[n],enumerable:!(i=mu(t,n))||i.enumerable});return e};var jt=(e,t,r)=>(r=e!=null?pu(vu(e)):{},_n(t||!e||!e.__esModule?kt(r,"default",{value:e,enumerable:!0}):r,e)),wu=e=>_n(kt({},"__esModule",{value:!0}),e);var Sn=d(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.DownloaderHelper=Ie.DH_STATES=void 0;var Wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bu=function(){function e(t,r){for(var i,n=0;n<r.length;n++)i=r[n],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),Eu=require("fs"),V=Nt(Eu),De=require("url"),Su=require("path"),Fe=Nt(Su),Au=require("http"),gn=Nt(Au),Fu=require("https"),wn=Nt(Fu),Ou=require("events");function Nt(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function Ru(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Pu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var En=Ie.DH_STATES={IDLE:"IDLE",SKIPPED:"SKIPPED",STARTED:"STARTED",DOWNLOADING:"DOWNLOADING",RETRY:"RETRY",PAUSED:"PAUSED",RESUMED:"RESUMED",STOPPED:"STOPPED",FINISHED:"FINISHED",FAILED:"FAILED"},Gh=Ie.DownloaderHelper=function(e){function t(r,i){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{};Ru(this,t);var o=bn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{captureRejections:!0}));return o.__validate(r,i)?(o.url=o.requestURL=r.trim(),o.state=En.IDLE,o.__defaultOpts={body:null,retry:!1,method:"GET",headers:{},fileName:"",timeout:-1,metadata:null,override:!1,forceResume:!1,removeOnStop:!0,removeOnFail:!0,progressThrottle:1e3,httpRequestOptions:{},httpsRequestOptions:{},resumeOnIncomplete:!0,resumeIfFileExists:!1,resumeOnIncompleteMaxRetry:5},o.__opts=Object.assign({},o.__defaultOpts),o.__pipes=[],o.__total=0,o.__downloaded=0,o.__progress=0,o.__retryCount=0,o.__retryTimeout=null,o.__resumeRetryCount=0,o.__states=En,o.__promise=null,o.__request=null,o.__response=null,o.__isAborted=!1,o.__isResumed=!1,o.__isResumable=!1,o.__isRedirected=!1,o.__destFolder=i,o.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},o.__fileName="",o.__filePath="",o.updateOptions(n),o):bn(o)}return Pu(t,e),bu(t,[{key:"start",value:function(){var i=this,n=function(){return new Promise(function(o,a){i.__promise={resolve:o,reject:a},i.__start()})};return this.__opts.resumeIfFileExists&&this.state!==this.__states.RESUMED?this.getTotalSize().then(function(o){var a=o.name,s=o.total,f=i.__opts.override;if(i.__opts.override=!0,i.__filePath=i.__getFilePath(a),i.__opts.override=f,i.__filePath&&V.existsSync(i.__filePath)){var c=i.__getFilesizeInBytes(i.__filePath);return c===s?n():i.resumeFromFile(i.__filePath,{total:s,fileName:a})}return n()}):n()}},{key:"pause",value:function(){var i=this;return this.state===this.__states.STOPPED?Promise.resolve(!0):(this.__response&&(this.__response.unpipe(),this.__pipes.forEach(function(n){return n.stream.unpipe()})),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then(function(){return i.__setState(i.__states.PAUSED),i.emit("pause"),!0}))}},{key:"resume",value:function(){return this.__promise?this.state===this.__states.STOPPED?Promise.resolve(!1):(this.__setState(this.__states.RESUMED),this.__isResumable&&(this.__isResumed=!0,this.__reqOptions.headers.range="bytes="+this.__downloaded+"-"),this.emit("resume",this.__isResumed),this.__start()):this.start()}},{key:"stop",value:function(){var i=this;if(this.state===this.__states.STOPPED)return Promise.resolve(!0);var n=function(){return new Promise(function(o,a){V.access(i.__filePath,function(s){return s?(i.__emitStop(),o(!0)):void V.unlink(i.__filePath,function(f){return f?(i.__setState(i.__states.FAILED),i.emit("error",f),a(f)):(i.__emitStop(),void o(!0))})})})};return this.__requestAbort(),this.__closeFileStream().then(function(){return i.__opts.removeOnStop?n():(i.__emitStop(),Promise.resolve(!0))})}},{key:"pipe",value:function(i){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;return this.__pipes.push({stream:i,options:n}),i}},{key:"unpipe",value:function(){var i=this,n=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null,o=function(s){return i.__response?i.__response.unpipe(s):s.unpipe()};if(n){var a=this.__pipes.find(function(s){return s.stream===n});return void(a&&(o(n),this.__pipes=this.__pipes.filter(function(s){return s.stream!==n})))}this.__pipes.forEach(function(s){return o(s.stream)}),this.__pipes=[]}},{key:"getDownloadPath",value:function(){return this.__filePath}},{key:"isResumable",value:function(){return this.__isResumable}},{key:"updateOptions",value:function(i){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"";this.__opts=Object.assign({},this.__opts,i),this.__headers=this.__opts.headers,-1<this.__opts.timeout&&(this.__opts.httpRequestOptions.timeout=this.__opts.timeout,this.__opts.httpsRequestOptions.timeout=this.__opts.timeout),(typeof this.__opts.progressThrottle!="number"||0>this.__opts.progressThrottle)&&(this.__opts.progressThrottle=this.__defaultOpts.progressThrottle),this.url=n||this.url,this.__reqOptions=this.__getReqOptions(this.__opts.method,this.url,this.__opts.headers),this.__initProtocol(this.url)}},{key:"getOptions",value:function(){return this.__opts}},{key:"getMetadata",value:function(){return this.__opts.metadata}},{key:"getStats",value:function(){return{total:this.__total,name:this.__fileName,downloaded:this.__downloaded,progress:this.__progress,speed:this.__statsEstimate.bytes}}},{key:"getTotalSize",value:function(){var i=this;return new Promise(function(n,o){var a=function(f){i.__initProtocol(f);var c=Object.assign({},i.__headers);c.hasOwnProperty("range")&&delete c.range;var l=i.__getReqOptions("HEAD",f,c);return Object.assign({},i.__reqOptions,l)},s=function(f,c){var l=i.__protocol.request(c,function(x){if(i.__isRequireRedirect(x)){var u=/^https?:\/\//.test(x.headers.location)?x.headers.location:new De.URL(x.headers.location,f).href;return i.emit("redirected",u,f),s(u,a(u))}return x.statusCode===200?void n({name:i.__getFileNameFromHeaders(x.headers,x),total:parseInt(x.headers["content-length"])||null}):o(new Error("Response status was "+x.statusCode))});l.on("error",function(x){return o(x)}),l.on("timeout",function(){return o(new Error("timeout"))}),l.on("uncaughtException",function(x){return o(x)}),l.end()};s(i.url,a(i.url))})}},{key:"getResumeState",value:function(){return{downloaded:this.__downloaded,filePath:this.__filePath,fileName:this.__fileName,total:this.__total}}},{key:"resumeFromFile",value:function(i){var n=this,o=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};return this.__opts.override=!0,this.__filePath=i,(o.total&&o.fileName?Promise.resolve({name:o.fileName,total:o.total}):this.getTotalSize()).then(function(a){var s=a.name,f=a.total;return n.__total=o.total||f,n.__fileName=o.fileName||s,n.__downloaded=o.downloaded||n.__getFilesizeInBytes(n.__filePath),n.__reqOptions.headers.range="bytes="+n.__downloaded+"-",n.__isResumed=!0,n.__isResumable=!0,n.__setState(n.__states.RESUMED),n.emit("resume",n.__isResumed),new Promise(function(c,l){n.__promise={resolve:c,reject:l},n.__start()})})}},{key:"__start",value:function(){this.__isRedirected||this.state===this.__states.RESUMED||(this.emit("start"),this.__setState(this.__states.STARTED),this.__initProtocol(this.url)),this.__response=null,this.__isAborted=!1,this.__request&&!this.__request.destroyed&&this.__request.destroy(),this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__request=this.__downloadRequest(this.__promise.resolve,this.__promise.reject),this.__request.on("error",this.__onError(this.__promise.resolve,this.__promise.reject)),this.__request.on("timeout",this.__onTimeout(this.__promise.resolve,this.__promise.reject)),this.__request.on("uncaughtException",this.__onError(this.__promise.resolve,this.__promise.reject,!0)),this.__opts.body&&this.__request.write(this.__opts.body),this.__request.end()}},{key:"__resolvePending",value:function(){if(this.__promise){var i=this.__promise.resolve;return this.__promise=null,i(!0)}}},{key:"__downloadRequest",value:function(i,n){var o=this;return this.__protocol.request(this.__reqOptions,function(a){if(o.__response=a,o.__isResumed||(o.__total=parseInt(a.headers["content-length"])||null,o.__resetStats()),o.__isRequireRedirect(a)){var s=/^https?:\/\//.test(a.headers.location)?a.headers.location:new De.URL(a.headers.location,o.url).href;return o.__isRedirected=!0,o.__initProtocol(s),o.emit("redirected",s,o.url),o.__start()}if(a.statusCode!==200&&a.statusCode!==206){var f=new Error("Response status was "+a.statusCode);return f.status=a.statusCode||0,f.body=a.body||"",o.__setState(o.__states.FAILED),o.emit("error",f),n(f)}(o.__opts.forceResume||a.headers.hasOwnProperty("accept-ranges")&&a.headers["accept-ranges"]!=="none")&&(o.__isResumable=!0),o.__startDownload(a,i,n)})}},{key:"__startDownload",value:function(i,n,o){var a=this,s=i;if(this.__isResumed)this.__fileStream=V.createWriteStream(this.__filePath,{flags:"a"});else{var f=this.__getFileNameFromHeaders(i.headers);if(this.__filePath=this.__getFilePath(f),this.__fileName=this.__filePath.split(Fe.sep).pop(),V.existsSync(this.__filePath)){var c=this.__getFilesizeInBytes(this.__filePath),l=this.__total?this.__total:0;if(Wr(this.__opts.override)==="object"&&this.__opts.override.skip&&(this.__opts.override.skipSmaller||c>=l))return this.emit("skip",{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:c}),this.__setState(this.__states.SKIPPED),n(!0)}this.__fileStream=V.createWriteStream(this.__filePath,{})}this.emit("download",{fileName:this.__fileName,filePath:this.__filePath,totalSize:this.__total,isResumed:this.__isResumed,downloadedSize:this.__downloaded}),this.__retryCount=0,this.__isResumed=!1,this.__isRedirected=!1,this.__setState(this.__states.DOWNLOADING),this.__statsEstimate.time=new Date,this.__statsEstimate.throttleTime=new Date,s.on("data",function(x){return a.__calculateStats(x.length)}),this.__pipes.forEach(function(x){s.pipe(x.stream,x.options),s=x.stream}),s.pipe(this.__fileStream),s.on("error",this.__onError(n,o)),this.__fileStream.on("finish",this.__onFinished(n,o)),this.__fileStream.on("error",this.__onError(n,o))}},{key:"__hasFinished",value:function(){return!this.__isAborted&&[this.__states.PAUSED,this.__states.STOPPED,this.__states.RETRY,this.__states.FAILED,this.__states.RESUMED].indexOf(this.state)===-1}},{key:"__isRequireRedirect",value:function(i){return 300<i.statusCode&&400>i.statusCode&&i.headers.hasOwnProperty("location")&&i.headers.location}},{key:"__onFinished",value:function(i,n){var o=this;return function(){o.__fileStream.close(function(a){if(a)return n(a);if(o.__hasFinished()){var s=!!o.__total&&o.__downloaded!==o.__total;if(s&&o.__isResumable&&o.__opts.resumeOnIncomplete&&o.__resumeRetryCount<=o.__opts.resumeOnIncompleteMaxRetry)return o.__resumeRetryCount++,o.emit("warning",new Error("uncomplete download, retrying")),o.resume();o.__setState(o.__states.FINISHED),o.__pipes=[],o.emit("end",{fileName:o.__fileName,filePath:o.__filePath,totalSize:o.__total,incomplete:s,onDiskSize:o.__getFilesizeInBytes(o.__filePath),downloadedSize:o.__downloaded})}return i(o.__downloaded===o.__total)})}}},{key:"__closeFileStream",value:function(){var i=this;return this.__fileStream?new Promise(function(n,o){i.__fileStream.close(function(a){return a?o(a):n(!0)})}):Promise.resolve(!0)}},{key:"__onError",value:function(i,n){var o=this,a=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return function(s){return o.__pipes=[],a&&o.__requestAbort(),o.state===o.__states.STOPPED||o.state===o.__states.FAILED?void 0:o.__opts.retry?o.__retry(s).catch(function(f){o.__removeFile().finally(function(){o.__setState(o.__states.FAILED),o.emit("error",f||s),n(f||s)})}):o.__removeFile().finally(function(){o.__setState(o.__states.FAILED),o.emit("error",s),n(s)})}}},{key:"__retry",value:function(){var i=this,n=0<arguments.length&&arguments[0]!==void 0?arguments[0]:null;if(!this.__opts.retry||Wr(this.__opts.retry)!=="object")return Promise.reject(n||new Error("wrong retry options"));var o=this.__opts.retry,a=o.delay,s=a===void 0?0:a,f=o.maxRetries,c=f===void 0?999:f;return this.__retryCount>=c?Promise.reject(n||new Error("reached the maximum retries")):(this.__retryCount++,this.__setState(this.__states.RETRY),this.emit("retry",this.__retryCount,this.__opts.retry,n),this.__response&&(this.__response.unpipe(),this.__pipes.forEach(function(l){return l.stream.unpipe()})),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then(function(){return new Promise(function(l){return i.__retryTimeout=setTimeout(function(){return l(0<i.__downloaded?i.resume():i.__start())},s)})}))}},{key:"__onTimeout",value:function(i,n){var o=this;return function(){return o.__requestAbort(),o.__opts.retry?o.__retry(new Error("timeout")).catch(function(a){o.__removeFile().finally(function(){o.__setState(o.__states.FAILED),a?n(a):(o.emit("timeout"),n(new Error("timeout")))})}):o.__removeFile().finally(function(){o.__setState(o.__states.FAILED),o.emit("timeout"),n(new Error("timeout"))})}}},{key:"__resetStats",value:function(){this.__retryCount=0,this.__downloaded=0,this.__progress=0,this.__resumeRetryCount=0,this.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0}}},{key:"__getFileNameFromHeaders",value:function(i,n){var o="",a=/.*filename\*=.*?'.*?'([^"].+?[^"])(?:(?:;)|$)/i,s=/.*filename="(.*?)";?/i,f=/.*filename=([^"].+?[^"])(?:(?:;)|$)/i,c=i.hasOwnProperty("content-disposition"),l=c?i["content-disposition"].match(a):null,x=!c||l?null:i["content-disposition"].match(s),u=!c||l||x?null:i["content-disposition"].match(f);return c&&(l||x||u)?(o=i["content-disposition"],o=o.trim(),l?o=l[1]:x?o=x[1]:u&&(o=u[1]),o=o.replace(/[/\\]/g,"")):0<Fe.basename(new De.URL(this.requestURL).pathname).length?o=Fe.basename(new De.URL(this.requestURL).pathname):o=new De.URL(this.requestURL).hostname+".html",this.__opts.fileName?this.__getFileNameFromOpts(o,n):o.replace(/\.*$/,"")}},{key:"__getFilePath",value:function(i){var n=Fe.join(this.__destFolder,i),o=n;return this.__opts.override||this.state===this.__states.RESUMED||(o=this.__uniqFileNameSync(o),n!==o&&this.emit("renamed",{path:o,fileName:o.split(Fe.sep).pop(),prevPath:n,prevFileName:n.split(Fe.sep).pop()})),o}},{key:"__getFileNameFromOpts",value:function(i,n){if(!this.__opts.fileName)return i;if(typeof this.__opts.fileName=="string")return this.__opts.fileName;if(typeof this.__opts.fileName=="function"){var o=Fe.join(this.__destFolder,i);return n&&n.headers||this.__response&&this.__response.headers?this.__opts.fileName(i,o,(n||this.__response).headers["content-type"]):this.__opts.fileName(i,o)}if(Wr(this.__opts.fileName)==="object"){var a=this.__opts.fileName,s=a.name,f=!!a.hasOwnProperty("ext")&&a.ext;if(typeof f=="string")return s+"."+f;if(typeof f=="boolean"){if(f)return s;var c=i.includes(".")?i.split(".").pop():"";return c===""?s:s+"."+c}}return i}},{key:"__calculateStats",value:function(i){var n=new Date,o=n-this.__statsEstimate.time,a=n-this.__statsEstimate.throttleTime,s=this.__total||0;i&&(this.__downloaded+=i,this.__progress=s===0?0:100*(this.__downloaded/s),(this.__downloaded===s||1e3<o)&&(this.__statsEstimate.time=n,this.__statsEstimate.bytes=this.__downloaded-this.__statsEstimate.prevBytes,this.__statsEstimate.prevBytes=this.__downloaded),(this.__downloaded===s||a>this.__opts.progressThrottle)&&(this.__statsEstimate.throttleTime=n,this.emit("progress.throttled",this.getStats())),this.emit("progress",this.getStats()))}},{key:"__setState",value:function(i){this.state=i,this.emit("stateChanged",this.state)}},{key:"__getReqOptions",value:function(i,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{},a=new De.URL(n),s={protocol:a.protocol,host:a.hostname,port:a.port,path:a.pathname+a.search,method:i};return o&&(s.headers=o),s}},{key:"__getFilesizeInBytes",value:function(i){try{var n=V.statSync(i,{throwIfNoEntry:!1}),o=n.size||0;return o}catch(a){this.emit("warning",a)}return 0}},{key:"__validate",value:function(i,n){if(typeof i!="string")throw new Error("URL should be an string");if(i.trim()==="")throw new Error("URL couldn't be empty");if(typeof n!="string")throw new Error("Destination Folder should be an string");if(n.trim()==="")throw new Error("Destination Folder couldn't be empty");if(!V.existsSync(n))throw new Error("Destination Folder must exist");var o=V.statSync(n);if(!o.isDirectory())throw new Error("Destination Folder must be a directory");try{V.accessSync(n,V.constants.W_OK)}catch{throw new Error("Destination Folder must be writable")}return!0}},{key:"__initProtocol",value:function(i){var n=this.__getReqOptions(this.__opts.method,i,this.__headers);this.requestURL=i,-1<i.indexOf("https://")?(this.__protocol=wn,n.agent=new wn.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},n,this.__opts.httpsRequestOptions)):(this.__protocol=gn,n.agent=new gn.Agent({keepAlive:!1}),this.__reqOptions=Object.assign({},n,this.__opts.httpRequestOptions))}},{key:"__uniqFileNameSync",value:function(i){if(typeof i!="string"||i==="")return i;try{V.accessSync(i,V.F_OK);var n=i.match(/(.*)(\([0-9]+\))(\..*)$/),o=n?n[1].trim():i,a=n?parseInt(n[2].replace(/\(|\)/,"")):0,s=i.split(".").pop();return s!==i&&0<s.length?(s="."+s,o=o.replace(s,"")):s="",this.__uniqFileNameSync(o+" ("+ ++a+")"+s)}catch{return i}}},{key:"__removeFile",value:function(){var i=this;return new Promise(function(n){return i.__fileStream?void i.__fileStream.close(function(o){return o&&i.emit("warning",o),i.__opts.removeOnFail?V.access(i.__filePath,function(a){return a?n():void V.unlink(i.__filePath,function(s){s&&i.emit("warning",o),n()})}):void n()}):n()})}},{key:"__requestAbort",value:function(){this.__isAborted=!0,this.__retryTimeout&&(clearTimeout(this.__retryTimeout),this.__retryTimeout=null),this.__response&&this.__response.destroy(),this.__request&&(this.__request.destroy?this.__request.destroy():this.__request.abort())}},{key:"__emitStop",value:function(){this.__resolvePending(),this.__setState(this.__states.STOPPED),this.emit("stop")}}]),t}(Ou.EventEmitter)});var Fn=d((Zh,An)=>{var ye=require("constants"),Tu=process.cwd,Ut=null,Bu=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Ut||(Ut=Tu.call(process)),Ut};try{process.cwd()}catch{}typeof process.chdir=="function"&&($r=process.chdir,process.chdir=function(e){Ut=null,$r.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,$r));var $r;An.exports=Cu;function Cu(e){ye.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=o(e.chown),e.fchown=o(e.fchown),e.lchown=o(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=a(e.chownSync),e.fchownSync=a(e.fchownSync),e.lchownSync=a(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=s(e.stat),e.fstat=s(e.fstat),e.lstat=s(e.lstat),e.statSync=f(e.statSync),e.fstatSync=f(e.fstatSync),e.lstatSync=f(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(l,x,u){u&&process.nextTick(u)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(l,x,u,h){h&&process.nextTick(h)},e.lchownSync=function(){}),Bu==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(l){function x(u,h,m){var y=Date.now(),p=0;l(u,h,function _(g){if(g&&(g.code==="EACCES"||g.code==="EPERM"||g.code==="EBUSY")&&Date.now()-y<6e4){setTimeout(function(){e.stat(h,function(E,N){E&&E.code==="ENOENT"?l(u,h,_):m(g)})},p),p<100&&(p+=10);return}m&&m(g)})}return Object.setPrototypeOf&&Object.setPrototypeOf(x,l),x}(e.rename)),e.read=typeof e.read!="function"?e.read:function(l){function x(u,h,m,y,p,_){var g;if(_&&typeof _=="function"){var E=0;g=function(N,R,J){if(N&&N.code==="EAGAIN"&&E<10)return E++,l.call(e,u,h,m,y,p,g);_.apply(this,arguments)}}return l.call(e,u,h,m,y,p,g)}return Object.setPrototypeOf&&Object.setPrototypeOf(x,l),x}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(l){return function(x,u,h,m,y){for(var p=0;;)try{return l.call(e,x,u,h,m,y)}catch(_){if(_.code==="EAGAIN"&&p<10){p++;continue}throw _}}}(e.readSync);function t(l){l.lchmod=function(x,u,h){l.open(x,ye.O_WRONLY|ye.O_SYMLINK,u,function(m,y){if(m){h&&h(m);return}l.fchmod(y,u,function(p){l.close(y,function(_){h&&h(p||_)})})})},l.lchmodSync=function(x,u){var h=l.openSync(x,ye.O_WRONLY|ye.O_SYMLINK,u),m=!0,y;try{y=l.fchmodSync(h,u),m=!1}finally{if(m)try{l.closeSync(h)}catch{}else l.closeSync(h)}return y}}function r(l){ye.hasOwnProperty("O_SYMLINK")&&l.futimes?(l.lutimes=function(x,u,h,m){l.open(x,ye.O_SYMLINK,function(y,p){if(y){m&&m(y);return}l.futimes(p,u,h,function(_){l.close(p,function(g){m&&m(_||g)})})})},l.lutimesSync=function(x,u,h){var m=l.openSync(x,ye.O_SYMLINK),y,p=!0;try{y=l.futimesSync(m,u,h),p=!1}finally{if(p)try{l.closeSync(m)}catch{}else l.closeSync(m)}return y}):l.futimes&&(l.lutimes=function(x,u,h,m){m&&process.nextTick(m)},l.lutimesSync=function(){})}function i(l){return l&&function(x,u,h){return l.call(e,x,u,function(m){c(m)&&(m=null),h&&h.apply(this,arguments)})}}function n(l){return l&&function(x,u){try{return l.call(e,x,u)}catch(h){if(!c(h))throw h}}}function o(l){return l&&function(x,u,h,m){return l.call(e,x,u,h,function(y){c(y)&&(y=null),m&&m.apply(this,arguments)})}}function a(l){return l&&function(x,u,h){try{return l.call(e,x,u,h)}catch(m){if(!c(m))throw m}}}function s(l){return l&&function(x,u,h){typeof u=="function"&&(h=u,u=null);function m(y,p){p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),h&&h.apply(this,arguments)}return u?l.call(e,x,u,m):l.call(e,x,m)}}function f(l){return l&&function(x,u){var h=u?l.call(e,x,u):l.call(e,x);return h&&(h.uid<0&&(h.uid+=4294967296),h.gid<0&&(h.gid+=4294967296)),h}}function c(l){if(!l||l.code==="ENOSYS")return!0;var x=!process.getuid||process.getuid()!==0;return!!(x&&(l.code==="EINVAL"||l.code==="EPERM"))}}});var Pn=d((Kh,Rn)=>{var On=require("stream").Stream;Rn.exports=qu;function qu(e){return{ReadStream:t,WriteStream:r};function t(i,n){if(!(this instanceof t))return new t(i,n);On.call(this);var o=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,n=n||{};for(var a=Object.keys(n),s=0,f=a.length;s<f;s++){var c=a[s];this[c]=n[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}e.open(this.path,this.flags,this.mode,function(l,x){if(l){o.emit("error",l),o.readable=!1;return}o.fd=x,o.emit("open",x),o._read()})}function r(i,n){if(!(this instanceof r))return new r(i,n);On.call(this),this.path=i,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var o=Object.keys(n),a=0,s=o.length;a<s;a++){var f=o[a];this[f]=n[f]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Bn=d((Vh,Tn)=>{"use strict";Tn.exports=Iu;var Du=Object.getPrototypeOf||function(e){return e.__proto__};function Iu(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:Du(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var In=d((Xh,Yr)=>{var U=require("fs"),ku=Fn(),ju=Pn(),Nu=Bn(),Lt=require("util"),H,Mt;typeof Symbol=="function"&&typeof Symbol.for=="function"?(H=Symbol.for("graceful-fs.queue"),Mt=Symbol.for("graceful-fs.previous")):(H="___graceful-fs.queue",Mt="___graceful-fs.previous");function Uu(){}function Dn(e,t){Object.defineProperty(e,H,{get:function(){return t}})}var Oe=Uu;Lt.debuglog?Oe=Lt.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Oe=function(){var e=Lt.format.apply(Lt,arguments);e="GFS4: "+e.split(/\n/).join(`
|
|
2
|
+
GFS4: `),console.error(e)});U[H]||(Cn=global[H]||[],Dn(U,Cn),U.close=function(e){function t(r,i){return e.call(U,r,function(n){n||qn(),typeof i=="function"&&i.apply(this,arguments)})}return Object.defineProperty(t,Mt,{value:e}),t}(U.close),U.closeSync=function(e){function t(r){e.apply(U,arguments),qn()}return Object.defineProperty(t,Mt,{value:e}),t}(U.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Oe(U[H]),require("assert").equal(U[H].length,0)}));var Cn;global[H]||Dn(global,U[H]);Yr.exports=Hr(Nu(U));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!U.__patched&&(Yr.exports=Hr(U),U.__patched=!0);function Hr(e){ku(e),e.gracefulify=Hr,e.createReadStream=R,e.createWriteStream=J;var t=e.readFile;e.readFile=r;function r(v,w,b){return typeof w=="function"&&(b=w,w=null),C(v,w,b);function C(q,B,A,F){return t(q,B,function(O){O&&(O.code==="EMFILE"||O.code==="ENFILE")?ke([C,[q,B,A],O,F||Date.now(),Date.now()]):typeof A=="function"&&A.apply(this,arguments)})}}var i=e.writeFile;e.writeFile=n;function n(v,w,b,C){return typeof b=="function"&&(C=b,b=null),q(v,w,b,C);function q(B,A,F,O,M){return i(B,A,F,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?ke([q,[B,A,F,O],T,M||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}var o=e.appendFile;o&&(e.appendFile=a);function a(v,w,b,C){return typeof b=="function"&&(C=b,b=null),q(v,w,b,C);function q(B,A,F,O,M){return o(B,A,F,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?ke([q,[B,A,F,O],T,M||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}var s=e.copyFile;s&&(e.copyFile=f);function f(v,w,b,C){return typeof b=="function"&&(C=b,b=0),q(v,w,b,C);function q(B,A,F,O,M){return s(B,A,F,function(T){T&&(T.code==="EMFILE"||T.code==="ENFILE")?ke([q,[B,A,F,O],T,M||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}var c=e.readdir;e.readdir=x;var l=/^v[0-5]\./;function x(v,w,b){typeof w=="function"&&(b=w,w=null);var C=l.test(process.version)?function(A,F,O,M){return c(A,q(A,F,O,M))}:function(A,F,O,M){return c(A,F,q(A,F,O,M))};return C(v,w,b);function q(B,A,F,O){return function(M,T){M&&(M.code==="EMFILE"||M.code==="ENFILE")?ke([C,[B,A,F],M,O||Date.now(),Date.now()]):(T&&T.sort&&T.sort(),typeof F=="function"&&F.call(this,M,T))}}}if(process.version.substr(0,4)==="v0.8"){var u=ju(e);_=u.ReadStream,E=u.WriteStream}var h=e.ReadStream;h&&(_.prototype=Object.create(h.prototype),_.prototype.open=g);var m=e.WriteStream;m&&(E.prototype=Object.create(m.prototype),E.prototype.open=N),Object.defineProperty(e,"ReadStream",{get:function(){return _},set:function(v){_=v},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return E},set:function(v){E=v},enumerable:!0,configurable:!0});var y=_;Object.defineProperty(e,"FileReadStream",{get:function(){return y},set:function(v){y=v},enumerable:!0,configurable:!0});var p=E;Object.defineProperty(e,"FileWriteStream",{get:function(){return p},set:function(v){p=v},enumerable:!0,configurable:!0});function _(v,w){return this instanceof _?(h.apply(this,arguments),this):_.apply(Object.create(_.prototype),arguments)}function g(){var v=this;z(v.path,v.flags,v.mode,function(w,b){w?(v.autoClose&&v.destroy(),v.emit("error",w)):(v.fd=b,v.emit("open",b),v.read())})}function E(v,w){return this instanceof E?(m.apply(this,arguments),this):E.apply(Object.create(E.prototype),arguments)}function N(){var v=this;z(v.path,v.flags,v.mode,function(w,b){w?(v.destroy(),v.emit("error",w)):(v.fd=b,v.emit("open",b))})}function R(v,w){return new e.ReadStream(v,w)}function J(v,w){return new e.WriteStream(v,w)}var j=e.open;e.open=z;function z(v,w,b,C){return typeof b=="function"&&(C=b,b=null),q(v,w,b,C);function q(B,A,F,O,M){return j(B,A,F,function(T,D){T&&(T.code==="EMFILE"||T.code==="ENFILE")?ke([q,[B,A,F,O],T,M||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}return e}function ke(e){Oe("ENQUEUE",e[0].name,e[1]),U[H].push(e),Gr()}var zt;function qn(){for(var e=Date.now(),t=0;t<U[H].length;++t)U[H][t].length>2&&(U[H][t][3]=e,U[H][t][4]=e);Gr()}function Gr(){if(clearTimeout(zt),zt=void 0,U[H].length!==0){var e=U[H].shift(),t=e[0],r=e[1],i=e[2],n=e[3],o=e[4];if(n===void 0)Oe("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-n>=6e4){Oe("TIMEOUT",t.name,r);var a=r.pop();typeof a=="function"&&a.call(null,i)}else{var s=Date.now()-o,f=Math.max(o-n,1),c=Math.min(f*1.2,100);s>=c?(Oe("RETRY",t.name,r),t.apply(null,r.concat([n]))):U[H].push(e)}zt===void 0&&(zt=setTimeout(Gr,0))}}});var Zr=d((Jh,kn)=>{"use strict";kn.exports=e=>{let t=new Uint8Array(e);if(!(t&&t.length>1))return null;let r=(i,n)=>{n=Object.assign({offset:0},n);for(let o=0;o<i.length;o++)if(i[o]!==t[o+n.offset])return!1;return!0};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])&&r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r([80,75,3,4])&&r([77,69,84,65,45,73,78,70,47,109,111,122,105,108,108,97,46,114,115,97],{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([0,0,0])&&(t[3]===24||t[3]===32)&&r([102,116,121,112],{offset:4})||r([51,103,112,53])||r([0,0,0,28,102,116,121,112,109,112,52,50])&&r([109,112,52,49,109,112,52,50,105,115,111,109],{offset:16})||r([0,0,0,28,102,116,121,112,105,115,111,109])||r([0,0,0,28,102,116,121,112,109,112,52,50,0,0,0,0]))return{ext:"mp4",mime:"video/mp4"};if(r([0,0,0,28,102,116,121,112,77,52,86]))return{ext:"m4v",mime:"video/x-m4v"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let i=t.subarray(4,4100),n=i.findIndex((o,a,s)=>s[a]===66&&s[a+1]===130);if(n>=0){let o=n+3,a=s=>Array.from(s).every((f,c)=>i[o+c]===f.charCodeAt(0));if(a("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(a("webm"))return{ext:"webm",mime:"video/webm"}}}return r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4})?{ext:"mov",mime:"video/quicktime"}:r([82,73,70,70])&&r([65,86,73],{offset:8})?{ext:"avi",mime:"video/x-msvideo"}:r([48,38,178,117,142,102,207,17,166,217])?{ext:"wmv",mime:"video/x-ms-wmv"}:r([0,0,1,186])?{ext:"mpg",mime:"video/mpeg"}:r([73,68,51])||r([255,251])?{ext:"mp3",mime:"audio/mpeg"}:r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32])?{ext:"m4a",mime:"audio/m4a"}:r([79,112,117,115,72,101,97,100],{offset:28})?{ext:"opus",mime:"audio/opus"}:r([79,103,103,83])?{ext:"ogg",mime:"audio/ogg"}:r([102,76,97,67])?{ext:"flac",mime:"audio/x-flac"}:r([82,73,70,70])&&r([87,65,86,69],{offset:8})?{ext:"wav",mime:"audio/x-wav"}:r([35,33,65,77,82,10])?{ext:"amr",mime:"audio/amr"}:r([37,80,68,70])?{ext:"pdf",mime:"application/pdf"}:r([77,90])?{ext:"exe",mime:"application/x-msdownload"}:(t[0]===67||t[0]===70)&&r([87,83],{offset:1})?{ext:"swf",mime:"application/x-shockwave-flash"}:r([123,92,114,116,102])?{ext:"rtf",mime:"application/rtf"}:r([0,97,115,109])?{ext:"wasm",mime:"application/wasm"}:r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff",mime:"font/woff"}:r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff2",mime:"font/woff2"}:r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8}))?{ext:"eot",mime:"application/octet-stream"}:r([0,1,0,0,0])?{ext:"ttf",mime:"font/ttf"}:r([79,84,84,79,0])?{ext:"otf",mime:"font/otf"}:r([0,0,1,0])?{ext:"ico",mime:"image/x-icon"}:r([70,76,86,1])?{ext:"flv",mime:"video/x-flv"}:r([37,33])?{ext:"ps",mime:"application/postscript"}:r([253,55,122,88,90,0])?{ext:"xz",mime:"application/x-xz"}:r([83,81,76,105])?{ext:"sqlite",mime:"application/x-sqlite3"}:r([78,69,83,26])?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:r([67,114,50,52])?{ext:"crx",mime:"application/x-google-chrome-extension"}:r([77,83,67,70])||r([73,83,99,40])?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121])?{ext:"deb",mime:"application/x-deb"}:r([33,60,97,114,99,104,62])?{ext:"ar",mime:"application/x-unix-archive"}:r([237,171,238,219])?{ext:"rpm",mime:"application/x-rpm"}:r([31,160])||r([31,157])?{ext:"Z",mime:"application/x-compress"}:r([76,90,73,80])?{ext:"lz",mime:"application/x-lzip"}:r([208,207,17,224,161,177,26,225])?{ext:"msi",mime:"application/x-msi"}:r([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196}))?{ext:"mts",mime:"video/mp2t"}:r([66,76,69,78,68,69,82])?{ext:"blend",mime:"application/x-blender"}:r([66,80,71,251])?{ext:"bpg",mime:"image/bpg"}:null}});var Wt=d((Qh,jn)=>{"use strict";var ue=jn.exports=function(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"};ue.writable=function(e){return ue(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object"};ue.readable=function(e){return ue(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object"};ue.duplex=function(e){return ue.writable(e)&&ue.readable(e)};ue.transform=function(e){return ue.duplex(e)&&typeof e._transform=="function"&&typeof e._transformState=="object"}});var ft=d((ep,Kr)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?Kr.exports={nextTick:Lu}:Kr.exports=process;function Lu(e,t,r,i){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,o,a;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,r)});case 4:return process.nextTick(function(){e.call(null,t,r,i)});default:for(o=new Array(n-1),a=0;a<o.length;)o[a++]=arguments[a];return process.nextTick(function(){e.apply(null,o)})}}});var Un=d((tp,Nn)=>{var zu={}.toString;Nn.exports=Array.isArray||function(e){return zu.call(e)=="[object Array]"}});var Vr=d((rp,Ln)=>{Ln.exports=require("stream")});var ut=d((Xr,Mn)=>{var $t=require("buffer"),le=$t.Buffer;function zn(e,t){for(var r in e)t[r]=e[r]}le.from&&le.alloc&&le.allocUnsafe&&le.allocUnsafeSlow?Mn.exports=$t:(zn($t,Xr),Xr.Buffer=je);function je(e,t,r){return le(e,t,r)}zn(le,je);je.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return le(e,t,r)};je.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=le(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};je.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return le(e)};je.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return $t.SlowBuffer(e)}});var Ne=d(K=>{function Mu(e){return Array.isArray?Array.isArray(e):Ht(e)==="[object Array]"}K.isArray=Mu;function Wu(e){return typeof e=="boolean"}K.isBoolean=Wu;function $u(e){return e===null}K.isNull=$u;function Hu(e){return e==null}K.isNullOrUndefined=Hu;function Gu(e){return typeof e=="number"}K.isNumber=Gu;function Yu(e){return typeof e=="string"}K.isString=Yu;function Zu(e){return typeof e=="symbol"}K.isSymbol=Zu;function Ku(e){return e===void 0}K.isUndefined=Ku;function Vu(e){return Ht(e)==="[object RegExp]"}K.isRegExp=Vu;function Xu(e){return typeof e=="object"&&e!==null}K.isObject=Xu;function Ju(e){return Ht(e)==="[object Date]"}K.isDate=Ju;function Qu(e){return Ht(e)==="[object Error]"||e instanceof Error}K.isError=Qu;function el(e){return typeof e=="function"}K.isFunction=el;function tl(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}K.isPrimitive=tl;K.isBuffer=require("buffer").Buffer.isBuffer;function Ht(e){return Object.prototype.toString.call(e)}});var Wn=d((np,Jr)=>{typeof Object.create=="function"?Jr.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Jr.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var Ue=d((op,ei)=>{try{if(Qr=require("util"),typeof Qr.inherits!="function")throw"";ei.exports=Qr.inherits}catch{ei.exports=Wn()}var Qr});var Hn=d((ap,ti)=>{"use strict";function rl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var $n=ut().Buffer,lt=require("util");function il(e,t,r){e.copy(t,r)}ti.exports=function(){function e(){rl(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},e.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},e.prototype.concat=function(r){if(this.length===0)return $n.alloc(0);for(var i=$n.allocUnsafe(r>>>0),n=this.head,o=0;n;)il(n.data,i,o),o+=n.data.length,n=n.next;return i},e}();lt&<.inspect&<.inspect.custom&&(ti.exports.prototype[lt.inspect.custom]=function(){var e=lt.inspect({length:this.length});return this.constructor.name+" "+e})});var ri=d((sp,Gn)=>{"use strict";var Gt=ft();function nl(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Gt.nextTick(Yt,this,e)):Gt.nextTick(Yt,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,Gt.nextTick(Yt,r,o)):Gt.nextTick(Yt,r,o):t&&t(o)}),this)}function ol(){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 Yt(e,t){e.emit("error",t)}Gn.exports={destroy:nl,undestroy:ol}});var Zn=d((fp,Yn)=>{Yn.exports=require("util").deprecate});var ni=d((up,ro)=>{"use strict";var Re=ft();ro.exports=W;function Vn(e){var t=this;this.next=null,this.entry=null,this.finish=function(){El(t,e)}}var al=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Re.nextTick,Le;W.WritableState=xt;var Xn=Object.create(Ne());Xn.inherits=Ue();var sl={deprecate:Zn()},Jn=Vr(),Kt=ut().Buffer,fl=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function ul(e){return Kt.from(e)}function ll(e){return Kt.isBuffer(e)||e instanceof fl}var Qn=ri();Xn.inherits(W,Jn);function cl(){}function xt(e,t){Le=Le||Pe(),e=e||{};var r=t instanceof Le;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=e.writableHighWaterMark,o=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){vl(t,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Vn(this)}xt.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(xt.prototype,"buffer",{get:sl.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Zt;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Zt=Function.prototype[Symbol.hasInstance],Object.defineProperty(W,Symbol.hasInstance,{value:function(e){return Zt.call(this,e)?!0:this!==W?!1:e&&e._writableState instanceof xt}})):Zt=function(e){return e instanceof this};function W(e){if(Le=Le||Pe(),!Zt.call(W,this)&&!(this instanceof Le))return new W(e);this._writableState=new xt(e,this),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)),Jn.call(this)}W.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function xl(e,t){var r=new Error("write after end");e.emit("error",r),Re.nextTick(t,r)}function dl(e,t,r,i){var n=!0,o=!1;return r===null?o=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),Re.nextTick(i,o),n=!1),n}W.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&ll(e);return o&&!Kt.isBuffer(e)&&(e=ul(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=cl),i.ended?xl(this,r):(o||dl(this,i,e,r))&&(i.pendingcb++,n=pl(this,i,o,e,t,r)),n};W.prototype.cork=function(){var e=this._writableState;e.corked++};W.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&eo(this,e))};W.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function hl(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Kt.from(t,r)),t}Object.defineProperty(W.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function pl(e,t,r,i,n,o){if(!r){var a=hl(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=t.objectMode?1:i.length;t.length+=s;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else ii(e,t,!1,s,i,n,o);return f}function ii(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function ml(e,t,r,i,n){--t.pendingcb,r?(Re.nextTick(n,i),Re.nextTick(ct,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),ct(e,t))}function yl(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function vl(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(yl(r),t)ml(e,r,i,t,n);else{var o=to(r);!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&eo(e,r),i?al(Kn,e,r,o,n):Kn(e,r,o,n)}}function Kn(e,t,r,i){r||_l(e,t),t.pendingcb--,i(),ct(e,t)}function _l(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function eo(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,ii(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Vn(t),t.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,c=r.encoding,l=r.callback,x=t.objectMode?1:f.length;if(ii(e,t,!1,x,f,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}W.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};W.prototype._writev=null;W.prototype.end=function(e,t,r){var i=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||bl(this,i,r)};function to(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function gl(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),ct(e,t)})}function wl(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,Re.nextTick(gl,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function ct(e,t){var r=to(t);return r&&(wl(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function bl(e,t,r){t.ending=!0,ct(e,t),r&&(t.finished?Re.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function El(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(W.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});W.prototype.destroy=Qn.destroy;W.prototype._undestroy=Qn.undestroy;W.prototype._destroy=function(e,t){this.end(),t(e)}});var Pe=d((lp,ao)=>{"use strict";var io=ft(),Sl=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};ao.exports=ce;var no=Object.create(Ne());no.inherits=Ue();var oo=si(),ai=ni();no.inherits(ce,oo);for(oi=Sl(ai.prototype),Vt=0;Vt<oi.length;Vt++)Xt=oi[Vt],ce.prototype[Xt]||(ce.prototype[Xt]=ai.prototype[Xt]);var oi,Xt,Vt;function ce(e){if(!(this instanceof ce))return new ce(e);oo.call(this,e),ai.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",Al)}Object.defineProperty(ce.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Al(){this.allowHalfOpen||this._writableState.ended||io.nextTick(Fl,this)}function Fl(e){e.end()}Object.defineProperty(ce.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}});ce.prototype._destroy=function(e,t){this.push(null),this.end(),io.nextTick(t,e)}});var li=d(fo=>{"use strict";var ui=ut().Buffer,so=ui.isEncoding||function(e){switch(e=""+e,e&&e.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 Ol(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function Rl(e){var t=Ol(e);if(typeof t!="string"&&(ui.isEncoding===so||!so(e)))throw new Error("Unknown encoding: "+e);return t||e}fo.StringDecoder=dt;function dt(e){this.encoding=Rl(e);var t;switch(this.encoding){case"utf16le":this.text=Dl,this.end=Il,t=4;break;case"utf8":this.fillLast=Bl,t=4;break;case"base64":this.text=kl,this.end=jl,t=3;break;default:this.write=Nl,this.end=Ul;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=ui.allocUnsafe(t)}dt.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};dt.prototype.end=ql;dt.prototype.text=Cl;dt.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function fi(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Pl(e,t,r){var i=t.length-1;if(i<r)return 0;var n=fi(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=fi(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=fi(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function Tl(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function Bl(e){var t=this.lastTotal-this.lastNeed,r=Tl(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function Cl(e,t){var r=Pl(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function ql(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function Dl(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Il(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function kl(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function jl(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Nl(e){return e.toString(this.encoding)}function Ul(e){return e&&e.length?this.write(e):""}});var si=d((dp,wo)=>{"use strict";var Me=ft();wo.exports=I;var Ll=Un(),ht;I.ReadableState=mo;var xp=require("events").EventEmitter,xo=function(e,t){return e.listeners(t).length},pi=Vr(),pt=ut().Buffer,zl=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Ml(e){return pt.from(e)}function Wl(e){return pt.isBuffer(e)||e instanceof zl}var ho=Object.create(Ne());ho.inherits=Ue();var ci=require("util"),P=void 0;ci&&ci.debuglog?P=ci.debuglog("stream"):P=function(){};var $l=Hn(),po=ri(),ze;ho.inherits(I,pi);var xi=["error","close","destroy","pause","resume"];function Hl(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Ll(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function mo(e,t){ht=ht||Pe(),e=e||{};var r=t instanceof ht;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=e.readableHighWaterMark,o=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),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.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(ze||(ze=li().StringDecoder),this.decoder=new ze(e.encoding),this.encoding=e.encoding)}function I(e){if(ht=ht||Pe(),!(this instanceof I))return new I(e);this._readableState=new mo(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),pi.call(this)}Object.defineProperty(I.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});I.prototype.destroy=po.destroy;I.prototype._undestroy=po.undestroy;I.prototype._destroy=function(e,t){this.push(null),t(e)};I.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=pt.from(e,t),t=""),i=!0),yo(this,e,t,!1,i)};I.prototype.unshift=function(e){return yo(this,e,null,!0,!1)};function yo(e,t,r,i,n){var o=e._readableState;if(t===null)o.reading=!1,Kl(e,o);else{var a;n||(a=Gl(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==pt.prototype&&(t=Ml(t)),i?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):di(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?di(e,o,t,!1):vo(e,o)):di(e,o,t,!1))):i||(o.reading=!1)}return Yl(o)}function di(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Jt(e)),vo(e,t)}function Gl(e,t){var r;return!Wl(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Yl(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}I.prototype.isPaused=function(){return this._readableState.flowing===!1};I.prototype.setEncoding=function(e){return ze||(ze=li().StringDecoder),this._readableState.decoder=new ze(e),this._readableState.encoding=e,this};var uo=8388608;function Zl(e){return e>=uo?e=uo:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function lo(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Zl(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}I.prototype.read=function(e){P("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return P("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?hi(this):Jt(this),null;if(e=lo(e,t),e===0&&t.ended)return t.length===0&&hi(this),null;var i=t.needReadable;P("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,P("length less than watermark",i)),t.ended||t.reading?(i=!1,P("reading or ended",i)):i&&(P("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=lo(r,t)));var n;return e>0?n=_o(e,t):n=null,n===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&hi(this)),n!==null&&this.emit("data",n),n};function Kl(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,Jt(e)}}function Jt(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(P("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Me.nextTick(co,e):co(e))}function co(e){P("emit readable"),e.emit("readable"),mi(e)}function vo(e,t){t.readingMore||(t.readingMore=!0,Me.nextTick(Vl,e,t))}function Vl(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(P("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}I.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};I.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,P("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,o=n?s:p;i.endEmitted?Me.nextTick(o):r.once("end",o),e.on("unpipe",a);function a(_,g){P("onunpipe"),_===r&&g&&g.hasUnpiped===!1&&(g.hasUnpiped=!0,l())}function s(){P("onend"),e.end()}var f=Xl(r);e.on("drain",f);var c=!1;function l(){P("cleanup"),e.removeListener("close",m),e.removeListener("finish",y),e.removeListener("drain",f),e.removeListener("error",h),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",p),r.removeListener("data",u),c=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&f()}var x=!1;r.on("data",u);function u(_){P("ondata"),x=!1;var g=e.write(_);g===!1&&!x&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&go(i.pipes,e)!==-1)&&!c&&(P("false write response, pause",i.awaitDrain),i.awaitDrain++,x=!0),r.pause())}function h(_){P("onerror",_),p(),e.removeListener("error",h),xo(e,"error")===0&&e.emit("error",_)}Hl(e,"error",h);function m(){e.removeListener("finish",y),p()}e.once("close",m);function y(){P("onfinish"),e.removeListener("close",m),p()}e.once("finish",y);function p(){P("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(P("pipe resume"),r.resume()),e};function Xl(e){return function(){var t=e._readableState;P("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&xo(e,"data")&&(t.flowing=!0,mi(e))}}I.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=go(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};I.prototype.on=function(e,t){var r=pi.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&Jt(this):Me.nextTick(Jl,this))}return r};I.prototype.addListener=I.prototype.on;function Jl(e){P("readable nexttick read 0"),e.read(0)}I.prototype.resume=function(){var e=this._readableState;return e.flowing||(P("resume"),e.flowing=!0,Ql(this,e)),this};function Ql(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Me.nextTick(ec,e,t))}function ec(e,t){t.reading||(P("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),mi(e),t.flowing&&!t.reading&&e.read(0)}I.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function mi(e){var t=e._readableState;for(P("flow",t.flowing);t.flowing&&e.read()!==null;);}I.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(P("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&t.push(a)}t.push(null)}),e.on("data",function(a){if(P("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=t.push(a);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=function(a){return function(){return e[a].apply(e,arguments)}}(n));for(var o=0;o<xi.length;o++)e.on(xi[o],this.emit.bind(this,xi[o]));return this._read=function(a){P("wrapped _read",a),i&&(i=!1,e.resume())},this};Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});I._fromList=_o;function _o(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=tc(e,t.buffer,t.decoder),r}function tc(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?i=t.shift():i=r?rc(e,t):ic(e,t),i}function rc(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(a===o.length?n+=o:n+=o.slice(0,e),e-=a,e===0){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}function ic(e,t){var r=pt.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var o=i.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),e-=a,e===0){a===o.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(a));break}++n}return t.length-=n,r}function hi(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Me.nextTick(nc,t,e))}function nc(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function go(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var yi=d((hp,So)=>{"use strict";So.exports=xe;var Qt=Pe(),Eo=Object.create(Ne());Eo.inherits=Ue();Eo.inherits(xe,Qt);function oc(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function xe(e){if(!(this instanceof xe))return new xe(e);Qt.call(this,e),this._transformState={afterTransform:oc.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",ac)}function ac(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){bo(e,t,r)}):bo(this,null,null)}xe.prototype.push=function(e,t){return this._transformState.needTransform=!1,Qt.prototype.push.call(this,e,t)};xe.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};xe.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};xe.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};xe.prototype._destroy=function(e,t){var r=this;Qt.prototype._destroy.call(this,e,function(i){t(i),r.emit("close")})};function bo(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var Ro=d((pp,Oo)=>{"use strict";Oo.exports=mt;var Ao=yi(),Fo=Object.create(Ne());Fo.inherits=Ue();Fo.inherits(mt,Ao);function mt(e){if(!(this instanceof mt))return new mt(e);Ao.call(this,e)}mt.prototype._transform=function(e,t,r){r(null,e)}});var We=d((G,er)=>{var ie=require("stream");process.env.READABLE_STREAM==="disable"&&ie?(er.exports=ie,G=er.exports=ie.Readable,G.Readable=ie.Readable,G.Writable=ie.Writable,G.Duplex=ie.Duplex,G.Transform=ie.Transform,G.PassThrough=ie.PassThrough,G.Stream=ie):(G=er.exports=si(),G.Stream=ie||G,G.Readable=G,G.Writable=ni(),G.Duplex=Pe(),G.Transform=yi(),G.PassThrough=Ro())});var To=d((mp,Po)=>{Po.exports=We().Duplex});var _i=d((vi,Co)=>{var tr=require("buffer"),ne=tr.Buffer;function Bo(e,t){for(var r in e)t[r]=e[r]}ne.from&&ne.alloc&&ne.allocUnsafe&&ne.allocUnsafeSlow?Co.exports=tr:(Bo(tr,vi),vi.Buffer=Te);function Te(e,t,r){return ne(e,t,r)}Te.prototype=Object.create(ne.prototype);Bo(ne,Te);Te.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ne(e,t,r)};Te.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ne(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};Te.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ne(e)};Te.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return tr.SlowBuffer(e)}});var Do=d((yp,qo)=>{var gi=To(),sc=require("util"),$e=_i().Buffer;function L(e){if(!(this instanceof L))return new L(e);if(this._bufs=[],this.length=0,typeof e=="function"){this._callback=e;var t=function(i){this._callback&&(this._callback(i),this._callback=null)}.bind(this);this.on("pipe",function(i){i.on("error",t)}),this.on("unpipe",function(i){i.removeListener("error",t)})}else this.append(e);gi.call(this)}sc.inherits(L,gi);L.prototype._offset=function(t){var r=0,i=0,n;if(t===0)return[0,0];for(;i<this._bufs.length;i++){if(n=r+this._bufs[i].length,t<n||i==this._bufs.length-1)return[i,t-r];r=n}};L.prototype.append=function(t){var r=0;if($e.isBuffer(t))this._appendBuffer(t);else if(Array.isArray(t))for(;r<t.length;r++)this.append(t[r]);else if(t instanceof L)for(;r<t._bufs.length;r++)this.append(t._bufs[r]);else t!=null&&(typeof t=="number"&&(t=t.toString()),this._appendBuffer($e.from(t)));return this};L.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};L.prototype._write=function(t,r,i){this._appendBuffer(t),typeof i=="function"&&i()};L.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)};L.prototype.end=function(t){gi.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)};L.prototype.get=function(t){return this.slice(t,t+1)[0]};L.prototype.slice=function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)};L.prototype.copy=function(t,r,i,n){if((typeof i!="number"||i<0)&&(i=0),(typeof n!="number"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return t||$e.alloc(0);var o=!!t,a=this._offset(i),s=n-i,f=s,c=o&&r||0,l=a[1],x,u;if(i===0&&n==this.length){if(!o)return this._bufs.length===1?this._bufs[0]:$e.concat(this._bufs,this.length);for(u=0;u<this._bufs.length;u++)this._bufs[u].copy(t,c),c+=this._bufs[u].length;return t}if(f<=this._bufs[a[0]].length-l)return o?this._bufs[a[0]].copy(t,r,l,l+f):this._bufs[a[0]].slice(l,l+f);for(o||(t=$e.allocUnsafe(s)),u=a[0];u<this._bufs.length;u++){if(x=this._bufs[u].length-l,f>x)this._bufs[u].copy(t,c,l),c+=x;else{this._bufs[u].copy(t,c,l,l+f),c+=x;break}f-=x,l&&(l=0)}return t.length>c?t.slice(0,c):t};L.prototype.shallowSlice=function(t,r){t=t||0,r=r||this.length,t<0&&(t+=this.length),r<0&&(r+=this.length);var i=this._offset(t),n=this._offset(r),o=this._bufs.slice(i[0],n[0]+1);return n[1]==0?o.pop():o[o.length-1]=o[o.length-1].slice(0,n[1]),i[1]!=0&&(o[0]=o[0].slice(i[1])),new L(o)};L.prototype.toString=function(t,r,i){return this.slice(r,i).toString(t)};L.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};L.prototype.duplicate=function(){for(var t=0,r=new L;t<this._bufs.length;t++)r.append(this._bufs[t]);return r};L.prototype.destroy=function(){this._bufs.length=0,this.length=0,this.push(null)};(function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1};for(var t in e)(function(r){L.prototype[r]=function(i){return this.slice(i,i+e[r])[r](0)}})(t)})();qo.exports=L});var ko=d((vp,Io)=>{Io.exports=uc;var fc=Object.prototype.hasOwnProperty;function uc(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)fc.call(r,i)&&(e[i]=r[i])}return e}});var No=d((_p,jo)=>{var lc={}.toString;jo.exports=Array.isArray||function(e){return lc.call(e)=="[object Array]"}});var He=d((gp,Uo)=>{"use strict";Uo.exports=TypeError});var wi=d((wp,Lo)=>{"use strict";Lo.exports=Object});var Mo=d((bp,zo)=>{"use strict";zo.exports=Error});var $o=d((Ep,Wo)=>{"use strict";Wo.exports=EvalError});var Go=d((Sp,Ho)=>{"use strict";Ho.exports=RangeError});var Zo=d((Ap,Yo)=>{"use strict";Yo.exports=ReferenceError});var bi=d((Fp,Ko)=>{"use strict";Ko.exports=SyntaxError});var Xo=d((Op,Vo)=>{"use strict";Vo.exports=URIError});var Qo=d((Rp,Jo)=>{"use strict";Jo.exports=Math.abs});var ta=d((Pp,ea)=>{"use strict";ea.exports=Math.floor});var ia=d((Tp,ra)=>{"use strict";ra.exports=Math.max});var oa=d((Bp,na)=>{"use strict";na.exports=Math.min});var sa=d((Cp,aa)=>{"use strict";aa.exports=Math.pow});var ua=d((qp,fa)=>{"use strict";fa.exports=Math.round});var ca=d((Dp,la)=>{"use strict";la.exports=Number.isNaN||function(t){return t!==t}});var da=d((Ip,xa)=>{"use strict";var cc=ca();xa.exports=function(t){return cc(t)||t===0?t:t<0?-1:1}});var pa=d((kp,ha)=>{"use strict";ha.exports=Object.getOwnPropertyDescriptor});var Ge=d((jp,ma)=>{"use strict";var rr=pa();if(rr)try{rr([],"length")}catch{rr=null}ma.exports=rr});var yt=d((Np,ya)=>{"use strict";var ir=Object.defineProperty||!1;if(ir)try{ir({},"a",{value:1})}catch{ir=!1}ya.exports=ir});var Ei=d((Up,va)=>{"use strict";va.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;t[r]=n;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==n||s.enumerable!==!0)return!1}return!0}});var wa=d((Lp,ga)=>{"use strict";var _a=typeof Symbol<"u"&&Symbol,xc=Ei();ga.exports=function(){return typeof _a!="function"||typeof Symbol!="function"||typeof _a("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:xc()}});var Si=d((zp,ba)=>{"use strict";ba.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Ai=d((Mp,Ea)=>{"use strict";var dc=wi();Ea.exports=dc.getPrototypeOf||null});var Fa=d((Wp,Aa)=>{"use strict";var hc="Function.prototype.bind called on incompatible ",pc=Object.prototype.toString,mc=Math.max,yc="[object Function]",Sa=function(t,r){for(var i=[],n=0;n<t.length;n+=1)i[n]=t[n];for(var o=0;o<r.length;o+=1)i[o+t.length]=r[o];return i},vc=function(t,r){for(var i=[],n=r||0,o=0;n<t.length;n+=1,o+=1)i[o]=t[n];return i},_c=function(e,t){for(var r="",i=0;i<e.length;i+=1)r+=e[i],i+1<e.length&&(r+=t);return r};Aa.exports=function(t){var r=this;if(typeof r!="function"||pc.apply(r)!==yc)throw new TypeError(hc+r);for(var i=vc(arguments,1),n,o=function(){if(this instanceof n){var l=r.apply(this,Sa(i,arguments));return Object(l)===l?l:this}return r.apply(t,Sa(i,arguments))},a=mc(0,r.length-i.length),s=[],f=0;f<a;f++)s[f]="$"+f;if(n=Function("binder","return function ("+_c(s,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var c=function(){};c.prototype=r.prototype,n.prototype=new c,c.prototype=null}return n}});var Ye=d(($p,Oa)=>{"use strict";var gc=Fa();Oa.exports=Function.prototype.bind||gc});var nr=d((Hp,Ra)=>{"use strict";Ra.exports=Function.prototype.call});var or=d((Gp,Pa)=>{"use strict";Pa.exports=Function.prototype.apply});var Ba=d((Yp,Ta)=>{"use strict";Ta.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Fi=d((Zp,Ca)=>{"use strict";var wc=Ye(),bc=or(),Ec=nr(),Sc=Ba();Ca.exports=Sc||wc.call(Ec,bc)});var ar=d((Kp,qa)=>{"use strict";var Ac=Ye(),Fc=He(),Oc=nr(),Rc=Fi();qa.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new Fc("a function is required");return Rc(Ac,Oc,t)}});var Ua=d((Vp,Na)=>{"use strict";var Pc=ar(),Da=Ge(),ka;try{ka=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Oi=!!ka&&Da&&Da(Object.prototype,"__proto__"),ja=Object,Ia=ja.getPrototypeOf;Na.exports=Oi&&typeof Oi.get=="function"?Pc([Oi.get]):typeof Ia=="function"?function(t){return Ia(t==null?t:ja(t))}:!1});var Ri=d((Xp,Wa)=>{"use strict";var La=Si(),za=Ai(),Ma=Ua();Wa.exports=La?function(t){return La(t)}:za?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return za(t)}:Ma?function(t){return Ma(t)}:null});var Ha=d((Jp,$a)=>{"use strict";var Tc=async function(){}.constructor;$a.exports=()=>Tc});var Ya=d((Qp,Ga)=>{"use strict";var Bc=function*(){}.constructor;Ga.exports=()=>Bc});var Ka=d((em,Za)=>{"use strict";var Cc=async function*(){}.constructor;Za.exports=()=>Cc});var Xa=d((tm,Va)=>{"use strict";var qc=Function.prototype.call,Dc=Object.prototype.hasOwnProperty,Ic=Ye();Va.exports=Ic.call(qc,Dc)});var Ti=d((rm,rs)=>{"use strict";var S,kc=wi(),jc=Mo(),Nc=$o(),Uc=Go(),Lc=Zo(),Xe=bi(),Ve=He(),zc=Xo(),Mc=Qo(),Wc=ta(),$c=ia(),Hc=oa(),Gc=sa(),Yc=ua(),Zc=da(),vt=Ge(),Kc=yt(),Pi=function(){throw new Ve},Vc=vt?function(){try{return arguments.callee,Pi}catch{try{return vt(arguments,"callee").get}catch{return Pi}}}():Pi,Ze=wa()(),$=Ri(),Xc=Ai(),Jc=Si(),ts=or(),_t=nr(),Ke={},Qc=typeof Uint8Array>"u"||!$?S:$(Uint8Array),Be={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?S:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?S:ArrayBuffer,"%ArrayIteratorPrototype%":Ze&&$?$([][Symbol.iterator]()):S,"%AsyncFromSyncIteratorPrototype%":S,"%AsyncFunction%":Ke,"%AsyncGenerator%":Ke,"%AsyncGeneratorFunction%":Ke,"%AsyncIteratorPrototype%":Ke,"%Atomics%":typeof Atomics>"u"?S:Atomics,"%BigInt%":typeof BigInt>"u"?S:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?S:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?S:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?S:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":jc,"%eval%":eval,"%EvalError%":Nc,"%Float16Array%":typeof Float16Array>"u"?S:Float16Array,"%Float32Array%":typeof Float32Array>"u"?S:Float32Array,"%Float64Array%":typeof Float64Array>"u"?S:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?S:FinalizationRegistry,"%Function%":Function,"%GeneratorFunction%":Ke,"%Int8Array%":typeof Int8Array>"u"?S:Int8Array,"%Int16Array%":typeof Int16Array>"u"?S:Int16Array,"%Int32Array%":typeof Int32Array>"u"?S:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ze&&$?$($([][Symbol.iterator]())):S,"%JSON%":typeof JSON=="object"?JSON:S,"%Map%":typeof Map>"u"?S:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ze||!$?S:$(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":kc,"%Object.getOwnPropertyDescriptor%":vt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?S:Promise,"%Proxy%":typeof Proxy>"u"?S:Proxy,"%RangeError%":Uc,"%ReferenceError%":Lc,"%Reflect%":typeof Reflect>"u"?S:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?S:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ze||!$?S:$(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?S:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ze&&$?$(""[Symbol.iterator]()):S,"%Symbol%":Ze?Symbol:S,"%SyntaxError%":Xe,"%ThrowTypeError%":Vc,"%TypedArray%":Qc,"%TypeError%":Ve,"%Uint8Array%":typeof Uint8Array>"u"?S:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?S:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?S:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?S:Uint32Array,"%URIError%":zc,"%WeakMap%":typeof WeakMap>"u"?S:WeakMap,"%WeakRef%":typeof WeakRef>"u"?S:WeakRef,"%WeakSet%":typeof WeakSet>"u"?S:WeakSet,"%Function.prototype.call%":_t,"%Function.prototype.apply%":ts,"%Object.defineProperty%":Kc,"%Object.getPrototypeOf%":Xc,"%Math.abs%":Mc,"%Math.floor%":Wc,"%Math.max%":$c,"%Math.min%":Hc,"%Math.pow%":Gc,"%Math.round%":Yc,"%Math.sign%":Zc,"%Reflect.getPrototypeOf%":Jc};if($)try{null.error}catch(e){Ja=$($(e)),Be["%Error.prototype%"]=Ja}var Ja,ex=Ha(),tx=Ya(),rx=Ka(),ix=function e(t){var r;if(t==="%AsyncFunction%")r=ex()||void 0;else if(t==="%GeneratorFunction%")r=tx()||void 0;else if(t==="%AsyncGeneratorFunction%")r=rx()||void 0;else if(t==="%AsyncGenerator%"){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&$&&(r=$(n.prototype))}return Be[t]=r,r},Qa={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},gt=Ye(),sr=Xa(),nx=gt.call(_t,Array.prototype.concat),ox=gt.call(ts,Array.prototype.splice),es=gt.call(_t,String.prototype.replace),fr=gt.call(_t,String.prototype.slice),ax=gt.call(_t,RegExp.prototype.exec),sx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fx=/\\(\\)?/g,ux=function(t){var r=fr(t,0,1),i=fr(t,-1);if(r==="%"&&i!=="%")throw new Xe("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new Xe("invalid intrinsic syntax, expected opening `%`");var n=[];return es(t,sx,function(o,a,s,f){n[n.length]=s?es(f,fx,"$1"):a||o}),n},lx=function(t,r){var i=t,n;if(sr(Qa,i)&&(n=Qa[i],i="%"+n[0]+"%"),sr(Be,i)){var o=Be[i];if(o===Ke&&(o=ix(i)),typeof o>"u"&&!r)throw new Ve("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:o}}throw new Xe("intrinsic "+t+" does not exist!")};rs.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new Ve("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ve('"allowMissing" argument must be a boolean');if(ax(/^%?[^%]*%?$/,t)===null)throw new Xe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=ux(t),n=i.length>0?i[0]:"",o=lx("%"+n+"%",r),a=o.name,s=o.value,f=!1,c=o.alias;c&&(n=c[0],ox(i,nx([0,1],c)));for(var l=1,x=!0;l<i.length;l+=1){var u=i[l],h=fr(u,0,1),m=fr(u,-1);if((h==='"'||h==="'"||h==="`"||m==='"'||m==="'"||m==="`")&&h!==m)throw new Xe("property names with quotes must have matching quotes");if((u==="constructor"||!x)&&(f=!0),n+="."+u,a="%"+n+"%",sr(Be,a))s=Be[a];else if(s!=null){if(!(u in s)){if(!r)throw new Ve("base intrinsic for "+t+" exists, but the property is not available.");return}if(vt&&l+1>=i.length){var y=vt(s,u);x=!!y,x&&"get"in y&&!("originalValue"in y.get)?s=y.get:s=s[u]}else x=sr(s,u),s=s[u];x&&!f&&(Be[a]=s)}}return s}});var Bi=d((im,os)=>{"use strict";var is=Ti(),ns=ar(),cx=ns([is("%String.prototype.indexOf%")]);os.exports=function(t,r){var i=is(t,!!r);return typeof i=="function"&&cx(t,".prototype.")>-1?ns([i]):i}});var us=d((nm,fs)=>{"use strict";var ss=Function.prototype.toString,Je=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,qi,ur;if(typeof Je=="function"&&typeof Object.defineProperty=="function")try{qi=Object.defineProperty({},"length",{get:function(){throw ur}}),ur={},Je(function(){throw 42},null,qi)}catch(e){e!==ur&&(Je=null)}else Je=null;var xx=/^\s*class\b/,Di=function(t){try{var r=ss.call(t);return xx.test(r)}catch{return!1}},Ci=function(t){try{return Di(t)?!1:(ss.call(t),!0)}catch{return!1}},lr=Object.prototype.toString,dx="[object Object]",hx="[object Function]",px="[object GeneratorFunction]",mx="[object HTMLAllCollection]",yx="[object HTML document.all class]",vx="[object HTMLCollection]",_x=typeof Symbol=="function"&&!!Symbol.toStringTag,gx=!(0 in[,]),Ii=function(){return!1};typeof document=="object"&&(as=document.all,lr.call(as)===lr.call(document.all)&&(Ii=function(t){if((gx||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=lr.call(t);return(r===mx||r===yx||r===vx||r===dx)&&t("")==null}catch{}return!1}));var as;fs.exports=Je?function(t){if(Ii(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Je(t,null,qi)}catch(r){if(r!==ur)return!1}return!Di(t)&&Ci(t)}:function(t){if(Ii(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(_x)return Ci(t);if(Di(t))return!1;var r=lr.call(t);return r!==hx&&r!==px&&!/^\[object HTML/.test(r)?!1:Ci(t)}});var xs=d((om,cs)=>{"use strict";var wx=us(),bx=Object.prototype.toString,ls=Object.prototype.hasOwnProperty,Ex=function(t,r,i){for(var n=0,o=t.length;n<o;n++)ls.call(t,n)&&(i==null?r(t[n],n,t):r.call(i,t[n],n,t))},Sx=function(t,r,i){for(var n=0,o=t.length;n<o;n++)i==null?r(t.charAt(n),n,t):r.call(i,t.charAt(n),n,t)},Ax=function(t,r,i){for(var n in t)ls.call(t,n)&&(i==null?r(t[n],n,t):r.call(i,t[n],n,t))};function Fx(e){return bx.call(e)==="[object Array]"}cs.exports=function(t,r,i){if(!wx(r))throw new TypeError("iterator must be a function");var n;arguments.length>=3&&(n=i),Fx(t)?Ex(t,r,n):typeof t=="string"?Sx(t,r,n):Ax(t,r,n)}});var hs=d((am,ds)=>{"use strict";ds.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var ms=d((sm,ps)=>{"use strict";var ki=hs(),Ox=typeof globalThis>"u"?global:globalThis;ps.exports=function(){for(var t=[],r=0;r<ki.length;r++)typeof Ox[ki[r]]=="function"&&(t[t.length]=ki[r]);return t}});var gs=d((fm,_s)=>{"use strict";var ys=yt(),Rx=bi(),Qe=He(),vs=Ge();_s.exports=function(t,r,i){if(!t||typeof t!="object"&&typeof t!="function")throw new Qe("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Qe("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Qe("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Qe("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Qe("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Qe("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,f=!!vs&&vs(t,r);if(ys)ys(t,r,{configurable:a===null&&f?f.configurable:!a,enumerable:n===null&&f?f.enumerable:!n,value:i,writable:o===null&&f?f.writable:!o});else if(s||!n&&!o&&!a)t[r]=i;else throw new Rx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Es=d((um,bs)=>{"use strict";var ji=yt(),ws=function(){return!!ji};ws.hasArrayLengthDefineBug=function(){if(!ji)return null;try{return ji([],"length",{value:1}).length!==1}catch{return!0}};bs.exports=ws});var Rs=d((lm,Os)=>{"use strict";var Px=Ti(),Ss=gs(),Tx=Es()(),As=Ge(),Fs=He(),Bx=Px("%Math.floor%");Os.exports=function(t,r){if(typeof t!="function")throw new Fs("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Bx(r)!==r)throw new Fs("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,o=!0;if("length"in t&&As){var a=As(t,"length");a&&!a.configurable&&(n=!1),a&&!a.writable&&(o=!1)}return(n||o||!i)&&(Tx?Ss(t,"length",r,!0,!0):Ss(t,"length",r)),t}});var Ts=d((cm,Ps)=>{"use strict";var Cx=Ye(),qx=or(),Dx=Fi();Ps.exports=function(){return Dx(Cx,qx,arguments)}});var qs=d((xm,cr)=>{"use strict";var Ix=Rs(),Bs=yt(),kx=ar(),Cs=Ts();cr.exports=function(t){var r=kx(arguments),i=t.length-(arguments.length-1);return Ix(r,1+(i>0?i:0),!0)};Bs?Bs(cr.exports,"apply",{value:Cs}):cr.exports.apply=Cs});var Is=d((dm,Ds)=>{"use strict";var jx=Ei();Ds.exports=function(){return jx()&&!!Symbol.toStringTag}});var Ls=d((hm,Us)=>{"use strict";var hr=xs(),Nx=ms(),ks=qs(),Ui=Bi(),dr=Ge(),xr=Ri(),Ux=Ui("Object.prototype.toString"),Ns=Is()(),js=typeof globalThis>"u"?global:globalThis,Ni=Nx(),Li=Ui("String.prototype.slice"),Lx=Ui("Array.prototype.indexOf",!0)||function(t,r){for(var i=0;i<t.length;i+=1)if(t[i]===r)return i;return-1},pr={__proto__:null};Ns&&dr&&xr?hr(Ni,function(e){var t=new js[e];if(Symbol.toStringTag in t&&xr){var r=xr(t),i=dr(r,Symbol.toStringTag);if(!i&&r){var n=xr(r);i=dr(n,Symbol.toStringTag)}pr["$"+e]=ks(i.get)}}):hr(Ni,function(e){var t=new js[e],r=t.slice||t.set;r&&(pr["$"+e]=ks(r))});var zx=function(t){var r=!1;return hr(pr,function(i,n){if(!r)try{"$"+i(t)===n&&(r=Li(n,1))}catch{}}),r},Mx=function(t){var r=!1;return hr(pr,function(i,n){if(!r)try{i(t),r=Li(n,1)}catch{}}),r};Us.exports=function(t){if(!t||typeof t!="object")return!1;if(!Ns){var r=Li(Ux(t),8,-1);return Lx(Ni,r)>-1?r:r!=="Object"?!1:Mx(t)}return dr?zx(t):null}});var Ms=d((pm,zs)=>{"use strict";var Wx=Ls();zs.exports=function(t){return!!Wx(t)}});var $s=d((mm,Ws)=>{"use strict";var $x=He(),Hx=Bi(),Gx=Hx("TypedArray.prototype.buffer",!0),Yx=Ms();Ws.exports=Gx||function(t){if(!Yx(t))throw new $x("Not a Typed Array");return t.buffer}});var zi=d((ym,Gs)=>{"use strict";var te=_i().Buffer,Zx=No(),Kx=$s(),Vx=ArrayBuffer.isView||function(t){try{return Kx(t),!0}catch{return!1}},Xx=typeof Uint8Array<"u",Hs=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",Jx=Hs&&(te.prototype instanceof Uint8Array||te.TYPED_ARRAY_SUPPORT);Gs.exports=function(t,r){if(te.isBuffer(t))return t.constructor&&!("isBuffer"in t)?te.from(t):t;if(typeof t=="string")return te.from(t,r);if(Hs&&Vx(t)){if(t.byteLength===0)return te.alloc(0);if(Jx){var i=te.from(t.buffer,t.byteOffset,t.byteLength);if(i.byteLength===t.byteLength)return i}var n=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),o=te.from(n);if(o.length===t.byteLength)return o}if(Xx&&t instanceof Uint8Array)return te.from(t);var a=Zx(t);if(a)for(var s=0;s<t.length;s+=1){var f=t[s];if(typeof f!="number"||f<0||f>255||~~f!==f)throw new RangeError("Array items must be numbers in the range 0-255.")}if(a||te.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return te.from(t);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var Zs=d((vm,Ys)=>{var Qx=function(){try{if(!Buffer.isEncoding("latin1"))return!1;var e=Buffer.alloc?Buffer.alloc(4):new Buffer(4);return e.fill("ab","ucs2"),e.toString("hex")==="61006200"}catch{return!1}}();function ed(e){return e.length===1&&e.charCodeAt(0)<256}function mr(e,t,r,i){if(r<0||i>e.length)throw new RangeError("Out of range index");return r=r>>>0,i=i===void 0?e.length:i>>>0,i>r&&e.fill(t,r,i),e}function td(e,t,r,i){if(r<0||i>e.length)throw new RangeError("Out of range index");if(i<=r)return e;r=r>>>0,i=i===void 0?e.length:i>>>0;for(var n=r,o=t.length;n<=i-o;)t.copy(e,n),n+=o;return n!==i&&t.copy(e,n,0,i-n),e}function rd(e,t,r,i,n){if(Qx)return e.fill(t,r,i,n);if(typeof t=="number")return mr(e,t,r,i);if(typeof t=="string"){if(typeof r=="string"?(n=r,r=0,i=e.length):typeof i=="string"&&(n=i,i=e.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(n==="latin1"&&(n="binary"),typeof n=="string"&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(t==="")return mr(e,0,r,i);if(ed(t))return mr(e,t.charCodeAt(0),r,i);t=new Buffer(t,n)}return Buffer.isBuffer(t)?td(e,t,r,i):mr(e,0,r,i)}Ys.exports=rd});var Vs=d((_m,Ks)=>{function id(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative');return Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e)}Ks.exports=id});var Mi=d((gm,Js)=>{var Xs=Zs(),nd=Vs();Js.exports=function(t,r,i){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative');if(Buffer.alloc)return Buffer.alloc(t,r,i);var n=nd(t);return t===0?n:r===void 0?Xs(n,0):(typeof i!="string"&&(i=void 0),Xs(n,r,i))}});var $i=d(tt=>{var od=zi(),ad=Mi(),sd="0000000000000000000",fd="7777777777777777777",Qs=48,ud="ustar\x0000",ld=parseInt("7777",8),cd=function(e,t,r){return typeof e!="number"?r:(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0)},xd=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},dd=function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},ef=function(e,t,r,i){for(;r<i;r++)if(e[r]===t)return r;return i},tf=function(e){for(var t=256,r=0;r<148;r++)t+=e[r];for(var i=156;i<512;i++)t+=e[i];return t},ve=function(e,t){return e=e.toString(8),e.length>t?fd.slice(0,t)+" ":sd.slice(0,t-e.length)+e+" "};function hd(e){var t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;for(var r=!1,i=[],n=e.length-1;n>0;n--){var o=e[n];t?i.push(o):r&&o===0?i.push(0):r?(r=!1,i.push(256-o)):i.push(255-o)}var a=0,s=i.length;for(n=0;n<s;n++)a+=i[n]*Math.pow(256,n);return t?a:-1*a}var _e=function(e,t,r){if(e=e.slice(t,t+r),t=0,e[t]&128)return hd(e);for(;t<e.length&&e[t]===32;)t++;for(var i=cd(ef(e,32,t,e.length),e.length,e.length);t<i&&e[t]===0;)t++;return i===t?0:parseInt(e.slice(t,i).toString(),8)},et=function(e,t,r,i){return e.slice(t,ef(e,0,t,t+r)).toString(i)},Wi=function(e){var t=Buffer.byteLength(e),r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e};tt.decodeLongPath=function(e,t){return et(e,0,e.length,t)};tt.encodePax=function(e){var t="";e.name&&(t+=Wi(" path="+e.name+`
|
|
3
|
+
`)),e.linkname&&(t+=Wi(" linkpath="+e.linkname+`
|
|
4
|
+
`));var r=e.pax;if(r)for(var i in r)t+=Wi(" "+i+"="+r[i]+`
|
|
5
|
+
`);return od(t)};tt.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&e[r]!==32;)r++;var i=parseInt(e.slice(0,r).toString(),10);if(!i)return t;var n=e.slice(r+1,i-1).toString(),o=n.indexOf("=");if(o===-1)return t;t[n.slice(0,o)]=n.slice(o+1),e=e.slice(i)}return t};tt.encode=function(e){var t=ad(512),r=e.name,i="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var n=r.indexOf("/");if(n===-1)return null;i+=i?"/"+r.slice(0,n):r.slice(0,n),r=r.slice(n+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(i)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(r),t.write(ve(e.mode&ld,6),100),t.write(ve(e.uid,6),108),t.write(ve(e.gid,6),116),t.write(ve(e.size,11),124),t.write(ve(e.mtime.getTime()/1e3|0,11),136),t[156]=Qs+dd(e.type),e.linkname&&t.write(e.linkname,157),t.write(ud,257),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(ve(e.devmajor||0,6),329),t.write(ve(e.devminor||0,6),337),i&&t.write(i,345),t.write(ve(tf(t),6),148),t)};tt.decode=function(e,t){var r=e[156]===0?0:e[156]-Qs,i=et(e,0,100,t),n=_e(e,100,8),o=_e(e,108,8),a=_e(e,116,8),s=_e(e,124,12),f=_e(e,136,12),c=xd(r),l=e[157]===0?null:et(e,157,100,t),x=et(e,265,32),u=et(e,297,32),h=_e(e,329,8),m=_e(e,337,8);e[345]&&(i=et(e,345,155,t)+"/"+i),r===0&&i&&i[i.length-1]==="/"&&(r=5);var y=tf(e);if(y===8*32)return null;if(y!==_e(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");return{name:i,mode:n,uid:o,gid:a,size:s,mtime:new Date(1e3*f),type:c,linkname:l,uname:x,gname:u,devmajor:h,devminor:m}}});var uf=d((bm,ff)=>{var nf=require("util"),pd=Do(),md=ko(),wt=$i(),of=We().Writable,af=We().PassThrough,sf=function(){},rf=function(e){return e&=511,e&&512-e},yd=function(e,t){var r=new yr(e,t);return r.end(),r},vd=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},yr=function(e,t){this._parent=e,this.offset=t,af.call(this)};nf.inherits(yr,af);yr.prototype.destroy=function(e){this._parent.destroy(e)};var de=function(e){if(!(this instanceof de))return new de(e);of.call(this,e),e=e||{},this._offset=0,this._buffer=pd(),this._missing=0,this._partial=!1,this._onparse=sf,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,r=t._buffer,i=function(){t._continue()},n=function(u){if(t._locked=!1,u)return t.destroy(u);t._stream||i()},o=function(){t._stream=null;var u=rf(t._header.size);u?t._parse(u,a):t._parse(512,x),t._locked||i()},a=function(){t._buffer.consume(rf(t._header.size)),t._parse(512,x),i()},s=function(){var u=t._header.size;t._paxGlobal=wt.decodePax(r.slice(0,u)),r.consume(u),o()},f=function(){var u=t._header.size;t._pax=wt.decodePax(r.slice(0,u)),t._paxGlobal&&(t._pax=md(t._paxGlobal,t._pax)),r.consume(u),o()},c=function(){var u=t._header.size;this._gnuLongPath=wt.decodeLongPath(r.slice(0,u),e.filenameEncoding),r.consume(u),o()},l=function(){var u=t._header.size;this._gnuLongLinkPath=wt.decodeLongPath(r.slice(0,u),e.filenameEncoding),r.consume(u),o()},x=function(){var u=t._offset,h;try{h=t._header=wt.decode(r.slice(0,512),e.filenameEncoding)}catch(m){t.emit("error",m)}if(r.consume(512),!h){t._parse(512,x),i();return}if(h.type==="gnu-long-path"){t._parse(h.size,c),i();return}if(h.type==="gnu-long-link-path"){t._parse(h.size,l),i();return}if(h.type==="pax-global-header"){t._parse(h.size,s),i();return}if(h.type==="pax-header"){t._parse(h.size,f),i();return}if(t._gnuLongPath&&(h.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(h.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=h=vd(h,t._pax),t._pax=null),t._locked=!0,!h.size||h.type==="directory"){t._parse(512,x),t.emit("entry",h,yd(t,u),n);return}t._stream=new yr(t,u),t.emit("entry",h,t._stream,n),t._parse(h.size,o),i()};this._onheader=x,this._parse(512,x)};nf.inherits(de,of);de.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};de.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)};de.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=sf,this._overflow?this._write(this._overflow,void 0,e):e()}};de.prototype._write=function(e,t,r){if(!this._destroyed){var i=this._stream,n=this._buffer,o=this._missing;if(e.length&&(this._partial=!0),e.length<o)return this._missing-=e.length,this._overflow=null,i?i.write(e,r):(n.append(e),r());this._cb=r,this._missing=0;var a=null;e.length>o&&(a=e.slice(o),e=e.slice(0,o)),i?i.end(e):n.append(e),this._overflow=a,this._onparse()}};de.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()};ff.exports=de});var cf=d((Em,lf)=>{lf.exports=require("fs").constants||require("constants")});var hf=d((Sm,df)=>{df.exports=xf;function xf(e,t){if(e&&t)return xf(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(i){r[i]=e[i]}),r;function r(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];var o=e.apply(this,i),a=i[i.length-1];return typeof o=="function"&&o!==a&&Object.keys(a).forEach(function(s){o[s]=a[s]}),o}}});var yf=d((Am,Hi)=>{var pf=hf();Hi.exports=pf(vr);Hi.exports.strict=pf(mf);vr.proto=vr(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return vr(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return mf(this)},configurable:!0})});function vr(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function mf(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var gf=d((Fm,_f)=>{var _d=yf(),gd=function(){},wd=global.Bare?queueMicrotask:process.nextTick.bind(process),bd=function(e){return e.setHeader&&typeof e.abort=="function"},Ed=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},vf=function(e,t,r){if(typeof t=="function")return vf(e,null,t);t||(t={}),r=_d(r||gd);var i=e._writableState,n=e._readableState,o=t.readable||t.readable!==!1&&e.readable,a=t.writable||t.writable!==!1&&e.writable,s=!1,f=function(){e.writable||c()},c=function(){a=!1,o||r.call(e)},l=function(){o=!1,a||r.call(e)},x=function(p){r.call(e,p?new Error("exited with error code: "+p):null)},u=function(p){r.call(e,p)},h=function(){wd(m)},m=function(){if(!s){if(o&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"));if(a&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"))}},y=function(){e.req.on("finish",c)};return bd(e)?(e.on("complete",c),e.on("abort",h),e.req?y():e.on("request",y)):a&&!i&&(e.on("end",f),e.on("close",f)),Ed(e)&&e.on("exit",x),e.on("end",l),e.on("finish",c),t.error!==!1&&e.on("error",u),e.on("close",h),function(){s=!0,e.removeListener("complete",c),e.removeListener("abort",h),e.removeListener("request",y),e.req&&e.req.removeListener("finish",c),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",c),e.removeListener("exit",x),e.removeListener("end",l),e.removeListener("error",u),e.removeListener("close",h)}};_f.exports=vf});var Af=d((Om,Sf)=>{var rt=cf(),wf=gf(),gr=require("util"),Sd=Mi(),Ad=zi(),bf=We().Readable,it=We().Writable,Fd=require("string_decoder").StringDecoder,_r=$i(),Od=parseInt("755",8),Rd=parseInt("644",8),Ef=Sd(1024),Yi=function(){},Gi=function(e,t){t&=511,t&&e.push(Ef.slice(0,512-t))};function Pd(e){switch(e&rt.S_IFMT){case rt.S_IFBLK:return"block-device";case rt.S_IFCHR:return"character-device";case rt.S_IFDIR:return"directory";case rt.S_IFIFO:return"fifo";case rt.S_IFLNK:return"symlink"}return"file"}var wr=function(e){it.call(this),this.written=0,this._to=e,this._destroyed=!1};gr.inherits(wr,it);wr.prototype._write=function(e,t,r){if(this.written+=e.length,this._to.push(e))return r();this._to._drain=r};wr.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var br=function(){it.call(this),this.linkname="",this._decoder=new Fd("utf-8"),this._destroyed=!1};gr.inherits(br,it);br.prototype._write=function(e,t,r){this.linkname+=this._decoder.write(e),r()};br.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var bt=function(){it.call(this),this._destroyed=!1};gr.inherits(bt,it);bt.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))};bt.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var oe=function(e){if(!(this instanceof oe))return new oe(e);bf.call(this,e),this._drain=Yi,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};gr.inherits(oe,bf);oe.prototype.entry=function(e,t,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof t=="function"&&(r=t,t=null),r||(r=Yi);var i=this;if((!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=Pd(e.mode)),e.mode||(e.mode=e.type==="directory"?Od:Rd),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof t=="string"&&(t=Ad(t)),Buffer.isBuffer(t))return e.size=t.length,this._encode(e),this.push(t),Gi(i,e.size),process.nextTick(r),new bt;if(e.type==="symlink"&&!e.linkname){var n=new br;return wf(n,function(a){if(a)return i.destroy(),r(a);e.linkname=n.linkname,i._encode(e),r()}),n}if(this._encode(e),e.type!=="file"&&e.type!=="contiguous-file")return process.nextTick(r),new bt;var o=new wr(this);return this._stream=o,wf(o,function(a){if(i._stream=null,a)return i.destroy(),r(a);if(o.written!==e.size)return i.destroy(),r(new Error("size mismatch"));Gi(i,e.size),i._finalizing&&i.finalize(),r()}),o}};oe.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(Ef),this.push(null))};oe.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};oe.prototype._encode=function(e){if(!e.pax){var t=_r.encode(e);if(t){this.push(t);return}}this._encodePax(e)};oe.prototype._encodePax=function(e){var t=_r.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(_r.encode(r)),this.push(t),Gi(this,t.length),r.size=e.size,r.type=e.type,this.push(_r.encode(r))};oe.prototype._read=function(e){var t=this._drain;this._drain=Yi,t()};Sf.exports=oe});var Ff=d(Zi=>{Zi.extract=uf();Zi.pack=Af()});var Er=d((Pm,Rf)=>{"use strict";var Of=Zr(),Td=Wt(),Bd=Ff();Rf.exports=()=>e=>{if(!Buffer.isBuffer(e)&&!Td(e))return Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`));if(Buffer.isBuffer(e)&&(!Of(e)||Of(e).ext!=="tar"))return Promise.resolve([]);let t=Bd.extract(),r=[];t.on("entry",(n,o,a)=>{let s=[];o.on("data",f=>s.push(f)),o.on("end",()=>{let f={data:Buffer.concat(s),mode:n.mode,mtime:n.mtime,path:n.name,type:n.type};(n.type==="symlink"||n.type==="link")&&(f.linkname=n.linkname),r.push(f),a()})});let i=new Promise((n,o)=>{Buffer.isBuffer(e)||e.on("error",o),t.on("finish",()=>n(r)),t.on("error",o)});return t.then=i.then.bind(i),t.catch=i.catch.bind(i),Buffer.isBuffer(e)?t.end(e):e.pipe(t),t}});var Tf=d((Tm,Pf)=>{"use strict";var nt=e=>Array.from(e).map(t=>t.charCodeAt(0)),Cd=nt("META-INF/mozilla.rsa"),qd=nt("[Content_Types].xml"),Dd=nt("_rels/.rels");Pf.exports=e=>{let t=new Uint8Array(e);if(!(t&&t.length>1))return null;let r=(i,n)=>{n=Object.assign({offset:0},n);for(let o=0;o<i.length;o++)if(n.mask){if(i[o]!==(n.mask[o]&t[o+n.offset]))return!1}else if(i[o]!==t[o+n.offset])return!1;return!0};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(Cd,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(r(qd,{offset:30})||r(Dd,{offset:30})){let i=t.subarray(4,2004),n=a=>a.findIndex((s,f,c)=>c[f]===80&&c[f+1]===75&&c[f+2]===3&&c[f+3]===4),o=n(i);if(o!==-1){let a=t.subarray(o+8,o+8+1e3),s=n(a);if(s!==-1){let f=8+o+s+30;if(r(nt("word/"),{offset:f}))return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(r(nt("ppt/"),{offset:f}))return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(r(nt("xl/"),{offset:f}))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}}}}if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([51,103,112,53])||r([0,0,0])&&r([102,116,121,112],{offset:4})&&(r([109,112,52,49],{offset:8})||r([109,112,52,50],{offset:8})||r([105,115,111,109],{offset:8})||r([105,115,111,50],{offset:8})||r([109,109,112,52],{offset:8})||r([77,52,86],{offset:8})||r([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let i=t.subarray(4,4100),n=i.findIndex((o,a,s)=>s[a]===66&&s[a+1]===130);if(n!==-1){let o=n+3,a=s=>Array.from(s).every((f,c)=>i[o+c]===f.charCodeAt(0));if(a("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(a("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([82,73,70,70])&&r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/x-msvideo"};if(r([48,38,178,117,142,102,207,17,166,217]))return{ext:"wmv",mime:"video/x-ms-wmv"};if(r([0,0,1,186]))return{ext:"mpg",mime:"video/mpeg"};for(let i=0;i<2&&i<t.length-16;i++)if(r([73,68,51],{offset:i})||r([255,226],{offset:i,mask:[255,226]}))return{ext:"mp3",mime:"audio/mpeg"};return r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32])?{ext:"m4a",mime:"audio/m4a"}:r([79,112,117,115,72,101,97,100],{offset:28})?{ext:"opus",mime:"audio/opus"}:r([79,103,103,83])?{ext:"ogg",mime:"audio/ogg"}:r([102,76,97,67])?{ext:"flac",mime:"audio/x-flac"}:r([82,73,70,70])&&r([87,65,86,69],{offset:8})?{ext:"wav",mime:"audio/x-wav"}:r([35,33,65,77,82,10])?{ext:"amr",mime:"audio/amr"}:r([37,80,68,70])?{ext:"pdf",mime:"application/pdf"}:r([77,90])?{ext:"exe",mime:"application/x-msdownload"}:(t[0]===67||t[0]===70)&&r([87,83],{offset:1})?{ext:"swf",mime:"application/x-shockwave-flash"}:r([123,92,114,116,102])?{ext:"rtf",mime:"application/rtf"}:r([0,97,115,109])?{ext:"wasm",mime:"application/wasm"}:r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff",mime:"font/woff"}:r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff2",mime:"font/woff2"}:r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8}))?{ext:"eot",mime:"application/octet-stream"}:r([0,1,0,0,0])?{ext:"ttf",mime:"font/ttf"}:r([79,84,84,79,0])?{ext:"otf",mime:"font/otf"}:r([0,0,1,0])?{ext:"ico",mime:"image/x-icon"}:r([70,76,86,1])?{ext:"flv",mime:"video/x-flv"}:r([37,33])?{ext:"ps",mime:"application/postscript"}:r([253,55,122,88,90,0])?{ext:"xz",mime:"application/x-xz"}:r([83,81,76,105])?{ext:"sqlite",mime:"application/x-sqlite3"}:r([78,69,83,26])?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:r([67,114,50,52])?{ext:"crx",mime:"application/x-google-chrome-extension"}:r([77,83,67,70])||r([73,83,99,40])?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121])?{ext:"deb",mime:"application/x-deb"}:r([33,60,97,114,99,104,62])?{ext:"ar",mime:"application/x-unix-archive"}:r([237,171,238,219])?{ext:"rpm",mime:"application/x-rpm"}:r([31,160])||r([31,157])?{ext:"Z",mime:"application/x-compress"}:r([76,90,73,80])?{ext:"lz",mime:"application/x-lzip"}:r([208,207,17,224,161,177,26,225])?{ext:"msi",mime:"application/x-msi"}:r([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196}))?{ext:"mts",mime:"video/mp2t"}:r([66,76,69,78,68,69,82])?{ext:"blend",mime:"application/x-blender"}:r([66,80,71,251])?{ext:"bpg",mime:"image/bpg"}:null}});var qf=d((Bm,Cf)=>{var Bf=[0,1,3,7,15,31,63,127,255],Et=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};Et.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)};Et.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var r=8-this.bitOffset;if(e>=r)t<<=r,t|=Bf[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=r;else{t<<=e;var i=r-e;t|=(this.curByte&Bf[e]<<i)>>i,this.bitOffset+=e,e=0}}return t};Et.prototype.seek=function(e){var t=e%8,r=(e-t)/8;this.bitOffset=t,this.stream.seek(r),this.hasByte=!1};Et.prototype.pi=function(){var e=new Buffer(6),t;for(t=0;t<e.length;t++)e[t]=this.read(8);return e.toString("hex")};Cf.exports=Et});var If=d((Cm,Df)=>{var Ce=function(){};Ce.prototype.readByte=function(){throw new Error("abstract method readByte() not implemented")};Ce.prototype.read=function(e,t,r){for(var i=0;i<r;){var n=this.readByte();if(n<0)return i===0?-1:i;e[t++]=n,i++}return i};Ce.prototype.seek=function(e){throw new Error("abstract method seek() not implemented")};Ce.prototype.writeByte=function(e){throw new Error("abstract method readByte() not implemented")};Ce.prototype.write=function(e,t,r){var i;for(i=0;i<r;i++)this.writeByte(e[t++]);return r};Ce.prototype.flush=function(){};Df.exports=Ce});var jf=d((qm,kf)=>{kf.exports=function(){var e=new Uint32Array([0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188]),t=function(){var r=4294967295;this.getCRC=function(){return~r>>>0},this.updateCRC=function(i){r=r<<8^e[(r>>>24^i)&255]},this.updateCRCRun=function(i,n){for(;n-- >0;)r=r<<8^e[(r>>>24^i)&255]}};return t}()});var Nf=d((Dm,Id)=>{Id.exports={name:"seek-bzip",version:"1.0.6",contributors:["C. Scott Ananian (http://cscott.net)","Eli Skeggs","Kevin Kwok","Rob Landley (http://landley.net)"],description:"a pure-JavaScript Node.JS module for random-access decoding bzip2 data",main:"./lib/index.js",repository:{type:"git",url:"https://github.com/cscott/seek-bzip.git"},license:"MIT",bin:{"seek-bunzip":"./bin/seek-bunzip","seek-table":"./bin/seek-bzip-table"},directories:{test:"test"},dependencies:{commander:"^2.8.1"},devDependencies:{fibers:"~1.0.6",mocha:"~2.2.5"},scripts:{test:"mocha"}}});var Gf=d((Im,Hf)=>{var kd=qf(),St=If(),Mf=jf(),Wf=Nf(),Sr=20,Uf=258,Lf=0,jd=1,Nd=2,Ud=6,Ld=50,zd="314159265359",Md="177245385090",zf=function(e,t){var r=e[t],i;for(i=t;i>0;i--)e[i]=e[i-1];return e[0]=r,r},k={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},ge={};ge[k.LAST_BLOCK]="Bad file checksum";ge[k.NOT_BZIP_DATA]="Not bzip data";ge[k.UNEXPECTED_INPUT_EOF]="Unexpected input EOF";ge[k.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF";ge[k.DATA_ERROR]="Data error";ge[k.OUT_OF_MEMORY]="Out of memory";ge[k.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var Y=function(e,t){var r=ge[e]||"unknown error";t&&(r+=": "+t);var i=new TypeError(r);throw i.errorCode=e,i},X=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};X.prototype._init_block=function(){var e=this._get_next_block();return e?(this.blockCRC=new Mf,!0):(this.writeCount=-1,!1)};X.prototype._start_bunzip=function(e,t){var r=new Buffer(4);(e.read(r,0,4)!==4||String.fromCharCode(r[0],r[1],r[2])!=="BZh")&&Y(k.NOT_BZIP_DATA,"bad magic");var i=r[3]-48;(i<1||i>9)&&Y(k.NOT_BZIP_DATA,"level out of range"),this.reader=new kd(e),this.dbufSize=1e5*i,this.nextoutput=0,this.outputStream=t,this.streamCRC=0};X.prototype._get_next_block=function(){var e,t,r,i=this.reader,n=i.pi();if(n===Md)return!1;n!==zd&&Y(k.NOT_BZIP_DATA),this.targetBlockCRC=i.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,i.read(1)&&Y(k.OBSOLETE_INPUT);var o=i.read(24);o>this.dbufSize&&Y(k.DATA_ERROR,"initial position out of bounds");var a=i.read(16),s=new Buffer(256),f=0;for(e=0;e<16;e++)if(a&1<<15-e){var c=e*16;for(r=i.read(16),t=0;t<16;t++)r&1<<15-t&&(s[f++]=c+t)}var l=i.read(3);(l<Nd||l>Ud)&&Y(k.DATA_ERROR);var x=i.read(15);x===0&&Y(k.DATA_ERROR);var u=new Buffer(256);for(e=0;e<l;e++)u[e]=e;var h=new Buffer(x);for(e=0;e<x;e++){for(t=0;i.read(1);t++)t>=l&&Y(k.DATA_ERROR);h[e]=zf(u,t)}var m=f+2,y=[],p;for(t=0;t<l;t++){var _=new Buffer(m),g=new Uint16Array(Sr+1);for(a=i.read(5),e=0;e<m;e++){for(;(a<1||a>Sr)&&Y(k.DATA_ERROR),!!i.read(1);)i.read(1)?a--:a++;_[e]=a}var E,N;for(E=N=_[0],e=1;e<m;e++)_[e]>N?N=_[e]:_[e]<E&&(E=_[e]);p={},y.push(p),p.permute=new Uint16Array(Uf),p.limit=new Uint32Array(Sr+2),p.base=new Uint32Array(Sr+1),p.minLen=E,p.maxLen=N;var R=0;for(e=E;e<=N;e++)for(g[e]=p.limit[e]=0,a=0;a<m;a++)_[a]===e&&(p.permute[R++]=a);for(e=0;e<m;e++)g[_[e]]++;for(R=a=0,e=E;e<N;e++)R+=g[e],p.limit[e]=R-1,R<<=1,a+=g[e],p.base[e+1]=R-a;p.limit[N+1]=Number.MAX_VALUE,p.limit[N]=R+g[N]-1,p.base[E]=0}var J=new Uint32Array(256);for(e=0;e<256;e++)u[e]=e;var j=0,z=0,v=0,w,b=this.dbuf=new Uint32Array(this.dbufSize);for(m=0;;){for(m--||(m=Ld-1,v>=x&&Y(k.DATA_ERROR),p=y[h[v++]]),e=p.minLen,t=i.read(e);e>p.maxLen&&Y(k.DATA_ERROR),!(t<=p.limit[e]);e++)t=t<<1|i.read(1);t-=p.base[e],(t<0||t>=Uf)&&Y(k.DATA_ERROR);var C=p.permute[t];if(C===Lf||C===jd){j||(j=1,a=0),C===Lf?a+=j:a+=2*j,j<<=1;continue}if(j)for(j=0,z+a>this.dbufSize&&Y(k.DATA_ERROR),w=s[u[0]],J[w]+=a;a--;)b[z++]=w;if(C>f)break;z>=this.dbufSize&&Y(k.DATA_ERROR),e=C-1,w=zf(u,e),w=s[w],J[w]++,b[z++]=w}for((o<0||o>=z)&&Y(k.DATA_ERROR),t=0,e=0;e<256;e++)r=t+J[e],J[e]=t,t=r;for(e=0;e<z;e++)w=b[e]&255,b[J[w]]|=e<<8,J[w]++;var q=0,B=0,A=0;return z&&(q=b[o],B=q&255,q>>=8,A=-1),this.writePos=q,this.writeCurrent=B,this.writeCount=z,this.writeRun=A,!0};X.prototype._read_bunzip=function(e,t){var r,i,n;if(this.writeCount<0)return 0;for(var o=0,a=this.dbuf,s=this.writePos,f=this.writeCurrent,c=this.writeCount,l=this.outputsize,x=this.writeRun;c;){for(c--,i=f,s=a[s],f=s&255,s>>=8,x++===3?(r=f,n=i,f=-1):(r=1,n=f),this.blockCRC.updateCRCRun(n,r);r--;)this.outputStream.writeByte(n),this.nextoutput++;f!=i&&(x=0)}return this.writeCount=c,this.blockCRC.getCRC()!==this.targetBlockCRC&&Y(k.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var Ki=function(e){if("readByte"in e)return e;var t=new St;return t.pos=0,t.readByte=function(){return e[this.pos++]},t.seek=function(r){this.pos=r},t.eof=function(){return this.pos>=e.length},t},$f=function(e){var t=new St,r=!0;if(e)if(typeof e=="number")t.buffer=new Buffer(e),r=!1;else{if("writeByte"in e)return e;t.buffer=e,r=!1}else t.buffer=new Buffer(16384);return t.pos=0,t.writeByte=function(i){if(r&&this.pos>=this.buffer.length){var n=new Buffer(this.buffer.length*2);this.buffer.copy(n),this.buffer=n}this.buffer[this.pos++]=i},t.getBuffer=function(){if(this.pos!==this.buffer.length){if(!r)throw new TypeError("outputsize does not match decoded input");var i=new Buffer(this.pos);this.buffer.copy(i,0,0,this.pos),this.buffer=i}return this.buffer},t._coerced=!0,t};X.Err=k;X.decode=function(e,t,r){for(var i=Ki(e),n=$f(t),o=new X(i,n);!("eof"in i&&i.eof());)if(o._init_block())o._read_bunzip();else{var a=o.reader.read(32)>>>0;if(a!==o.streamCRC&&Y(k.DATA_ERROR,"Bad stream CRC (got "+o.streamCRC.toString(16)+" expected "+a.toString(16)+")"),r&&"eof"in i&&!i.eof())o._start_bunzip(i,n);else break}if("getBuffer"in n)return n.getBuffer()};X.decodeBlock=function(e,t,r){var i=Ki(e),n=$f(r),o=new X(i,n);o.reader.seek(t);var a=o._get_next_block();if(a&&(o.blockCRC=new Mf,o.writeCopies=0,o._read_bunzip()),"getBuffer"in n)return n.getBuffer()};X.table=function(e,t,r){var i=new St;i.delegate=Ki(e),i.pos=0,i.readByte=function(){return this.pos++,this.delegate.readByte()},i.delegate.eof&&(i.eof=i.delegate.eof.bind(i.delegate));var n=new St;n.pos=0,n.writeByte=function(){this.pos++};for(var o=new X(i,n),a=o.dbufSize;!("eof"in i&&i.eof());){var s=i.pos*8+o.reader.bitOffset;if(o.reader.hasByte&&(s-=8),o._init_block()){var f=n.pos;o._read_bunzip(),t(s,n.pos-f)}else{var c=o.reader.read(32);if(r&&"eof"in i&&!i.eof())o._start_bunzip(i,n),console.assert(o.dbufSize===a,"shouldn't change block size within multistream file");else break}}};X.Stream=St;X.version=Wf.version;X.license=Wf.license;Hf.exports=X});var Kf=d((Yf,Zf)=>{var Wd=require("stream");Yf=Zf.exports=Vi;Vi.through=Vi;function Vi(e,t,r){e=e||function(l){this.queue(l)},t=t||function(){this.queue(null)};var i=!1,n=!1,o=[],a=!1,s=new Wd;s.readable=s.writable=!0,s.paused=!1,s.autoDestroy=!(r&&r.autoDestroy===!1),s.write=function(l){return e.call(this,l),!s.paused};function f(){for(;o.length&&!s.paused;){var l=o.shift();if(l===null)return s.emit("end");s.emit("data",l)}}s.queue=s.push=function(l){return a||(l===null&&(a=!0),o.push(l),f()),s},s.on("end",function(){s.readable=!1,!s.writable&&s.autoDestroy&&process.nextTick(function(){s.destroy()})});function c(){s.writable=!1,t.call(s),!s.readable&&s.autoDestroy&&s.destroy()}return s.end=function(l){if(!i)return i=!0,arguments.length&&s.write(l),c(),s},s.destroy=function(){if(!n)return n=!0,i=!0,o.length=0,s.writable=s.readable=!1,s.emit("close"),s},s.pause=function(){if(!s.paused)return s.paused=!0,s},s.resume=function(){return s.paused&&(s.paused=!1,s.emit("resume")),f(),s.paused||s.emit("drain"),s},s}});var Xf=d((km,Vf)=>{function Xi(e){this.name="Bzip2Error",this.message=e,this.stack=new Error().stack}Xi.prototype=new Error;var Z={Error:function(e){throw new Xi(e)}},ae={};ae.Bzip2Error=Xi;ae.crcTable=[0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188];ae.array=function(e){var t=0,r=0,i=[0,1,3,7,15,31,63,127,255];return function(n){for(var o=0;n>0;){var a=8-t;n>=a?(o<<=a,o|=i[a]&e[r++],t=0,n-=a):(o<<=n,o|=(e[r]&i[n]<<8-n-t)>>8-n-t,t+=n,n=0)}return o}};ae.simple=function(e,t){var r=ae.array(e),i=ae.header(r),n=!1,o=1e5*i,a=new Int32Array(o);do n=ae.decompress(r,t,a,o);while(!n)};ae.header=function(e){this.byteCount=new Int32Array(256),this.symToByte=new Uint8Array(256),this.mtfSymbol=new Int32Array(256),this.selectors=new Uint8Array(32768),e(8*3)!=4348520&&Z.Error("No magic number found");var t=e(8)-48;return(t<1||t>9)&&Z.Error("Not a BZIP archive"),t};ae.decompress=function(e,t,r,i,n){for(var o=20,a=258,s=0,f=1,c=50,l=-1,x="",u=0;u<6;u++)x+=e(8).toString(16);if(x=="177245385090"){var h=e(32)|0;return h!==n&&Z.Error("Error in bzip2: crc32 do not match"),e(null),null}x!="314159265359"&&Z.Error("eek not valid bzip data");var m=e(32)|0;e(1)&&Z.Error("unsupported obsolete version");var y=e(24);y>i&&Z.Error("Initial position larger than buffer size");var p=e(16),_=0;for(u=0;u<16;u++)if(p&1<<15-u){var g=e(16);for(D=0;D<16;D++)g&1<<15-D&&(this.symToByte[_++]=16*u+D)}var E=e(3);(E<2||E>6)&&Z.Error("another error");var N=e(15);N==0&&Z.Error("meh");for(var u=0;u<E;u++)this.mtfSymbol[u]=u;for(var u=0;u<N;u++){for(var D=0;e(1);D++)D>=E&&Z.Error("whoops another error");for(var R=this.mtfSymbol[D],g=D-1;g>=0;g--)this.mtfSymbol[g+1]=this.mtfSymbol[g];this.mtfSymbol[0]=R,this.selectors[u]=R}for(var O=_+2,J=[],j=new Uint8Array(a),z=new Uint16Array(o+1),v,D=0;D<E;D++){p=e(5);for(var u=0;u<O;u++){for(;(p<1||p>o)&&Z.Error("I gave up a while ago on writing error messages"),!!e(1);)e(1)?p--:p++;j[u]=p}var w,b;w=b=j[0];for(var u=1;u<O;u++)j[u]>b?b=j[u]:j[u]<w&&(w=j[u]);v=J[D]={},v.permute=new Int32Array(a),v.limit=new Int32Array(o+1),v.base=new Int32Array(o+1),v.minLen=w,v.maxLen=b;for(var C=v.base,q=v.limit,B=0,u=w;u<=b;u++)for(var p=0;p<O;p++)j[p]==u&&(v.permute[B++]=p);for(u=w;u<=b;u++)z[u]=q[u]=0;for(u=0;u<O;u++)z[j[u]]++;for(B=p=0,u=w;u<b;u++)B+=z[u],q[u]=B-1,B<<=1,C[u+1]=B-(p+=z[u]);q[b]=B+z[b]-1,C[w]=0}for(var u=0;u<256;u++)this.mtfSymbol[u]=u,this.byteCount[u]=0;var A,F,O,M;for(A=F=O=M=0;;){for(O--||(O=c-1,M>=N&&Z.Error("meow i'm a kitty, that's an error"),v=J[this.selectors[M++]],C=v.base,q=v.limit),u=v.minLen,D=e(u);u>v.maxLen&&Z.Error("rawr i'm a dinosaur"),!(D<=q[u]);)u++,D=D<<1|e(1);D-=C[u],(D<0||D>=a)&&Z.Error("moo i'm a cow");var T=v.permute[D];if(T==s||T==f){A||(A=1,p=0),T==s?p+=A:p+=2*A,A<<=1;continue}if(A)for(A=0,F+p>i&&Z.Error("Boom."),R=this.symToByte[this.mtfSymbol[0]],this.byteCount[R]+=p;p--;)r[F++]=R;if(T>_)break;F>=i&&Z.Error("I can't think of anything. Error"),u=T-1,R=this.mtfSymbol[u];for(var g=u-1;g>=0;g--)this.mtfSymbol[g+1]=this.mtfSymbol[g];this.mtfSymbol[0]=R,R=this.symToByte[R],this.byteCount[R]++,r[F++]=R}(y<0||y>=F)&&Z.Error("I'm a monkey and I'm throwing something at someone, namely you");for(var D=0,u=0;u<256;u++)g=D+this.byteCount[u],this.byteCount[u]=D,D=g;for(var u=0;u<F;u++)R=r[u]&255,r[this.byteCount[R]]|=u<<8,this.byteCount[R]++;var Se=0,Ae=0,Lr=0;F&&(Se=r[y],Ae=Se&255,Se>>=8,Lr=-1),F=F;for(var zr,Mr,It;F;){for(F--,Mr=Ae,Se=r[Se],Ae=Se&255,Se>>=8,Lr++==3?(zr=Ae,It=Mr,Ae=-1):(zr=1,It=Ae);zr--;)l=(l<<8^this.crcTable[(l>>24^It)&255])&4294967295,t(It);Ae!=Mr&&(Lr=0)}return l=(l^-1)>>>0,(l|0)!=(m|0)&&Z.Error("Error in bzip2: crc32 do not match"),n=(l^(n<<1|n>>>31))&4294967295,n};Vf.exports=ae});var e0=d((jm,Qf)=>{var Jf=[0,1,3,7,15,31,63,127,255];Qf.exports=function(t){var r=0,i=0,n=t(),o=function(a){if(a===null&&r!=0){r=0,i++;return}for(var s=0;a>0;){i>=n.length&&(i=0,n=t());var f=8-r;r===0&&a>0&&o.bytesRead++,a>=f?(s<<=f,s|=Jf[f]&n[i++],r=0,a-=f):(s<<=a,s|=(n[i]&Jf[a]<<8-a-r)>>8-a-r,r+=a,a=0)}return s};return o.bytesRead=0,o}});var i0=d((Nm,r0)=>{var $d=Kf(),t0=Xf(),Hd=e0();r0.exports=Gd;function Gd(){var e=[],t=0,r=0,i=!1,n=!1,o=null,a=null;function s(l){if(r){var x=1e5*r,u=new Int32Array(x),h=[],m=function(y){h.push(y)};return a=t0.decompress(o,m,u,x,a),a===null?(r=0,!1):(l(Buffer.from(h)),!0)}else return r=t0.header(o),a=0,!0}var f=0;function c(l){if(!i)try{return s(function(x){l.queue(x),x!==null&&(f+=x.length)})}catch(x){return l.emit("error",x),i=!0,!1}}return $d(function(x){for(e.push(x),t+=x.length,o===null&&(o=Hd(function(){return e.shift()}));!i&&t-o.bytesRead+1>=(25e3+1e5*r||4);)c(this)},function(x){for(;!i&&o&&t>o.bytesRead;)c(this);i||(a!==null&&this.emit("error",new Error("input stream ended prematurely")),this.queue(null))})}});var s0=d((Um,a0)=>{"use strict";var n0=Er(),o0=Tf(),Yd=Wt(),Zd=Gf(),Kd=i0();a0.exports=()=>e=>!Buffer.isBuffer(e)&&!Yd(e)?Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`)):Buffer.isBuffer(e)&&(!o0(e)||o0(e).ext!=="bz2")?Promise.resolve([]):Buffer.isBuffer(e)?n0()(Zd.decode(e)):n0()(e.pipe(Kd()))});var l0=d((Lm,u0)=>{"use strict";var Vd=require("zlib"),Xd=Er(),f0=Zr(),Jd=Wt();u0.exports=()=>e=>{if(!Buffer.isBuffer(e)&&!Jd(e))return Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`));if(Buffer.isBuffer(e)&&(!f0(e)||f0(e).ext!=="gz"))return Promise.resolve([]);let t=Vd.createGunzip(),r=Xd()(t);return Buffer.isBuffer(e)?t.end(e):e.pipe(t),r}});var x0=d((zm,c0)=>{"use strict";c0.exports=function(e){return e&&e.length>1?e[0]===255&&e[1]===216&&e[2]===255?{ext:"jpg",mime:"image/jpeg"}:e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71?{ext:"png",mime:"image/png"}:e[0]===71&&e[1]===73&&e[2]===70?{ext:"gif",mime:"image/gif"}:e[8]===87&&e[9]===69&&e[10]===66&&e[11]===80?{ext:"webp",mime:"image/webp"}:e[0]===70&&e[1]===76&&e[2]===73&&e[3]===70?{ext:"flif",mime:"image/flif"}:(e[0]===73&&e[1]===73&&e[2]===42&&e[3]===0||e[0]===77&&e[1]===77&&e[2]===0&&e[3]===42)&&e[8]===67&&e[9]===82?{ext:"cr2",mime:"image/x-canon-cr2"}:e[0]===73&&e[1]===73&&e[2]===42&&e[3]===0||e[0]===77&&e[1]===77&&e[2]===0&&e[3]===42?{ext:"tif",mime:"image/tiff"}:e[0]===66&&e[1]===77?{ext:"bmp",mime:"image/bmp"}:e[0]===73&&e[1]===73&&e[2]===188?{ext:"jxr",mime:"image/vnd.ms-photo"}:e[0]===56&&e[1]===66&&e[2]===80&&e[3]===83?{ext:"psd",mime:"image/vnd.adobe.photoshop"}:e[0]===80&&e[1]===75&&e[2]===3&&e[3]===4&&e[30]===109&&e[31]===105&&e[32]===109&&e[33]===101&&e[34]===116&&e[35]===121&&e[36]===112&&e[37]===101&&e[38]===97&&e[39]===112&&e[40]===112&&e[41]===108&&e[42]===105&&e[43]===99&&e[44]===97&&e[45]===116&&e[46]===105&&e[47]===111&&e[48]===110&&e[49]===47&&e[50]===101&&e[51]===112&&e[52]===117&&e[53]===98&&e[54]===43&&e[55]===122&&e[56]===105&&e[57]===112?{ext:"epub",mime:"application/epub+zip"}:e[0]===80&&e[1]===75&&e[2]===3&&e[3]===4&&e[30]===77&&e[31]===69&&e[32]===84&&e[33]===65&&e[34]===45&&e[35]===73&&e[36]===78&&e[37]===70&&e[38]===47&&e[39]===109&&e[40]===111&&e[41]===122&&e[42]===105&&e[43]===108&&e[44]===108&&e[45]===97&&e[46]===46&&e[47]===114&&e[48]===115&&e[49]===97?{ext:"xpi",mime:"application/x-xpinstall"}:e[0]===80&&e[1]===75&&(e[2]===3||e[2]===5||e[2]===7)&&(e[3]===4||e[3]===6||e[3]===8)?{ext:"zip",mime:"application/zip"}:e[257]===117&&e[258]===115&&e[259]===116&&e[260]===97&&e[261]===114?{ext:"tar",mime:"application/x-tar"}:e[0]===82&&e[1]===97&&e[2]===114&&e[3]===33&&e[4]===26&&e[5]===7&&(e[6]===0||e[6]===1)?{ext:"rar",mime:"application/x-rar-compressed"}:e[0]===31&&e[1]===139&&e[2]===8?{ext:"gz",mime:"application/gzip"}:e[0]===66&&e[1]===90&&e[2]===104?{ext:"bz2",mime:"application/x-bzip2"}:e[0]===55&&e[1]===122&&e[2]===188&&e[3]===175&&e[4]===39&&e[5]===28?{ext:"7z",mime:"application/x-7z-compressed"}:e[0]===120&&e[1]===1?{ext:"dmg",mime:"application/x-apple-diskimage"}:e[0]===0&&e[1]===0&&e[2]===0&&(e[3]===24||e[3]===32)&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112||e[0]===51&&e[1]===103&&e[2]===112&&e[3]===53||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===109&&e[9]===112&&e[10]===52&&e[11]===50&&e[16]===109&&e[17]===112&&e[18]===52&&e[19]===49&&e[20]===109&&e[21]===112&&e[22]===52&&e[23]===50&&e[24]===105&&e[25]===115&&e[26]===111&&e[27]===109||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===105&&e[9]===115&&e[10]===111&&e[11]===109||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===109&&e[9]===112&&e[10]===52&&e[11]===50&&e[12]===0&&e[13]===0&&e[14]===0&&e[15]===0?{ext:"mp4",mime:"video/mp4"}:e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===77&&e[9]===52&&e[10]===86?{ext:"m4v",mime:"video/x-m4v"}:e[0]===77&&e[1]===84&&e[2]===104&&e[3]===100?{ext:"mid",mime:"audio/midi"}:e[31]===109&&e[32]===97&&e[33]===116&&e[34]===114&&e[35]===111&&e[36]===115&&e[37]===107&&e[38]===97?{ext:"mkv",mime:"video/x-matroska"}:e[0]===26&&e[1]===69&&e[2]===223&&e[3]===163?{ext:"webm",mime:"video/webm"}:e[0]===0&&e[1]===0&&e[2]===0&&e[3]===20&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112?{ext:"mov",mime:"video/quicktime"}:e[0]===82&&e[1]===73&&e[2]===70&&e[3]===70&&e[8]===65&&e[9]===86&&e[10]===73?{ext:"avi",mime:"video/x-msvideo"}:e[0]===48&&e[1]===38&&e[2]===178&&e[3]===117&&e[4]===142&&e[5]===102&&e[6]===207&&e[7]===17&&e[8]===166&&e[9]===217?{ext:"wmv",mime:"video/x-ms-wmv"}:e[0]===0&&e[1]===0&&e[2]===1&&e[3].toString(16)[0]==="b"?{ext:"mpg",mime:"video/mpeg"}:e[0]===73&&e[1]===68&&e[2]===51||e[0]===255&&e[1]===251?{ext:"mp3",mime:"audio/mpeg"}:e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===77&&e[9]===52&&e[10]===65||e[0]===77&&e[1]===52&&e[2]===65&&e[3]===32?{ext:"m4a",mime:"audio/m4a"}:e[28]===79&&e[29]===112&&e[30]===117&&e[31]===115&&e[32]===72&&e[33]===101&&e[34]===97&&e[35]===100?{ext:"opus",mime:"audio/opus"}:e[0]===79&&e[1]===103&&e[2]===103&&e[3]===83?{ext:"ogg",mime:"audio/ogg"}:e[0]===102&&e[1]===76&&e[2]===97&&e[3]===67?{ext:"flac",mime:"audio/x-flac"}:e[0]===82&&e[1]===73&&e[2]===70&&e[3]===70&&e[8]===87&&e[9]===65&&e[10]===86&&e[11]===69?{ext:"wav",mime:"audio/x-wav"}:e[0]===35&&e[1]===33&&e[2]===65&&e[3]===77&&e[4]===82&&e[5]===10?{ext:"amr",mime:"audio/amr"}:e[0]===37&&e[1]===80&&e[2]===68&&e[3]===70?{ext:"pdf",mime:"application/pdf"}:e[0]===77&&e[1]===90?{ext:"exe",mime:"application/x-msdownload"}:(e[0]===67||e[0]===70)&&e[1]===87&&e[2]===83?{ext:"swf",mime:"application/x-shockwave-flash"}:e[0]===123&&e[1]===92&&e[2]===114&&e[3]===116&&e[4]===102?{ext:"rtf",mime:"application/rtf"}:e[0]===119&&e[1]===79&&e[2]===70&&e[3]===70&&(e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0||e[4]===79&&e[5]===84&&e[6]===84&&e[7]===79)?{ext:"woff",mime:"application/font-woff"}:e[0]===119&&e[1]===79&&e[2]===70&&e[3]===50&&(e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0||e[4]===79&&e[5]===84&&e[6]===84&&e[7]===79)?{ext:"woff2",mime:"application/font-woff"}:e[34]===76&&e[35]===80&&(e[8]===0&&e[9]===0&&e[10]===1||e[8]===1&&e[9]===0&&e[10]===2||e[8]===2&&e[9]===0&&e[10]===2)?{ext:"eot",mime:"application/octet-stream"}:e[0]===0&&e[1]===1&&e[2]===0&&e[3]===0&&e[4]===0?{ext:"ttf",mime:"application/font-sfnt"}:e[0]===79&&e[1]===84&&e[2]===84&&e[3]===79&&e[4]===0?{ext:"otf",mime:"application/font-sfnt"}:e[0]===0&&e[1]===0&&e[2]===1&&e[3]===0?{ext:"ico",mime:"image/x-icon"}:e[0]===70&&e[1]===76&&e[2]===86&&e[3]===1?{ext:"flv",mime:"video/x-flv"}:e[0]===37&&e[1]===33?{ext:"ps",mime:"application/postscript"}:e[0]===253&&e[1]===55&&e[2]===122&&e[3]===88&&e[4]===90&&e[5]===0?{ext:"xz",mime:"application/x-xz"}:e[0]===83&&e[1]===81&&e[2]===76&&e[3]===105?{ext:"sqlite",mime:"application/x-sqlite3"}:e[0]===78&&e[1]===69&&e[2]===83&&e[3]===26?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:e[0]===67&&e[1]===114&&e[2]===50&&e[3]===52?{ext:"crx",mime:"application/x-google-chrome-extension"}:e[0]===77&&e[1]===83&&e[2]===67&&e[3]===70||e[0]===73&&e[1]===83&&e[2]===99&&e[3]===40?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:e[0]===33&&e[1]===60&&e[2]===97&&e[3]===114&&e[4]===99&&e[5]===104&&e[6]===62&&e[7]===10&&e[8]===100&&e[9]===101&&e[10]===98&&e[11]===105&&e[12]===97&&e[13]===110&&e[14]===45&&e[15]===98&&e[16]===105&&e[17]===110&&e[18]===97&&e[19]===114&&e[20]===121?{ext:"deb",mime:"application/x-deb"}:e[0]===33&&e[1]===60&&e[2]===97&&e[3]===114&&e[4]===99&&e[5]===104&&e[6]===62?{ext:"ar",mime:"application/x-unix-archive"}:e[0]===237&&e[1]===171&&e[2]===238&&e[3]===219?{ext:"rpm",mime:"application/x-rpm"}:e[0]===31&&e[1]===160||e[0]===31&&e[1]===157?{ext:"Z",mime:"application/x-compress"}:e[0]===76&&e[1]===90&&e[2]===73&&e[3]===80?{ext:"lz",mime:"application/x-lzip"}:e[0]===208&&e[1]===207&&e[2]===17&&e[3]===224&&e[4]===161&&e[5]===177&&e[6]===26&&e[7]===225?{ext:"msi",mime:"application/x-msi"}:null:null}});var g0=d((Mm,_0)=>{"use strict";var Qi="pending",d0="settled",Ar="fulfilled",Fr="rejected",Qd=function(){},h0=typeof global<"u"&&typeof global.process<"u"&&typeof global.process.emit=="function",eh=typeof setImmediate>"u"?setTimeout:setImmediate,At=[],Ji;function th(){for(var e=0;e<At.length;e++)At[e][0](At[e][1]);At=[],Ji=!1}function Or(e,t){At.push([e,t]),Ji||(Ji=!0,eh(th,0))}function rh(e,t){function r(n){en(t,n)}function i(n){Ft(t,n)}try{e(r,i)}catch(n){i(n)}}function p0(e){var t=e.owner,r=t._state,i=t._data,n=e[r],o=e.then;if(typeof n=="function"){r=Ar;try{i=n(i)}catch(a){Ft(o,a)}}m0(o,i)||(r===Ar&&en(o,i),r===Fr&&Ft(o,i))}function m0(e,t){var r;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(t&&(typeof t=="function"||typeof t=="object")){var i=t.then;if(typeof i=="function")return i.call(t,function(n){r||(r=!0,t===n?y0(e,n):en(e,n))},function(n){r||(r=!0,Ft(e,n))}),!0}}catch(n){return r||Ft(e,n),!0}return!1}function en(e,t){(e===t||!m0(e,t))&&y0(e,t)}function y0(e,t){e._state===Qi&&(e._state=d0,e._data=t,Or(ih,e))}function Ft(e,t){e._state===Qi&&(e._state=d0,e._data=t,Or(nh,e))}function v0(e){e._then=e._then.forEach(p0)}function ih(e){e._state=Ar,v0(e)}function nh(e){e._state=Fr,v0(e),!e._handled&&h0&&global.process.emit("unhandledRejection",e._data,e)}function oh(e){global.process.emit("rejectionHandled",e)}function Q(e){if(typeof e!="function")throw new TypeError("Promise resolver "+e+" is not a function");if(!(this instanceof Q))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],rh(e,this)}Q.prototype={constructor:Q,_state:Qi,_then:null,_data:void 0,_handled:!1,then:function(e,t){var r={owner:this,then:new this.constructor(Qd),fulfilled:e,rejected:t};return(t||e)&&!this._handled&&(this._handled=!0,this._state===Fr&&h0&&Or(oh,this)),this._state===Ar||this._state===Fr?Or(p0,r):this._then.push(r),r.then},catch:function(e){return this.then(null,e)}};Q.all=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.all().");return new Q(function(t,r){var i=[],n=0;function o(f){return n++,function(c){i[f]=c,--n||t(i)}}for(var a=0,s;a<e.length;a++)s=e[a],s&&typeof s.then=="function"?s.then(o(a),r):i[a]=s;n||t(i)})};Q.race=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.race().");return new Q(function(t,r){for(var i=0,n;i<e.length;i++)n=e[i],n&&typeof n.then=="function"?n.then(t,r):t(n)})};Q.resolve=function(e){return e&&typeof e=="object"&&e.constructor===Q?e:new Q(function(t){t(e)})};Q.reject=function(e){return new Q(function(t,r){r(e)})};_0.exports=Q});var b0=d((Wm,w0)=>{"use strict";w0.exports=typeof Promise=="function"?Promise:g0()});var tn=d(($m,S0)=>{"use strict";var E0=Object.getOwnPropertySymbols,ah=Object.prototype.hasOwnProperty,sh=Object.prototype.propertyIsEnumerable;function fh(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function uh(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(i.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(o){n[o]=o}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}S0.exports=uh()?Object.assign:function(e,t){for(var r,i=fh(e),n,o=1;o<arguments.length;o++){r=Object(arguments[o]);for(var a in r)ah.call(r,a)&&(i[a]=r[a]);if(E0){n=E0(r);for(var s=0;s<n.length;s++)sh.call(r,n[s])&&(i[n[s]]=r[n[s]])}}return i}});var F0=d((Hm,A0)=>{var lh=require("stream").PassThrough,ch=tn();A0.exports=function(e){e=ch({},e);var t=e.array,r=e.encoding,i=r==="buffer",n=!1;t?n=!(r||i):r=r||"utf8",i&&(r=null);var o=0,a=[],s=new lh({objectMode:n});return r&&s.setEncoding(r),s.on("data",function(f){a.push(f),n?o=a.length:o+=f.length}),s.getBufferedValue=function(){return t?a:i?Buffer.concat(a,o):a.join("")},s.getBufferedLength=function(){return o},s}});var R0=d((Gm,Rr)=>{"use strict";var O0=b0(),rn=tn(),xh=F0();function nn(e,t){if(!e)return O0.reject(new Error("Expected a stream"));t=rn({maxBuffer:1/0},t);var r=t.maxBuffer,i,n,o=new O0(function(a,s){i=xh(t),e.once("error",f),e.pipe(i),i.on("data",function(){i.getBufferedLength()>r&&s(new Error("maxBuffer exceeded"))}),i.once("error",f),i.on("end",a),n=function(){e.unpipe&&e.unpipe(i)};function f(c){c&&(c.bufferedData=i.getBufferedValue()),s(c)}});return o.then(n,n),o.then(function(){return i.getBufferedValue()})}Rr.exports=nn;Rr.exports.buffer=function(e,t){return nn(e,rn({},t,{encoding:"buffer"}))};Rr.exports.array=function(e,t){return nn(e,rn({},t,{array:!0}))}});var on=d((Ym,B0)=>{"use strict";var P0=function(e,t,r){return function(){for(var i=this,n=new Array(arguments.length),o=0;o<arguments.length;o++)n[o]=arguments[o];return new t(function(a,s){n.push(function(f,c){if(f)s(f);else if(r.multiArgs){for(var l=new Array(arguments.length-1),x=1;x<arguments.length;x++)l[x-1]=arguments[x];a(l)}else a(c)}),e.apply(i,n)})}},T0=B0.exports=function(e,t,r){typeof t!="function"&&(r=t,t=Promise),r=r||{},r.exclude=r.exclude||[/.+Sync$/];var i=function(o){var a=function(s){return typeof s=="string"?o===s:s.test(o)};return r.include?r.include.some(a):!r.exclude.some(a)},n=typeof e=="function"?function(){return r.excludeMain?e.apply(this,arguments):P0(e,t,r).apply(this,arguments)}:{};return Object.keys(e).reduce(function(o,a){var s=e[a];return o[a]=typeof s=="function"&&i(a)?P0(s,t,r):s,o},n)};T0.all=T0});var I0=d((Zm,D0)=>{D0.exports=Pr;function Pr(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}Pr.prototype.go=function(e){this.pending<this.max?q0(this,e):this.waiting.push(e)};Pr.prototype.wait=function(e){this.pending===0?e(this.error):this.listeners.push(e)};Pr.prototype.hold=function(){return C0(this)};function C0(e){e.pending+=1;var t=!1;return r;function r(n){if(t)throw new Error("callback called twice");if(t=!0,e.error=e.error||n,e.pending-=1,e.waiting.length>0&&e.pending<e.max)q0(e,e.waiting.shift());else if(e.pending===0){var o=e.listeners;e.listeners=[],o.forEach(i)}}function i(n){n(e.error)}}function q0(e,t){t(C0(e))}});var j0=d(Rt=>{var Ot=require("fs"),Tr=require("util"),an=require("stream"),k0=an.Readable,sn=an.Writable,dh=an.PassThrough,hh=I0(),Br=require("events").EventEmitter;Rt.createFromBuffer=ph;Rt.createFromFd=mh;Rt.BufferSlicer=pe;Rt.FdSlicer=he;Tr.inherits(he,Br);function he(e,t){t=t||{},Br.call(this),this.fd=e,this.pend=new hh,this.pend.max=1,this.refCount=0,this.autoClose=!!t.autoClose}he.prototype.read=function(e,t,r,i,n){var o=this;o.pend.go(function(a){Ot.read(o.fd,e,t,r,i,function(s,f,c){a(),n(s,f,c)})})};he.prototype.write=function(e,t,r,i,n){var o=this;o.pend.go(function(a){Ot.write(o.fd,e,t,r,i,function(s,f,c){a(),n(s,f,c)})})};he.prototype.createReadStream=function(e){return new Cr(this,e)};he.prototype.createWriteStream=function(e){return new qr(this,e)};he.prototype.ref=function(){this.refCount+=1};he.prototype.unref=function(){var e=this;if(e.refCount-=1,e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.autoClose&&Ot.close(e.fd,t);function t(r){r?e.emit("error",r):e.emit("close")}};Tr.inherits(Cr,k0);function Cr(e,t){t=t||{},k0.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end,this.pos=this.start,this.destroyed=!1}Cr.prototype._read=function(e){var t=this;if(!t.destroyed){var r=Math.min(t._readableState.highWaterMark,e);if(t.endOffset!=null&&(r=Math.min(r,t.endOffset-t.pos)),r<=0){t.destroyed=!0,t.push(null),t.context.unref();return}t.context.pend.go(function(i){if(t.destroyed)return i();var n=new Buffer(r);Ot.read(t.context.fd,n,0,r,t.pos,function(o,a){o?t.destroy(o):a===0?(t.destroyed=!0,t.push(null),t.context.unref()):(t.pos+=a,t.push(n.slice(0,a))),i()})})}};Cr.prototype.destroy=function(e){this.destroyed||(e=e||new Error("stream destroyed"),this.destroyed=!0,this.emit("error",e),this.context.unref())};Tr.inherits(qr,sn);function qr(e,t){t=t||{},sn.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end==null?1/0:+t.end,this.bytesWritten=0,this.pos=this.start,this.destroyed=!1,this.on("finish",this.destroy.bind(this))}qr.prototype._write=function(e,t,r){var i=this;if(!i.destroyed){if(i.pos+e.length>i.endOffset){var n=new Error("maximum file length exceeded");n.code="ETOOBIG",i.destroy(),r(n);return}i.context.pend.go(function(o){if(i.destroyed)return o();Ot.write(i.context.fd,e,0,e.length,i.pos,function(a,s){a?(i.destroy(),o(),r(a)):(i.bytesWritten+=s,i.pos+=s,i.emit("progress"),o(),r())})})}};qr.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.context.unref())};Tr.inherits(pe,Br);function pe(e,t){Br.call(this),t=t||{},this.refCount=0,this.buffer=e,this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}pe.prototype.read=function(e,t,r,i,n){var o=i+r,a=o-this.buffer.length,s=a>0?a:r;this.buffer.copy(e,t,i,o),setImmediate(function(){n(null,s)})};pe.prototype.write=function(e,t,r,i,n){e.copy(this.buffer,i,t,t+r),setImmediate(function(){n(null,r,e)})};pe.prototype.createReadStream=function(e){e=e||{};var t=new dh(e);t.destroyed=!1,t.start=e.start||0,t.endOffset=e.end,t.pos=t.endOffset||this.buffer.length;for(var r=this.buffer.slice(t.start,t.pos),i=0;;){var n=i+this.maxChunkSize;if(n>=r.length){i<r.length&&t.write(r.slice(i,r.length));break}t.write(r.slice(i,n)),i=n}return t.end(),t.destroy=function(){t.destroyed=!0},t};pe.prototype.createWriteStream=function(e){var t=this;e=e||{};var r=new sn(e);return r.start=e.start||0,r.endOffset=e.end==null?this.buffer.length:+e.end,r.bytesWritten=0,r.pos=r.start,r.destroyed=!1,r._write=function(i,n,o){if(!r.destroyed){var a=r.pos+i.length;if(a>r.endOffset){var s=new Error("maximum file length exceeded");s.code="ETOOBIG",r.destroyed=!0,o(s);return}i.copy(t.buffer,r.pos,0,i.length),r.bytesWritten+=i.length,r.pos=a,r.emit("progress"),o()}},r.destroy=function(){r.destroyed=!0},r};pe.prototype.ref=function(){this.refCount+=1};pe.prototype.unref=function(){if(this.refCount-=1,this.refCount<0)throw new Error("invalid unref")};function ph(e,t){return new pe(e,t)}function mh(e,t){return new he(e,t)}});var L0=d((Vm,U0)=>{var we=require("buffer").Buffer,fn=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(fn=new Int32Array(fn));function N0(e){if(we.isBuffer(e))return e;var t=typeof we.alloc=="function"&&typeof we.from=="function";if(typeof e=="number")return t?we.alloc(e):new we(e);if(typeof e=="string")return t?we.from(e):new we(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function yh(e){var t=N0(4);return t.writeInt32BE(e,0),t}function un(e,t){e=N0(e),we.isBuffer(t)&&(t=t.readUInt32BE(0));for(var r=~~t^-1,i=0;i<e.length;i++)r=fn[(r^e[i])&255]^r>>>8;return r^-1}function ln(){return yh(un.apply(null,arguments))}ln.signed=function(){return un.apply(null,arguments)};ln.unsigned=function(){return un.apply(null,arguments)>>>0};U0.exports=ln});var Y0=d(fe=>{var cn=require("fs"),vh=require("zlib"),z0=j0(),_h=L0(),kr=require("util"),jr=require("events").EventEmitter,M0=require("stream").Transform,xn=require("stream").PassThrough,gh=require("stream").Writable;fe.open=wh;fe.fromFd=W0;fe.fromBuffer=bh;fe.fromRandomAccessReader=dn;fe.dosDateTimeToDate=H0;fe.validateFileName=G0;fe.ZipFile=be;fe.Entry=Pt;fe.RandomAccessReader=Ee;function wh(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose==null&&(t.autoClose=!0),t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1),r==null&&(r=Ir),cn.open(e,"r",function(i,n){if(i)return r(i);W0(n,t,function(o,a){o&&cn.close(n,Ir),r(o,a)})})}function W0(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose==null&&(t.autoClose=!1),t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1),r==null&&(r=Ir),cn.fstat(e,function(i,n){if(i)return r(i);var o=z0.createFromFd(e,{autoClose:!0});dn(o,n.size,t,r)})}function bh(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose=!1,t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1);var i=z0.createFromBuffer(e,{maxChunkSize:65536});dn(i,e.length,t,r)}function dn(e,t,r,i){typeof r=="function"&&(i=r,r=null),r==null&&(r={}),r.autoClose==null&&(r.autoClose=!0),r.lazyEntries==null&&(r.lazyEntries=!1),r.decodeStrings==null&&(r.decodeStrings=!0);var n=!!r.decodeStrings;if(r.validateEntrySizes==null&&(r.validateEntrySizes=!0),r.strictFileNames==null&&(r.strictFileNames=!1),i==null&&(i=Ir),typeof t!="number")throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER)throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");e.ref();var o=22,a=65535,s=Math.min(o+a,t),f=se(s),c=t-f.length;ot(e,f,0,s,c,function(l){if(l)return i(l);for(var x=s-o;x>=0;x-=1)if(f.readUInt32LE(x)===101010256){var u=f.slice(x),h=u.readUInt16LE(4);if(h!==0)return i(new Error("multi-disk zip files are not supported: found disk number: "+h));var m=u.readUInt16LE(10),y=u.readUInt32LE(16),p=u.readUInt16LE(20),_=u.length-o;if(p!==_)return i(new Error("invalid comment length. expected: "+_+". found: "+p));var g=n?Dr(u,22,u.length,!1):u.slice(22);if(!(m===65535||y===4294967295))return i(null,new be(e,y,t,m,g,r.autoClose,r.lazyEntries,n,r.validateEntrySizes,r.strictFileNames));var E=se(20),N=c+x-E.length;ot(e,E,0,E.length,N,function(R){if(R)return i(R);if(E.readUInt32LE(0)!==117853008)return i(new Error("invalid zip64 end of central directory locator signature"));var J=at(E,8),j=se(56);ot(e,j,0,j.length,J,function(z){return z?i(z):j.readUInt32LE(0)!==101075792?i(new Error("invalid zip64 end of central directory record signature")):(m=at(j,32),y=at(j,48),i(null,new be(e,y,t,m,g,r.autoClose,r.lazyEntries,n,r.validateEntrySizes,r.strictFileNames)))})});return}i(new Error("end of central directory record signature not found"))})}kr.inherits(be,jr);function be(e,t,r,i,n,o,a,s,f,c){var l=this;jr.call(l),l.reader=e,l.reader.on("error",function(x){$0(l,x)}),l.reader.once("close",function(){l.emit("close")}),l.readEntryCursor=t,l.fileSize=r,l.entryCount=i,l.comment=n,l.entriesRead=0,l.autoClose=!!o,l.lazyEntries=!!a,l.decodeStrings=!!s,l.validateEntrySizes=!!f,l.strictFileNames=!!c,l.isOpen=!0,l.emittedError=!1,l.lazyEntries||l._readEntry()}be.prototype.close=function(){this.isOpen&&(this.isOpen=!1,this.reader.unref())};function re(e,t){e.autoClose&&e.close(),$0(e,t)}function $0(e,t){e.emittedError||(e.emittedError=!0,e.emit("error",t))}be.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()};be.prototype._readEntry=function(){var e=this;if(e.entryCount===e.entriesRead){setImmediate(function(){e.autoClose&&e.close(),!e.emittedError&&e.emit("end")});return}if(!e.emittedError){var t=se(46);ot(e.reader,t,0,t.length,e.readEntryCursor,function(r){if(r)return re(e,r);if(!e.emittedError){var i=new Pt,n=t.readUInt32LE(0);if(n!==33639248)return re(e,new Error("invalid central directory file header signature: 0x"+n.toString(16)));if(i.versionMadeBy=t.readUInt16LE(4),i.versionNeededToExtract=t.readUInt16LE(6),i.generalPurposeBitFlag=t.readUInt16LE(8),i.compressionMethod=t.readUInt16LE(10),i.lastModFileTime=t.readUInt16LE(12),i.lastModFileDate=t.readUInt16LE(14),i.crc32=t.readUInt32LE(16),i.compressedSize=t.readUInt32LE(20),i.uncompressedSize=t.readUInt32LE(24),i.fileNameLength=t.readUInt16LE(28),i.extraFieldLength=t.readUInt16LE(30),i.fileCommentLength=t.readUInt16LE(32),i.internalFileAttributes=t.readUInt16LE(36),i.externalFileAttributes=t.readUInt32LE(38),i.relativeOffsetOfLocalHeader=t.readUInt32LE(42),i.generalPurposeBitFlag&64)return re(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46,t=se(i.fileNameLength+i.extraFieldLength+i.fileCommentLength),ot(e.reader,t,0,t.length,e.readEntryCursor,function(o){if(o)return re(e,o);if(!e.emittedError){var a=(i.generalPurposeBitFlag&2048)!==0;i.fileName=e.decodeStrings?Dr(t,0,i.fileNameLength,a):t.slice(0,i.fileNameLength);var s=i.fileNameLength+i.extraFieldLength,f=t.slice(i.fileNameLength,s);i.extraFields=[];for(var c=0;c<f.length-3;){var l=f.readUInt16LE(c+0),x=f.readUInt16LE(c+2),u=c+4,h=u+x;if(h>f.length)return re(e,new Error("extra field length exceeds extra field buffer size"));var m=se(x);f.copy(m,0,u,h),i.extraFields.push({id:l,data:m}),c=h}if(i.fileComment=e.decodeStrings?Dr(t,s,s+i.fileCommentLength,a):t.slice(s,s+i.fileCommentLength),i.comment=i.fileComment,e.readEntryCursor+=t.length,e.entriesRead+=1,i.uncompressedSize===4294967295||i.compressedSize===4294967295||i.relativeOffsetOfLocalHeader===4294967295){for(var y=null,c=0;c<i.extraFields.length;c++){var p=i.extraFields[c];if(p.id===1){y=p.data;break}}if(y==null)return re(e,new Error("expected zip64 extended information extra field"));var _=0;if(i.uncompressedSize===4294967295){if(_+8>y.length)return re(e,new Error("zip64 extended information extra field does not include uncompressed size"));i.uncompressedSize=at(y,_),_+=8}if(i.compressedSize===4294967295){if(_+8>y.length)return re(e,new Error("zip64 extended information extra field does not include compressed size"));i.compressedSize=at(y,_),_+=8}if(i.relativeOffsetOfLocalHeader===4294967295){if(_+8>y.length)return re(e,new Error("zip64 extended information extra field does not include relative header offset"));i.relativeOffsetOfLocalHeader=at(y,_),_+=8}}if(e.decodeStrings)for(var c=0;c<i.extraFields.length;c++){var p=i.extraFields[c];if(p.id===28789){if(p.data.length<6||p.data.readUInt8(0)!==1)continue;var g=p.data.readUInt32LE(1);if(_h.unsigned(t.slice(0,i.fileNameLength))!==g)continue;i.fileName=Dr(p.data,5,p.data.length,!0);break}}if(e.validateEntrySizes&&i.compressionMethod===0){var E=i.uncompressedSize;if(i.isEncrypted()&&(E+=12),i.compressedSize!==E){var N="compressed/uncompressed size mismatch for stored file: "+i.compressedSize+" != "+i.uncompressedSize;return re(e,new Error(N))}}if(e.decodeStrings){e.strictFileNames||(i.fileName=i.fileName.replace(/\\/g,"/"));var R=G0(i.fileName,e.validateFileNameOptions);if(R!=null)return re(e,new Error(R))}e.emit("entry",i),e.lazyEntries||e._readEntry()}})}})}};be.prototype.openReadStream=function(e,t,r){var i=this,n=0,o=e.compressedSize;if(r==null)r=t,t={};else{if(t.decrypt!=null){if(!e.isEncrypted())throw new Error("options.decrypt can only be specified for encrypted entries");if(t.decrypt!==!1)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()&&t.decompress!==!1)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}if(t.decompress!=null){if(!e.isCompressed())throw new Error("options.decompress can only be specified for compressed entries");if(!(t.decompress===!1||t.decompress===!0))throw new Error("invalid options.decompress value: "+t.decompress)}if(t.start!=null||t.end!=null){if(e.isCompressed()&&t.decompress!==!1)throw new Error("start/end range not allowed for compressed entry without options.decompress === false");if(e.isEncrypted()&&t.decrypt!==!1)throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}if(t.start!=null){if(n=t.start,n<0)throw new Error("options.start < 0");if(n>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(t.end!=null){if(o=t.end,o<0)throw new Error("options.end < 0");if(o>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(o<n)throw new Error("options.end < options.start")}}if(!i.isOpen)return r(new Error("closed"));if(e.isEncrypted()&&t.decrypt!==!1)return r(new Error("entry is encrypted, and options.decrypt !== false"));i.reader.ref();var a=se(30);ot(i.reader,a,0,a.length,e.relativeOffsetOfLocalHeader,function(s){try{if(s)return r(s);var f=a.readUInt32LE(0);if(f!==67324752)return r(new Error("invalid local file header signature: 0x"+f.toString(16)));var c=a.readUInt16LE(26),l=a.readUInt16LE(28),x=e.relativeOffsetOfLocalHeader+a.length+c+l,u;if(e.compressionMethod===0)u=!1;else if(e.compressionMethod===8)u=t.decompress!=null?t.decompress:!0;else return r(new Error("unsupported compression method: "+e.compressionMethod));var h=x,m=h+e.compressedSize;if(e.compressedSize!==0&&m>i.fileSize)return r(new Error("file data overflows file bounds: "+h+" + "+e.compressedSize+" > "+i.fileSize));var y=i.reader.createReadStream({start:h+n,end:h+o}),p=y;if(u){var _=!1,g=vh.createInflateRaw();y.on("error",function(E){setImmediate(function(){_||g.emit("error",E)})}),y.pipe(g),i.validateEntrySizes?(p=new Tt(e.uncompressedSize),g.on("error",function(E){setImmediate(function(){_||p.emit("error",E)})}),g.pipe(p)):p=g,p.destroy=function(){_=!0,g!==p&&g.unpipe(p),y.unpipe(g),y.destroy()}}r(null,p)}finally{i.reader.unref()}})};function Pt(){}Pt.prototype.getLastModDate=function(){return H0(this.lastModFileDate,this.lastModFileTime)};Pt.prototype.isEncrypted=function(){return(this.generalPurposeBitFlag&1)!==0};Pt.prototype.isCompressed=function(){return this.compressionMethod===8};function H0(e,t){var r=e&31,i=(e>>5&15)-1,n=(e>>9&127)+1980,o=0,a=(t&31)*2,s=t>>5&63,f=t>>11&31;return new Date(n,i,r,f,s,a,o)}function G0(e){return e.indexOf("\\")!==-1?"invalid characters in fileName: "+e:/^[a-zA-Z]:/.test(e)||/^\//.test(e)?"absolute path: "+e:e.split("/").indexOf("..")!==-1?"invalid relative path: "+e:null}function ot(e,t,r,i,n,o){if(i===0)return setImmediate(function(){o(null,se(0))});e.read(t,r,i,n,function(a,s){if(a)return o(a);if(s<i)return o(new Error("unexpected EOF"));o()})}kr.inherits(Tt,M0);function Tt(e){M0.call(this),this.actualByteCount=0,this.expectedByteCount=e}Tt.prototype._transform=function(e,t,r){if(this.actualByteCount+=e.length,this.actualByteCount>this.expectedByteCount){var i="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return r(new Error(i))}r(null,e)};Tt.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()};kr.inherits(Ee,jr);function Ee(){jr.call(this),this.refCount=0}Ee.prototype.ref=function(){this.refCount+=1};Ee.prototype.unref=function(){var e=this;if(e.refCount-=1,e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.close(t);function t(r){if(r)return e.emit("error",r);e.emit("close")}};Ee.prototype.createReadStream=function(e){var t=e.start,r=e.end;if(t===r){var i=new xn;return setImmediate(function(){i.end()}),i}var n=this._readStreamForRange(t,r),o=!1,a=new Nr(this);n.on("error",function(f){setImmediate(function(){o||a.emit("error",f)})}),a.destroy=function(){n.unpipe(a),a.unref(),n.destroy()};var s=new Tt(r-t);return a.on("error",function(f){setImmediate(function(){o||s.emit("error",f)})}),s.destroy=function(){o=!0,a.unpipe(s),a.destroy()},n.pipe(a).pipe(s)};Ee.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")};Ee.prototype.read=function(e,t,r,i,n){var o=this.createReadStream({start:i,end:i+r}),a=new gh,s=0;a._write=function(f,c,l){f.copy(e,t+s,0,f.length),s+=f.length,l()},a.on("finish",n),o.on("error",function(f){n(f)}),o.pipe(a)};Ee.prototype.close=function(e){setImmediate(e)};kr.inherits(Nr,xn);function Nr(e){xn.call(this),this.context=e,this.context.ref(),this.unreffedYet=!1}Nr.prototype._flush=function(e){this.unref(),e()};Nr.prototype.unref=function(e){this.unreffedYet||(this.unreffedYet=!0,this.context.unref())};var Eh="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";function Dr(e,t,r,i){if(i)return e.toString("utf8",t,r);for(var n="",o=t;o<r;o++)n+=Eh[e[o]];return n}function at(e,t){var r=e.readUInt32LE(t),i=e.readUInt32LE(t+4);return i*4294967296+r}var se;typeof Buffer.allocUnsafe=="function"?se=function(e){return Buffer.allocUnsafe(e)}:se=function(e){return new Buffer(e)};function Ir(e){if(e)throw e}});var X0=d((Jm,V0)=>{"use strict";var Z0=x0(),Sh=R0(),K0=on(),Ah=Y0(),Fh=(e,t)=>{let o=e.versionMadeBy>>8;return(t&61440)===40960?"symlink":(t&61440)===16384||o===0&&e.externalFileAttributes===16?"directory":"file"},Oh=(e,t)=>{let r={mode:e.externalFileAttributes>>16&65535,mtime:e.getLastModDate(),path:e.fileName};return r.type=Fh(e,r.mode),r.mode===0&&r.type==="directory"&&(r.mode=493),r.mode===0&&(r.mode=420),K0(t.openReadStream.bind(t))(e).then(Sh.buffer).then(i=>(r.data=i,r.type==="symlink"&&(r.linkname=i.toString()),r)).catch(i=>{throw t.close(),i})},Rh=e=>new Promise((t,r)=>{let i=[];e.readEntry(),e.on("entry",n=>{Oh(n,e).catch(r).then(o=>{i.push(o),e.readEntry()})}),e.on("error",r),e.on("end",()=>t(i))});V0.exports=()=>e=>Buffer.isBuffer(e)?!Z0(e)||Z0(e).ext!=="zip"?Promise.resolve([]):K0(Ah.fromBuffer)(e,{lazyEntries:!0}).then(Rh):Promise.reject(new TypeError(`Expected a Buffer, got ${typeof e}`))});var eu=d((Qm,Q0)=>{"use strict";var J0=(e,t)=>function(){let r=t.promiseModule,i=new Array(arguments.length);for(let n=0;n<arguments.length;n++)i[n]=arguments[n];return new r((n,o)=>{t.errorFirst?i.push(function(a,s){if(t.multiArgs){let f=new Array(arguments.length-1);for(let c=1;c<arguments.length;c++)f[c-1]=arguments[c];a?(f.unshift(a),o(f)):n(f)}else a?o(a):n(s)}):i.push(function(a){if(t.multiArgs){let s=new Array(arguments.length-1);for(let f=0;f<arguments.length;f++)s[f]=arguments[f];n(s)}else n(a)}),e.apply(this,i)})};Q0.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=n=>{let o=a=>typeof a=="string"?n===a:a.test(n);return t.include?t.include.some(o):!t.exclude.some(o)},i;typeof e=="function"?i=function(){return t.excludeMain?e.apply(this,arguments):J0(e,t).apply(this,arguments)}:i=Object.create(Object.getPrototypeOf(e));for(let n in e){let o=e[n];i[n]=typeof o=="function"&&r(n)?J0(o,t):o}return i}});var nu=d((ey,hn)=>{"use strict";var Ph=require("fs"),qe=require("path"),tu=eu(),ru={mode:511&~process.umask(),fs:Ph},iu=e=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(qe.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}};hn.exports=(e,t)=>Promise.resolve().then(()=>{iu(e),t=Object.assign({},ru,t);let r=tu(t.fs.mkdir),i=tu(t.fs.stat),n=o=>r(o,t.mode).then(()=>o).catch(a=>{if(a.code==="ENOENT"){if(a.message.includes("null bytes")||qe.dirname(o)===o)throw a;return n(qe.dirname(o)).then(()=>n(o))}return i(o).then(s=>s.isDirectory()?o:Promise.reject()).catch(()=>{throw a})});return n(qe.resolve(e))});hn.exports.sync=(e,t)=>{iu(e),t=Object.assign({},ru,t);let r=i=>{try{t.fs.mkdirSync(i,t.mode)}catch(n){if(n.code==="ENOENT"){if(n.message.includes("null bytes")||qe.dirname(i)===i)throw n;return r(qe.dirname(i)),r(i)}try{if(!t.fs.statSync(i).isDirectory())throw new Error("The path is not a directory")}catch{throw n}}return i};return r(qe.resolve(e))}});var au=d((ty,ou)=>{"use strict";ou.exports=function(t,r){if(r){if(typeof r!="object")throw new TypeError(String(r)+" is not an object. Expected an object that has boolean `includeZero` property.");if("includeZero"in r){if(typeof r.includeZero!="boolean")throw new TypeError(String(r.includeZero)+" is neither true nor false. `includeZero` option must be a Boolean value.");if(r.includeZero&&t===0)return!0}}return Number.isSafeInteger(t)&&t>=1}});var fu=d((ry,su)=>{"use strict";var Bt=require("path"),Ct=require("util"),Th=au();su.exports=function(t,r,i){if(typeof t!="string")throw new TypeError(Ct.inspect(t)+" is not a string. First argument to strip-dirs must be a path string.");if(Bt.posix.isAbsolute(t)||Bt.win32.isAbsolute(t))throw new Error(`${t} is an absolute path. strip-dirs requires a relative path.`);if(!Th(r,{includeZero:!0}))throw new Error("The Second argument of strip-dirs must be a natural number or 0, but received "+Ct.inspect(r)+".");if(i){if(typeof i!="object")throw new TypeError(Ct.inspect(i)+" is not an object. Expected an object with a boolean `disallowOverflow` property.");if(Array.isArray(i))throw new TypeError(Ct.inspect(i)+" is an array. Expected an object with a boolean `disallowOverflow` property.");if("disallowOverflow"in i&&typeof i.disallowOverflow!="boolean")throw new TypeError(Ct.inspect(i.disallowOverflow)+" is neither true nor false. `disallowOverflow` option must be a Boolean value.")}else i={disallowOverflow:!1};let n=Bt.normalize(t).split(Bt.sep);if(n.length>1&&n[0]==="."&&n.shift(),r>n.length-1){if(i.disallowOverflow)throw new RangeError("Cannot strip more directories than there are.");r=n.length-1}return Bt.join.apply(null,n.slice(r))}});var lu=d((iy,uu)=>{"use strict";var Ur=require("path"),Bh=In(),Ch=Er(),qh=s0(),Dh=l0(),Ih=X0(),pn=nu(),kh=on(),jh=fu(),ee=kh(Bh),Nh=(e,t)=>t.plugins.length===0?Promise.resolve([]):Promise.all(t.plugins.map(r=>r(e,t))).then(r=>r.reduce((i,n)=>i.concat(n))),mn=(e,t)=>ee.realpath(e).catch(r=>{let i=Ur.dirname(e);return mn(i,t)}).then(r=>{if(r.indexOf(t)!==0)throw new Error("Refusing to create a directory outside the output path.");return pn(e).then(ee.realpath)}),Uh=(e,t)=>ee.readlink(e).catch(r=>null).then(r=>{if(r)throw new Error("Refusing to write into a symlink");return t}),Lh=(e,t,r)=>Nh(e,r).then(i=>(r.strip>0&&(i=i.map(n=>(n.path=jh(n.path,r.strip),n)).filter(n=>n.path!==".")),typeof r.filter=="function"&&(i=i.filter(r.filter)),typeof r.map=="function"&&(i=i.map(r.map)),t?Promise.all(i.map(n=>{let o=Ur.join(t,n.path),a=n.mode&~process.umask(),s=new Date;return n.type==="directory"?pn(t).then(f=>ee.realpath(f)).then(f=>mn(o,f)).then(()=>ee.utimes(o,s,n.mtime)).then(()=>n):pn(t).then(f=>ee.realpath(f)).then(f=>mn(Ur.dirname(o),f).then(()=>f)).then(f=>n.type==="file"?Uh(o,f):f).then(f=>ee.realpath(Ur.dirname(o)).then(c=>{if(c.indexOf(f)!==0)throw new Error("Refusing to write outside output directory: "+c)})).then(()=>n.type==="link"||n.type==="symlink"&&process.platform==="win32"?ee.link(n.linkname,o):n.type==="symlink"?ee.symlink(n.linkname,o):ee.writeFile(o,n.data,{mode:a})).then(()=>n.type==="file"&&ee.utimes(o,s,n.mtime)).then(()=>n)})):i));uu.exports=(e,t,r)=>typeof e!="string"&&!Buffer.isBuffer(e)?Promise.reject(new TypeError("Input file required")):(typeof t=="object"&&(r=t,t=null),r=Object.assign({plugins:[Ch(),qh(),Dh(),Ih()]},r),(typeof e=="string"?ee.readFile(e):Promise.resolve(e)).then(n=>Lh(n,t,r)))});var $h={};gu($h,{AZUREAUTH_NAME:()=>vn,install:()=>hu});module.exports=wu($h);var st=jt(require("node:path"),1),me=jt(require("node:fs"),1),xu=jt(Sn(),1),du=jt(lu(),1),zh="0.8.4";async function Mh(e,t){let r=new xu.DownloaderHelper(e,t);return new Promise((i,n)=>{r.on("end",()=>i()),r.on("error",o=>n(o)),r.on("progress.throttled",o=>{let a=o.progress<100?o.progress.toPrecision(2):100;console.info(`Downloaded: ${a}%`)}),r.start()})}var Dt=process.platform,cu=process.arch,qt={name:"azureauth",url:"https://github.com/AzureAD/microsoft-authentication-cli/releases/download/",version:zh},yn={def:"azureauth",win32:"azureauth.exe",linux:"azureauth.exe"},vn=Dt in yn?yn[Dt]:yn.def,hu=async()=>{let e=st.default.join(__dirname,"..","bin"),t=i=>{try{return me.default.existsSync(i)}catch{return!1}};if(me.default.existsSync(e)||(me.default.mkdirSync(e,{recursive:!0}),console.info(`${e} directory was created`)),t(st.default.join(e,"azureauth",vn))){console.log("azureauth is already installed");return}let r={win32:{x64:`azureauth-${qt.version}-win10-x64.zip`},darwin:{x64:`azureauth-${qt.version}-osx-x64.tar.gz`,arm64:`azureauth-${qt.version}-osx-arm64.tar.gz`}};if(Dt in r){let i="";if(cu in r[Dt])i=r[Dt][cu];else throw new Error("Arch is not supported in azureauth");let n=`${qt.url}${qt.version}/${i}`,o=st.default.join(e,"azureauth"),a=st.default.join(e,i);console.log(`Downloading azureauth from ${n}`);try{await Mh(n,e)}catch(f){throw new Error(`Download failed: ${f.message}`)}console.log(`Downloaded in ${e}`),me.default.mkdirSync(o,{recursive:!0});let s=st.default.join(o,vn);await(0,du.default)(a,o),t(s)&&(me.default.chmodSync(s,me.default.constants.S_IXUSR||64),me.default.chmodSync(s,493)),console.log(`Unzipped in ${a}`),me.default.unlinkSync(a)}};async function Wh(){for(let t=0;t<3;t++){try{await hu();break}catch(r){console.log(`Install failed: ${r.message}`)}if(t===2)throw new Error("Install failed after 3 attempts")}}Wh().catch(e=>{console.error(e),process.exit(1)});0&&(module.exports={AZUREAUTH_NAME,install});
|
|
6
6
|
/*! Bundled license information:
|
|
7
7
|
|
|
8
|
-
safe-buffer/index.js:
|
|
8
|
+
.store/safe-buffer-npm-5.2.1-3481c8aa9b/package/index.js:
|
|
9
9
|
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
10
10
|
|
|
11
|
-
object-assign/index.js:
|
|
11
|
+
.store/object-assign-npm-4.1.1-1004ad6dec/package/index.js:
|
|
12
12
|
(*
|
|
13
13
|
object-assign
|
|
14
14
|
(c) Sindre Sorhus
|
|
15
15
|
@license MIT
|
|
16
16
|
*)
|
|
17
17
|
|
|
18
|
-
is-natural-number/index.js:
|
|
18
|
+
.store/is-natural-number-npm-4.0.1-b5fd86a31d/package/index.js:
|
|
19
19
|
(*!
|
|
20
20
|
* is-natural-number.js | MIT (c) Shinnosuke Watanabe
|
|
21
21
|
* https://github.com/shinnn/is-natural-number.js
|
|
22
22
|
*)
|
|
23
23
|
|
|
24
|
-
strip-dirs/index.js:
|
|
24
|
+
.store/strip-dirs-npm-2.1.0-f0e727d3fc/package/index.js:
|
|
25
25
|
(*!
|
|
26
26
|
* strip-dirs | MIT (c) Shinnosuke Watanabe
|
|
27
27
|
* https://github.com/shinnn/node-strip-dirs
|
package/package.json
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "azureauth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "node-azure auth wrapps the AzureAuth CLI wrapper for performing AAD Authentication",
|
|
5
|
-
"bin":
|
|
6
|
-
"azureauth": "./scripts/azureauth.cjs"
|
|
7
|
-
},
|
|
5
|
+
"bin": "./scripts/azureauth.cjs",
|
|
8
6
|
"repository": {
|
|
9
7
|
"url": "https://github.com/microsoft/ado-npm-auth"
|
|
10
8
|
},
|
|
@@ -13,7 +11,7 @@
|
|
|
13
11
|
"type": "module",
|
|
14
12
|
"scripts": {
|
|
15
13
|
"build": "tsc",
|
|
16
|
-
"bundle": "
|
|
14
|
+
"bundle": "yarn bundleInstall && yarn bundleCli && yarn bundleIndex",
|
|
17
15
|
"bundleInstall": "esbuild --sourcemap --bundle --minify --platform=node --outfile=dist/install.cjs src/install.ts",
|
|
18
16
|
"bundleCli": "esbuild --sourcemap --bundle --minify --platform=node cli.js --outfile=dist/cli.cjs",
|
|
19
17
|
"bundleIndex": "esbuild --sourcemap --bundle --minify --platform=node --format=esm src/index.ts --outfile=dist/index.js",
|