@sentry/craft 0.30.1 → 0.31.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.31.0
4
+
5
+ ### Increase Release Safety and Reliability (ongoing)
6
+
7
+ Work on increasing the release safety and reliability.
8
+
9
+ By: @BYK (#370)
10
+
11
+ ### Various fixes & improvements
12
+
13
+ - ci: Use better key for getsentry/action-enforce-license-compliance if available (#377) by @chadwhitacre
14
+ - Use a custom action (#375) by @chadwhitacre
15
+
3
16
  ## 0.30.1
4
17
 
5
18
  ### Various fixes & improvements
package/dist/craft CHANGED
@@ -222,7 +222,7 @@ Instructions:
222
222
  Filtered results for: ${this.inputValue?this.inputValue:wf.gray("Enter something to filter")}
223
223
  `}renderOption(t,r,n){let i;return r.disabled?i=t===n?wf.gray().underline(r.title):wf.strikethrough().gray(r.title):i=t===n?wf.cyan().underline(r.title):r.title,(r.selected?wf.green(v0.radioOn):v0.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");let t=[wf.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(wf.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(kst.hide),super.render();let t=[mle.symbol(this.done,this.aborted),wf.bold(this.msg),mle.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=wf.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=hle(t,this.out.columns)}};ple.exports=gle});var xle=y((nrr,yle)=>{var ble=mi(),Rst=yf(),{style:wle,clear:Pst}=Nu(),{erase:Fst,cursor:Ele}=vi(),_le=class extends Rst{constructor(t={}){super(t);this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
224
224
  `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
225
- `),this.close()}_(t,r){return t.toLowerCase()==="y"?(this.value=!0,this.submit()):t.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Ele.hide):this.out.write(Pst(this.outputText,this.out.columns)),super.render(),this.outputText=[wle.symbol(this.done,this.aborted),ble.bold(this.msg),wle.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:ble.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Fst.line+Ele.to(0)+this.outputText))}};yle.exports=_le});var Sle=y((irr,Cle)=>{"use strict";Cle.exports={TextPrompt:sce(),SelectPrompt:fce(),TogglePrompt:gce(),DatePrompt:Qce(),NumberPrompt:rle(),MultiselectPrompt:_8(),AutocompletePrompt:dle(),AutocompleteMultiselectPrompt:vle(),ConfirmPrompt:xle()}});var Dle=y(Ale=>{"use strict";var Hs=Ale,Ist=Sle(),qA=e=>e;function Uc(e,t,r={}){return new Promise((n,i)=>{let a=new Ist[e](t),s=r.onAbort||qA,o=r.onSubmit||qA,u=r.onExit||qA;a.on("state",t.onState||qA),a.on("submit",c=>n(o(c))),a.on("exit",c=>n(u(c))),a.on("abort",c=>i(s(c)))})}Hs.text=e=>Uc("TextPrompt",e);Hs.password=e=>(e.style="password",Hs.text(e));Hs.invisible=e=>(e.style="invisible",Hs.text(e));Hs.number=e=>Uc("NumberPrompt",e);Hs.date=e=>Uc("DatePrompt",e);Hs.confirm=e=>Uc("ConfirmPrompt",e);Hs.list=e=>{let t=e.separator||",";return Uc("TextPrompt",e,{onSubmit:r=>r.split(t).map(n=>n.trim())})};Hs.toggle=e=>Uc("TogglePrompt",e);Hs.select=e=>Uc("SelectPrompt",e);Hs.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=r=>r.filter(n=>n.selected).map(n=>n.value);return Uc("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};Hs.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=r=>r.filter(n=>n.selected).map(n=>n.value);return Uc("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var Ost=(e,t)=>Promise.resolve(t.filter(r=>r.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));Hs.autocomplete=e=>(e.suggest=e.suggest||Ost,e.choices=[].concat(e.choices||[]),Uc("AutocompletePrompt",e))});var Rle=y((srr,kle)=>{"use strict";var S8=Dle(),jst=["suggest","format","onState","validate","onRender","type"],Tle=()=>{};async function ep(e=[],{onSubmit:t=Tle,onCancel:r=Tle}={}){let n={},i=ep._override||{};e=[].concat(e);let a,s,o,u,c,l,f=async(d,p,h=!1)=>{if(!(!h&&d.validate&&d.validate(p)!==!0))return d.format?await d.format(p,n):p};for(s of e)if({name:u,type:c}=s,typeof c=="function"&&(c=await c(a,m({},n),s),s.type=c),!!c){for(let d in s){if(jst.includes(d))continue;let p=s[d];s[d]=typeof p=="function"?await p(a,m({},n),l):p}if(l=s,typeof s.message!="string")throw new Error("prompt message is required");if({name:u,type:c}=s,S8[c]===void 0)throw new Error(`prompt type (${c}) is not defined`);if(i[s.name]!==void 0&&(a=await f(s,i[s.name]),a!==void 0)){n[u]=a;continue}try{a=ep._injected?qst(ep._injected,s.initial):await S8[c](s),n[u]=a=await f(s,a,!0),o=await t(s,a,n)}catch(d){o=!await r(s,n)}if(o)return n}return n}function qst(e,t){let r=e.shift();if(r instanceof Error)throw r;return r===void 0?t:r}function Lst(e){ep._injected=(ep._injected||[]).concat(e)}function Nst(e){ep._override=Object.assign({},e)}kle.exports=Object.assign(ep,{prompt:ep,prompts:S8,inject:Lst,override:Nst})});var A8=y((orr,Ple)=>{function Bst(e){e=(Array.isArray(e)?e:e.split(".")).map(Number);let t=0,r=process.versions.node.split(".").map(Number);for(;t<e.length;t++){if(r[t]>e[t])return!1;if(e[t]>r[t])return!0}return!1}Ple.exports=Bst("8.6.0")?Nue():Rle()});var qle=y((prr,jle)=>{jle.exports={name:"@sentry/craft",version:"0.30.1",description:"The universal sentry workflow CLI",main:"dist/craft",repository:"https://github.com/getsentry/craft",author:"Sentry",license:"MIT",bin:{craft:"dist/craft","sentry-craft":"dist/craft"},resolutions:{"**/set-value":">=2.0.1","**/https-proxy-agent":">=2.2.3","**/node-forge":">=0.10.0","**/dot-prop":">=4.2.1","**/kind-of":">=6.0.3","**/node-fetch":">=2.6.1","**/yargs-parser":">=18.1.2","**/parse-url":">=5.0.3","**/ansi-regex":">=5.0.1 < 6.0.0"},devDependencies:{"@aws-sdk/client-lambda":"^3.2.0","@google-cloud/storage":"^5.7.0","@octokit/plugin-retry":"^3.0.9","@octokit/request-error":"^2.1.0","@octokit/rest":"^18.10.0","@sentry/node":"4.6.3","@sentry/typescript":"^5.17.0","@types/async":"^3.0.1","@types/aws4":"^1.5.1","@types/cli-table":"^0.3.0","@types/git-url-parse":"^9.0.0","@types/is-ci":"^2.0.0","@types/jest":"^26.0.14","@types/js-yaml":"^4.0.5","@types/mkdirp":"^1.0.0","@types/node":"^12.11.1","@types/node-fetch":"^2.5.10","@types/ora":"^1.3.4","@types/prompts":"^2.0.11","@types/rimraf":"^2.0.2","@types/shell-quote":"^1.6.0","@types/tar":"^4.0.0","@types/tmp":"^0.0.33","@types/unzipper":"^0.10.3","@types/yargs":"^15.0.3","@typescript-eslint/eslint-plugin":"^3.3.0","@typescript-eslint/parser":"^3.3.0",ajv:"6.6.2",async:"3.1.0",aws4:"^1.11.0",chalk:"4.1.1","cli-table":"0.3.1",consola:"2.15.3",esbuild:"^0.11.6",eslint:"^7.2.0","eslint-config-prettier":"^6.11.0","fast-xml-parser":"^3.19.0","git-url-parse":"^11.4.4","is-ci":"^2.0.0",jest:"^26.5.3","js-yaml":"4.1.0","json-schema-to-typescript":"5.7.0",mkdirp:"0.5.1",mustache:"3.0.1",nock:"^13.2.4","node-fetch":"^2.6.1",nvar:"1.3.1",ora:"5.4.0",prettier:"^2.2.1",prompts:"2.4.1",rimraf:"2.7.1","shell-quote":"1.6.1","simple-git":"2.38.0","source-map-support":"^0.5.20",split:"1.0.1","string-length":"3.1.0",tar:"4.4.18",tmp:"0.1.0","ts-jest":"^26.5.5",typescript:"^4.1.3",unzipper:"0.10.11",yargs:"15.4.1"},scripts:{"build:fat":"yarn run compile-config-schema && tsc -p tsconfig.build.json","build:watch":"yarn run compile-config-schema && tsc -p tsconfig.build.json --watch",build:"yarn compile-config-schema && esbuild src/index.ts --sourcemap --bundle --platform=node --target=node14.17 --outfile=dist/craft --minify",precli:"yarn build",cli:"node -r source-map-support/register dist/craft",clean:"rimraf dist coverage",fix:"prettier --write .",test:"jest","test:watch":"jest --watch --notify","compile-config-schema":"node ./scripts/config-json-schema-to-ts.js"},volta:{node:"14.17.6",yarn:"1.22.10"}}});var ym=y((zc,Mle)=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});function q1(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var Bu=q1(require("stream")),Ule=q1(require("http")),k8=q1(require("url")),Gst=q1(require("https")),gm=q1(require("zlib")),Hst=Bu.Readable,Ef=Symbol("buffer"),T8=Symbol("type"),vm=class{constructor(){this[T8]="";let t=arguments[0],r=arguments[1],n=[],i=0;if(t){let s=t,o=Number(s.length);for(let u=0;u<o;u++){let c=s[u],l;c instanceof Buffer?l=c:ArrayBuffer.isView(c)?l=Buffer.from(c.buffer,c.byteOffset,c.byteLength):c instanceof ArrayBuffer?l=Buffer.from(c):c instanceof vm?l=c[Ef]:l=Buffer.from(typeof c=="string"?c:String(c)),i+=l.length,n.push(l)}}this[Ef]=Buffer.concat(n);let a=r&&r.type!==void 0&&String(r.type).toLowerCase();a&&!/[^\u0020-\u007E]/.test(a)&&(this[T8]=a)}get size(){return this[Ef].length}get type(){return this[T8]}text(){return Promise.resolve(this[Ef].toString())}arrayBuffer(){let t=this[Ef],r=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(r)}stream(){let t=new Hst;return t._read=function(){},t.push(this[Ef]),t.push(null),t}toString(){return"[object Blob]"}slice(){let t=this.size,r=arguments[0],n=arguments[1],i,a;r===void 0?i=0:r<0?i=Math.max(t+r,0):i=Math.min(r,t),n===void 0?a=t:n<0?a=Math.max(t+n,0):a=Math.min(n,t);let s=Math.max(a-i,0),u=this[Ef].slice(i,i+s),c=new vm([],{type:arguments[2]});return c[Ef]=u,c}};Object.defineProperties(vm.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});Object.defineProperty(vm.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0});function as(e,t,r){Error.call(this,e),this.message=e,this.type=t,r&&(this.code=this.errno=r.code),Error.captureStackTrace(this,this.constructor)}as.prototype=Object.create(Error.prototype);as.prototype.constructor=as;as.prototype.name="FetchError";var R8;try{R8=require("encoding").convert}catch(e){}var _f=Symbol("Body internals"),zle=Bu.PassThrough;function wa(e){var t=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.size;let i=n===void 0?0:n;var a=r.timeout;let s=a===void 0?0:a;e==null?e=null:$le(e)?e=Buffer.from(e.toString()):L1(e)||Buffer.isBuffer(e)||(Object.prototype.toString.call(e)==="[object ArrayBuffer]"?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof Bu||(e=Buffer.from(String(e)))),this[_f]={body:e,disturbed:!1,error:null},this.size=i,this.timeout=s,e instanceof Bu&&e.on("error",function(o){let u=o.name==="AbortError"?o:new as(`Invalid response body while trying to fetch ${t.url}: ${o.message}`,"system",o);t[_f].error=u})}wa.prototype={get body(){return this[_f].body},get bodyUsed(){return this[_f].disturbed},arrayBuffer(){return b0.call(this).then(function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)})},blob(){let e=this.headers&&this.headers.get("content-type")||"";return b0.call(this).then(function(t){return Object.assign(new vm([],{type:e.toLowerCase()}),{[Ef]:t})})},json(){var e=this;return b0.call(this).then(function(t){try{return JSON.parse(t.toString())}catch(r){return wa.Promise.reject(new as(`invalid json response body at ${e.url} reason: ${r.message}`,"invalid-json"))}})},text(){return b0.call(this).then(function(e){return e.toString()})},buffer(){return b0.call(this)},textConverted(){var e=this;return b0.call(this).then(function(t){return Vst(t,e.headers)})}};Object.defineProperties(wa.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});wa.mixIn=function(e){for(let t of Object.getOwnPropertyNames(wa.prototype))if(!(t in e)){let r=Object.getOwnPropertyDescriptor(wa.prototype,t);Object.defineProperty(e,t,r)}};function b0(){var e=this;if(this[_f].disturbed)return wa.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[_f].disturbed=!0,this[_f].error)return wa.Promise.reject(this[_f].error);let t=this.body;if(t===null)return wa.Promise.resolve(Buffer.alloc(0));if(L1(t)&&(t=t.stream()),Buffer.isBuffer(t))return wa.Promise.resolve(t);if(!(t instanceof Bu))return wa.Promise.resolve(Buffer.alloc(0));let r=[],n=0,i=!1;return new wa.Promise(function(a,s){let o;e.timeout&&(o=setTimeout(function(){i=!0,s(new as(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))},e.timeout)),t.on("error",function(u){u.name==="AbortError"?(i=!0,s(u)):s(new as(`Invalid response body while trying to fetch ${e.url}: ${u.message}`,"system",u))}),t.on("data",function(u){if(!(i||u===null)){if(e.size&&n+u.length>e.size){i=!0,s(new as(`content size at ${e.url} over limit: ${e.size}`,"max-size"));return}n+=u.length,r.push(u)}}),t.on("end",function(){if(!i){clearTimeout(o);try{a(Buffer.concat(r,n))}catch(u){s(new as(`Could not create Buffer from response body for ${e.url}: ${u.message}`,"system",u))}}})})}function Vst(e,t){if(typeof R8!="function")throw new Error("The package `encoding` must be installed to use the textConverted() function");let r=t.get("content-type"),n="utf-8",i,a;return r&&(i=/charset=([^;]*)/i.exec(r)),a=e.slice(0,1024).toString(),!i&&a&&(i=/<meta.+?charset=(['"])(.+?)\1/i.exec(a)),!i&&a&&(i=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(a),i||(i=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(a),i&&i.pop()),i&&(i=/charset=(.*)/i.exec(i.pop()))),!i&&a&&(i=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(a)),i&&(n=i.pop(),(n==="gb2312"||n==="gbk")&&(n="gb18030")),R8(e,"UTF-8",n).toString()}function $le(e){return typeof e!="object"||typeof e.append!="function"||typeof e.delete!="function"||typeof e.get!="function"||typeof e.getAll!="function"||typeof e.has!="function"||typeof e.set!="function"?!1:e.constructor.name==="URLSearchParams"||Object.prototype.toString.call(e)==="[object URLSearchParams]"||typeof e.sort=="function"}function L1(e){return typeof e=="object"&&typeof e.arrayBuffer=="function"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.constructor=="function"&&typeof e.constructor.name=="string"&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function Gle(e){let t,r,n=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return n instanceof Bu&&typeof n.getBoundary!="function"&&(t=new zle,r=new zle,n.pipe(t),n.pipe(r),e[_f].body=t,n=r),n}function Hle(e){return e===null?null:typeof e=="string"?"text/plain;charset=UTF-8":$le(e)?"application/x-www-form-urlencoded;charset=UTF-8":L1(e)?e.type||null:Buffer.isBuffer(e)||Object.prototype.toString.call(e)==="[object ArrayBuffer]"||ArrayBuffer.isView(e)?null:typeof e.getBoundary=="function"?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof Bu?null:"text/plain;charset=UTF-8"}function Vle(e){let t=e.body;return t===null?0:L1(t)?t.size:Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&(t._lengthRetrievers&&t._lengthRetrievers.length==0||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}function Kst(e,t){let r=t.body;r===null?e.end():L1(r)?r.stream().pipe(e):Buffer.isBuffer(r)?(e.write(r),e.end()):r.pipe(e)}wa.Promise=global.Promise;var Kle=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,P8=/[^\t\x20-\x7e\x80-\xff]/;function N1(e){if(e=`${e}`,Kle.test(e)||e==="")throw new TypeError(`${e} is not a legal HTTP header name`)}function Jle(e){if(e=`${e}`,P8.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function w0(e,t){t=t.toLowerCase();for(let r in e)if(r.toLowerCase()===t)return r}var Li=Symbol("map"),go=class{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;if(this[Li]=Object.create(null),t instanceof go){let r=t.raw(),n=Object.keys(r);for(let i of n)for(let a of r[i])this.append(i,a);return}if(t!=null)if(typeof t=="object"){let r=t[Symbol.iterator];if(r!=null){if(typeof r!="function")throw new TypeError("Header pairs must be iterable");let n=[];for(let i of t){if(typeof i!="object"||typeof i[Symbol.iterator]!="function")throw new TypeError("Each header pair must be iterable");n.push(Array.from(i))}for(let i of n){if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");this.append(i[0],i[1])}}else for(let n of Object.keys(t)){let i=t[n];this.append(n,i)}}else throw new TypeError("Provided initializer must be an object")}get(t){t=`${t}`,N1(t);let r=w0(this[Li],t);return r===void 0?null:this[Li][r].join(", ")}forEach(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=F8(this),i=0;for(;i<n.length;){var a=n[i];let s=a[0],o=a[1];t.call(r,o,s,this),n=F8(this),i++}}set(t,r){t=`${t}`,r=`${r}`,N1(t),Jle(r);let n=w0(this[Li],t);this[Li][n!==void 0?n:t]=[r]}append(t,r){t=`${t}`,r=`${r}`,N1(t),Jle(r);let n=w0(this[Li],t);n!==void 0?this[Li][n].push(r):this[Li][t]=[r]}has(t){return t=`${t}`,N1(t),w0(this[Li],t)!==void 0}delete(t){t=`${t}`,N1(t);let r=w0(this[Li],t);r!==void 0&&delete this[Li][r]}raw(){return this[Li]}keys(){return I8(this,"key")}values(){return I8(this,"value")}[Symbol.iterator](){return I8(this,"key+value")}};go.prototype.entries=go.prototype[Symbol.iterator];Object.defineProperty(go.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(go.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});function F8(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key+value";return Object.keys(e[Li]).sort().map(t==="key"?function(n){return n.toLowerCase()}:t==="value"?function(n){return e[Li][n].join(", ")}:function(n){return[n.toLowerCase(),e[Li][n].join(", ")]})}var O8=Symbol("internal");function I8(e,t){let r=Object.create(j8);return r[O8]={target:e,kind:t,index:0},r}var j8=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==j8)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[O8];let t=e.target,r=e.kind,n=e.index,i=F8(t,r),a=i.length;return n>=a?{value:void 0,done:!0}:(this[O8].index=n+1,{value:i[n],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Object.defineProperty(j8,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});function Jst(e){let t=Object.assign({__proto__:null},e[Li]),r=w0(e[Li],"Host");return r!==void 0&&(t[r]=t[r][0]),t}function Wst(e){let t=new go;for(let r of Object.keys(e))if(!Kle.test(r))if(Array.isArray(e[r]))for(let n of e[r])P8.test(n)||(t[Li][r]===void 0?t[Li][r]=[n]:t[Li][r].push(n));else P8.test(e[r])||(t[Li][r]=[e[r]]);return t}var ip=Symbol("Response internals"),Yst=Ule.STATUS_CODES,Jo=class{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};wa.call(this,t,r);let n=r.status||200,i=new go(r.headers);if(t!=null&&!i.has("Content-Type")){let a=Hle(t);a&&i.append("Content-Type",a)}this[ip]={url:r.url,status:n,statusText:r.statusText||Yst[n],headers:i,counter:r.counter}}get url(){return this[ip].url||""}get status(){return this[ip].status}get ok(){return this[ip].status>=200&&this[ip].status<300}get redirected(){return this[ip].counter>0}get statusText(){return this[ip].statusText}get headers(){return this[ip].headers}clone(){return new Jo(Gle(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}};wa.mixIn(Jo.prototype);Object.defineProperties(Jo.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});Object.defineProperty(Jo.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});var xf=Symbol("Request internals"),q8=k8.parse,Qst=k8.format,Xst="destroy"in Bu.Readable.prototype;function MA(e){return typeof e=="object"&&typeof e[xf]=="object"}function Zst(e){let t=e&&typeof e=="object"&&Object.getPrototypeOf(e);return!!(t&&t.constructor.name==="AbortSignal")}var Cf=class{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n;MA(t)?n=q8(t.url):(t&&t.href?n=q8(t.href):n=q8(`${t}`),t={});let i=r.method||t.method||"GET";if(i=i.toUpperCase(),(r.body!=null||MA(t)&&t.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let a=r.body!=null?r.body:MA(t)&&t.body!==null?Gle(t):null;wa.call(this,a,{timeout:r.timeout||t.timeout||0,size:r.size||t.size||0});let s=new go(r.headers||t.headers||{});if(a!=null&&!s.has("Content-Type")){let u=Hle(a);u&&s.append("Content-Type",u)}let o=MA(t)?t.signal:null;if("signal"in r&&(o=r.signal),o!=null&&!Zst(o))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[xf]={method:i,redirect:r.redirect||t.redirect||"follow",headers:s,parsedURL:n,signal:o},this.follow=r.follow!==void 0?r.follow:t.follow!==void 0?t.follow:20,this.compress=r.compress!==void 0?r.compress:t.compress!==void 0?t.compress:!0,this.counter=r.counter||t.counter||0,this.agent=r.agent||t.agent}get method(){return this[xf].method}get url(){return Qst(this[xf].parsedURL)}get headers(){return this[xf].headers}get redirect(){return this[xf].redirect}get signal(){return this[xf].signal}clone(){return new Cf(this)}};wa.mixIn(Cf.prototype);Object.defineProperty(Cf.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(Cf.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}});function eot(e){let t=e[xf].parsedURL,r=new go(e[xf].headers);if(r.has("Accept")||r.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof Bu.Readable&&!Xst)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let n=null;if(e.body==null&&/^(POST|PUT)$/i.test(e.method)&&(n="0"),e.body!=null){let a=Vle(e);typeof a=="number"&&(n=String(a))}n&&r.set("Content-Length",n),r.has("User-Agent")||r.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip,deflate");let i=e.agent;return typeof i=="function"&&(i=i(t)),!r.has("Connection")&&!i&&r.set("Connection","close"),Object.assign({},t,{method:e.method,headers:Jst(r),agent:i})}function B1(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}B1.prototype=Object.create(Error.prototype);B1.prototype.constructor=B1;B1.prototype.name="AbortError";var Wle=Bu.PassThrough,tot=k8.resolve;function ap(e,t){if(!ap.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return wa.Promise=ap.Promise,new ap.Promise(function(r,n){let i=new Cf(e,t),a=eot(i),s=(a.protocol==="https:"?Gst:Ule).request,o=i.signal,u=null,c=function(){let g=new B1("The user aborted a request.");n(g),i.body&&i.body instanceof Bu.Readable&&i.body.destroy(g),!(!u||!u.body)&&u.body.emit("error",g)};if(o&&o.aborted){c();return}let l=function(){c(),p()},f=s(a),d;o&&o.addEventListener("abort",l);function p(){f.abort(),o&&o.removeEventListener("abort",l),clearTimeout(d)}i.timeout&&f.once("socket",function(h){d=setTimeout(function(){n(new as(`network timeout at: ${i.url}`,"request-timeout")),p()},i.timeout)}),f.on("error",function(h){n(new as(`request to ${i.url} failed, reason: ${h.message}`,"system",h)),p()}),f.on("response",function(h){clearTimeout(d);let g=Wst(h.headers);if(ap.isRedirect(h.statusCode)){let S=g.get("Location"),F=S===null?null:tot(i.url,S);switch(i.redirect){case"error":n(new as(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),p();return;case"manual":if(F!==null)try{g.set("Location",F)}catch(K){n(K)}break;case"follow":if(F===null)break;if(i.counter>=i.follow){n(new as(`maximum redirect reached at: ${i.url}`,"max-redirect")),p();return}let P={headers:new go(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:i.body,signal:i.signal,timeout:i.timeout,size:i.size};if(h.statusCode!==303&&i.body&&Vle(i)===null){n(new as("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(h.statusCode===303||(h.statusCode===301||h.statusCode===302)&&i.method==="POST")&&(P.method="GET",P.body=void 0,P.headers.delete("content-length")),r(ap(new Cf(F,P))),p();return}}h.once("end",function(){o&&o.removeEventListener("abort",l)});let v=h.pipe(new Wle),b={url:i.url,status:h.statusCode,statusText:h.statusMessage,headers:g,size:i.size,timeout:i.timeout,counter:i.counter},E=g.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||E===null||h.statusCode===204||h.statusCode===304){u=new Jo(v,b),r(u);return}let _={flush:gm.Z_SYNC_FLUSH,finishFlush:gm.Z_SYNC_FLUSH};if(E=="gzip"||E=="x-gzip"){v=v.pipe(gm.createGunzip(_)),u=new Jo(v,b),r(u);return}if(E=="deflate"||E=="x-deflate"){h.pipe(new Wle).once("data",function(F){(F[0]&15)==8?v=v.pipe(gm.createInflate()):v=v.pipe(gm.createInflateRaw()),u=new Jo(v,b),r(u)});return}if(E=="br"&&typeof gm.createBrotliDecompress=="function"){v=v.pipe(gm.createBrotliDecompress()),u=new Jo(v,b),r(u);return}u=new Jo(v,b),r(u)}),Kst(f,i)})}ap.isRedirect=function(e){return e===301||e===302||e===303||e===307||e===308};ap.Promise=global.Promise;Mle.exports=zc=ap;Object.defineProperty(zc,"__esModule",{value:!0});zc.default=zc;zc.Headers=go;zc.Request=Cf;zc.Response=Jo;zc.FetchError=as});var Xle=y((Yle,Qle)=>{var rot=require("stream");Yle=Qle.exports=L8;L8.through=L8;function L8(e,t,r){e=e||function(l){this.queue(l)},t=t||function(){this.queue(null)};var n=!1,i=!1,a=[],s=!1,o=new rot;o.readable=o.writable=!0,o.paused=!1,o.autoDestroy=!(r&&r.autoDestroy===!1),o.write=function(l){return e.call(this,l),!o.paused};function u(){for(;a.length&&!o.paused;){var l=a.shift();if(l===null)return o.emit("end");o.emit("data",l)}}o.queue=o.push=function(l){return s||(l===null&&(s=!0),a.push(l),u()),o},o.on("end",function(){o.readable=!1,!o.writable&&o.autoDestroy&&process.nextTick(function(){o.destroy()})});function c(){o.writable=!1,t.call(o),!o.readable&&o.autoDestroy&&o.destroy()}return o.end=function(l){if(!n)return n=!0,arguments.length&&o.write(l),c(),o},o.destroy=function(){if(!i)return i=!0,n=!0,a.length=0,o.writable=o.readable=!1,o.emit("close"),o},o.pause=function(){if(!o.paused)return o.paused=!0,o},o.resume=function(){return o.paused&&(o.paused=!1,o.emit("resume")),u(),o.paused||o.emit("drain"),o},o}});var efe=y((grr,Zle)=>{var not=Xle(),iot=require("string_decoder").StringDecoder;Zle.exports=aot;function aot(e,t,r){var n=new iot,i="",a=r&&r.maxLength,s=!(r&&r.trailing===!1);typeof e=="function"&&(t=e,e=null),e||(e=/\r?\n/);function o(c,l){if(t){try{l=t(l)}catch(f){return c.emit("error",f)}typeof l!="undefined"&&c.queue(l)}else c.queue(l)}function u(c,l){var f=((i??"")+l).split(e);if(i=f.pop(),a&&i.length>a)return c.emit("error",new Error("maximum buffer reached"));for(var d=0;d<f.length;d++){var p=f[d];o(c,p)}}return not(function(c){u(this,n.write(c))},function(){n.end&&u(this,n.end()),s&&i!=null&&o(this,i),this.queue(null)})}});var E0=y((yrr,tfe)=>{"use strict";var rfe=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]),vrr=tfe.exports=e=>e?Object.keys(e).map(t=>[rfe.has(t)?rfe.get(t):t,e[t]]).reduce((t,r)=>(t[r[0]]=r[1],t),Object.create(null)):{}});var afe=y((N8,nfe)=>{var UA=require("buffer"),$c=UA.Buffer;function ife(e,t){for(var r in e)t[r]=e[r]}$c.from&&$c.alloc&&$c.allocUnsafe&&$c.allocUnsafeSlow?nfe.exports=UA:(ife(UA,N8),N8.Buffer=bm);function bm(e,t,r){return $c(e,t,r)}bm.prototype=Object.create($c.prototype);ife($c,bm);bm.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return $c(e,t,r)};bm.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=$c(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};bm.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return $c(e)};bm.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return UA.SlowBuffer(e)}});var sp=y((brr,sfe)=>{"use strict";var B8=Buffer;B8.alloc||(B8=afe().Buffer);sfe.exports=B8});var ufe=y((wrr,ofe)=>{"use strict";ofe.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}});var zA=y((Err,cfe)=>{"use strict";cfe.exports=bn;bn.Node=wm;bn.create=bn;function bn(e){var t=this;if(t instanceof bn||(t=new bn),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(i){t.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)t.push(arguments[r]);return t}bn.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t};bn.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}};bn.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}};bn.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)sot(this,arguments[e]);return this.length};bn.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)oot(this,arguments[e]);return this.length};bn.prototype.pop=function(){if(!!this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}};bn.prototype.shift=function(){if(!!this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}};bn.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;r!==null;n++)e.call(t,r.value,n,this),r=r.next};bn.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;r!==null;n--)e.call(t,r.value,n,this),r=r.prev};bn.prototype.get=function(e){for(var t=0,r=this.head;r!==null&&t<e;t++)r=r.next;if(t===e&&r!==null)return r.value};bn.prototype.getReverse=function(e){for(var t=0,r=this.tail;r!==null&&t<e;t++)r=r.prev;if(t===e&&r!==null)return r.value};bn.prototype.map=function(e,t){t=t||this;for(var r=new bn,n=this.head;n!==null;)r.push(e.call(t,n.value,this)),n=n.next;return r};bn.prototype.mapReverse=function(e,t){t=t||this;for(var r=new bn,n=this.tail;n!==null;)r.push(e.call(t,n.value,this)),n=n.prev;return r};bn.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=e(r,n.value,i),n=n.next;return r};bn.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=e(r,n.value,i),n=n.prev;return r};bn.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;r!==null;t++)e[t]=r.value,r=r.next;return e};bn.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;r!==null;t++)e[t]=r.value,r=r.prev;return e};bn.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new bn;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=0,i=this.head;i!==null&&n<e;n++)i=i.next;for(;i!==null&&n<t;n++,i=i.next)r.push(i.value);return r};bn.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new bn;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=this.length,i=this.tail;i!==null&&n>t;n--)i=i.prev;for(;i!==null&&n>e;n--,i=i.prev)r.push(i.value);return r};bn.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,n=this.head;n!==null&&r<e;r++)n=n.next;for(var i=[],r=0;n&&r<t;r++)i.push(n.value),n=this.removeNode(n);n===null&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(var r=2;r<arguments.length;r++)n=uot(this,n,arguments[r]);return i};bn.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};function uot(e,t,r){var n=t===e.head?new wm(r,null,t,e):new wm(r,t,t.next,e);return n.next===null&&(e.tail=n),n.prev===null&&(e.head=n),e.length++,n}function sot(e,t){e.tail=new wm(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function oot(e,t){e.head=new wm(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function wm(e,t,r,n){if(!(this instanceof wm))return new wm(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{ufe()(bn)}catch(e){}});var Ss=y((M8,lfe)=>{var $A=require("buffer"),Sf=$A.Buffer;function ffe(e,t){for(var r in e)t[r]=e[r]}Sf.from&&Sf.alloc&&Sf.allocUnsafe&&Sf.allocUnsafeSlow?lfe.exports=$A:(ffe($A,M8),M8.Buffer=_0);function _0(e,t,r){return Sf(e,t,r)}ffe(Sf,_0);_0.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Sf(e,t,r)};_0.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Sf(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};_0.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Sf(e)};_0.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return $A.SlowBuffer(e)}});var x0=y((_rr,dfe)=>{"use strict";var pfe=require("events"),M1=zA(),hfe=require("string_decoder").StringDecoder,Af=Symbol("EOF"),U1=Symbol("maybeEmitEnd"),op=Symbol("emittedEnd"),GA=Symbol("emittingEnd"),HA=Symbol("closed"),mfe=Symbol("read"),gfe=Symbol("flush"),vfe=Symbol("flushChunk"),Vs=Symbol("encoding"),Df=Symbol("decoder"),VA=Symbol("flowing"),z1=Symbol("paused"),$1=Symbol("resume"),Ks=Symbol("bufferLength"),yfe=Symbol("bufferPush"),U8=Symbol("bufferShift"),Js=Symbol("objectMode"),ss=Symbol("destroyed"),bfe=global._MP_NO_ITERATOR_SYMBOLS_!=="1",cot=bfe&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),lot=bfe&&Symbol.iterator||Symbol("iterator not implemented"),up=Buffer.alloc?Buffer:Ss().Buffer,wfe=e=>e==="end"||e==="finish"||e==="prefinish",fot=e=>e instanceof ArrayBuffer||typeof e=="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0,dot=e=>!up.isBuffer(e)&&ArrayBuffer.isView(e);dfe.exports=class Efe extends pfe{constructor(t){super();this[VA]=!1,this[z1]=!1,this.pipes=new M1,this.buffer=new M1,this[Js]=t&&t.objectMode||!1,this[Js]?this[Vs]=null:this[Vs]=t&&t.encoding||null,this[Vs]==="buffer"&&(this[Vs]=null),this[Df]=this[Vs]?new hfe(this[Vs]):null,this[Af]=!1,this[op]=!1,this[GA]=!1,this[HA]=!1,this.writable=!0,this.readable=!0,this[Ks]=0,this[ss]=!1}get bufferLength(){return this[Ks]}get encoding(){return this[Vs]}set encoding(t){if(this[Js])throw new Error("cannot set encoding in objectMode");if(this[Vs]&&t!==this[Vs]&&(this[Df]&&this[Df].lastNeed||this[Ks]))throw new Error("cannot change encoding");this[Vs]!==t&&(this[Df]=t?new hfe(t):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[Df].write(r)))),this[Vs]=t}setEncoding(t){this.encoding=t}get objectMode(){return this[Js]}set objectMode(t){this[Js]=this[Js]||!!t}write(t,r,n){if(this[Af])throw new Error("write after end");if(this[ss])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;if(typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8"),!this[Js]&&!up.isBuffer(t)&&(dot(t)?t=up.from(t.buffer,t.byteOffset,t.byteLength):fot(t)?t=up.from(t):typeof t!="string"&&(this.objectMode=!0)),!this.objectMode&&!t.length){let i=this.flowing;return this[Ks]!==0&&this.emit("readable"),n&&n(),i}typeof t=="string"&&!this[Js]&&!(r===this[Vs]&&!this[Df].lastNeed)&&(t=up.from(t,r)),up.isBuffer(t)&&this[Vs]&&(t=this[Df].write(t));try{return this.flowing?(this.emit("data",t),this.flowing):(this[yfe](t),!1)}finally{this[Ks]!==0&&this.emit("readable"),n&&n()}}read(t){if(this[ss])return null;try{return this[Ks]===0||t===0||t>this[Ks]?null:(this[Js]&&(t=null),this.buffer.length>1&&!this[Js]&&(this.encoding?this.buffer=new M1([Array.from(this.buffer).join("")]):this.buffer=new M1([up.concat(Array.from(this.buffer),this[Ks])])),this[mfe](t||null,this.buffer.head.value))}finally{this[U1]()}}[mfe](t,r){return t===r.length||t===null?this[U8]():(this.buffer.head.value=r.slice(t),r=r.slice(0,t),this[Ks]-=t),this.emit("data",r),!this.buffer.length&&!this[Af]&&this.emit("drain"),r}end(t,r,n){return typeof t=="function"&&(n=t,t=null),typeof r=="function"&&(n=r,r="utf8"),t&&this.write(t,r),n&&this.once("end",n),this[Af]=!0,this.writable=!1,(this.flowing||!this[z1])&&this[U1](),this}[$1](){this[ss]||(this[z1]=!1,this[VA]=!0,this.emit("resume"),this.buffer.length?this[gfe]():this[Af]?this[U1]():this.emit("drain"))}resume(){return this[$1]()}pause(){this[VA]=!1,this[z1]=!0}get destroyed(){return this[ss]}get flowing(){return this[VA]}get paused(){return this[z1]}[yfe](t){return this[Js]?this[Ks]+=1:this[Ks]+=t.length,this.buffer.push(t)}[U8](){return this.buffer.length&&(this[Js]?this[Ks]-=1:this[Ks]-=this.buffer.head.value.length),this.buffer.shift()}[gfe](){do;while(this[vfe](this[U8]()));!this.buffer.length&&!this[Af]&&this.emit("drain")}[vfe](t){return t?(this.emit("data",t),this.flowing):!1}pipe(t,r){if(this[ss])return;let n=this[op];r=r||{},t===process.stdout||t===process.stderr?r.end=!1:r.end=r.end!==!1;let i={dest:t,opts:r,ondrain:a=>this[$1]()};return this.pipes.push(i),t.on("drain",i.ondrain),this[$1](),n&&i.opts.end&&i.dest.end(),t}addListener(t,r){return this.on(t,r)}on(t,r){try{return super.on(t,r)}finally{t==="data"&&!this.pipes.length&&!this.flowing?this[$1]():wfe(t)&&this[op]&&(super.emit(t),this.removeAllListeners(t))}}get emittedEnd(){return this[op]}[U1](){!this[GA]&&!this[op]&&!this[ss]&&this.buffer.length===0&&this[Af]&&(this[GA]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[HA]&&this.emit("close"),this[GA]=!1)}emit(t,r){if(t!=="error"&&t!=="close"&&t!==ss&&this[ss])return;if(t==="data"){if(!r)return;this.pipes.length&&this.pipes.forEach(i=>i.dest.write(r)===!1&&this.pause())}else if(t==="end"){if(this[op]===!0)return;this[op]=!0,this.readable=!1,this[Df]&&(r=this[Df].end(),r&&(this.pipes.forEach(i=>i.dest.write(r)),super.emit("data",r))),this.pipes.forEach(i=>{i.dest.removeListener("drain",i.ondrain),i.opts.end&&i.dest.end()})}else if(t==="close"&&(this[HA]=!0,!this[op]&&!this[ss]))return;let n=new Array(arguments.length);if(n[0]=t,n[1]=r,arguments.length>2)for(let i=2;i<arguments.length;i++)n[i]=arguments[i];try{return super.emit.apply(this,n)}finally{wfe(t)?this.removeAllListeners(t):this[U1]()}}collect(){let t=[];return t.dataLength=0,this.on("data",r=>{t.push(r),t.dataLength+=r.length}),this.promise().then(()=>t)}concat(){return this[Js]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(t=>this[Js]?Promise.reject(new Error("cannot concat in objectMode")):this[Vs]?t.join(""):up.concat(t,t.dataLength))}promise(){return new Promise((t,r)=>{this.on(ss,()=>r(new Error("stream destroyed"))),this.on("end",()=>t()),this.on("error",n=>r(n))})}[cot](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[Af])return Promise.resolve({done:!0});let n=null,i=null,a=c=>{this.removeListener("data",s),this.removeListener("end",o),i(c)},s=c=>{this.removeListener("error",a),this.removeListener("end",o),this.pause(),n({value:c,done:!!this[Af]})},o=()=>{this.removeListener("error",a),this.removeListener("data",s),n({done:!0})},u=()=>a(new Error("stream destroyed"));return new Promise((c,l)=>{i=l,n=c,this.once(ss,u),this.once("error",a),this.once("end",o),this.once("data",s)})}}}[lot](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(t){return this[ss]?(t?this.emit("error",t):this.emit(ss),this):(this[ss]=!0,this.buffer=new M1,this[Ks]=0,typeof this.close=="function"&&!this[HA]&&this.close(),t?this.emit("error",t):this.emit(ss),this)}static isStream(t){return!!t&&(t instanceof Efe||t instanceof pfe&&(typeof t.pipe=="function"||typeof t.write=="function"&&typeof t.end=="function"))}}});var xfe=y((xrr,_fe)=>{var pot=require("zlib").constants||{ZLIB_VERNUM:4736};_fe.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:Infinity,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},pot))});var Y8=y(vo=>{"use strict";var z8=require("assert"),cp=require("buffer").Buffer,Cfe=require("zlib"),Em=vo.constants=xfe(),hot=x0(),Sfe=cp.concat,KA=class extends Error{constructor(t){super("zlib: "+t.message);this.code=t.code,this.errno=t.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+t.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},mot=Symbol("opts"),G1=Symbol("flushFlag"),Afe=Symbol("finishFlushFlag"),$8=Symbol("fullFlushFlag"),ui=Symbol("handle"),G8=Symbol("onError"),JA=Symbol("sawError"),H8=Symbol("level"),V8=Symbol("strategy"),K8=Symbol("ended"),Crr=Symbol("_defaultFullFlush"),J8=class extends hot{constructor(t,r){if(!t||typeof t!="object")throw new TypeError("invalid options for ZlibBase constructor");super(t);this[K8]=!1,this[mot]=t,this[G1]=t.flush,this[Afe]=t.finishFlush;try{this[ui]=new Cfe[r](t)}catch(n){throw new KA(n)}this[G8]=n=>{this[JA]=!0,this.close(),this.emit("error",n)},this[ui].on("error",n=>this[G8](new KA(n))),this.once("end",()=>this.close)}close(){this[ui]&&(this[ui].close(),this[ui]=null,this.emit("close"))}reset(){if(!this[JA])return z8(this[ui],"zlib binding closed"),this[ui].reset()}flush(t){this.ended||(typeof t!="number"&&(t=this[$8]),this.write(Object.assign(cp.alloc(0),{[G1]:t})))}end(t,r,n){return t&&this.write(t,r),this.flush(this[Afe]),this[K8]=!0,super.end(null,null,n)}get ended(){return this[K8]}write(t,r,n){if(typeof r=="function"&&(n=r,r="utf8"),typeof t=="string"&&(t=cp.from(t,r)),this[JA])return;z8(this[ui],"zlib binding closed");let i=this[ui]._handle,a=i.close;i.close=()=>{};let s=this[ui].close;this[ui].close=()=>{},cp.concat=c=>c;let o;try{let c=typeof t[G1]=="number"?t[G1]:this[G1];o=this[ui]._processChunk(t,c),cp.concat=Sfe}catch(c){cp.concat=Sfe,this[G8](new KA(c))}finally{this[ui]&&(this[ui]._handle=i,i.close=a,this[ui].close=s,this[ui].removeAllListeners("error"))}let u;if(o)if(Array.isArray(o)&&o.length>0){u=super.write(cp.from(o[0]));for(let c=1;c<o.length;c++)u=super.write(o[c])}else u=super.write(cp.from(o));return n&&n(),u}},lp=class extends J8{constructor(t,r){t=t||{},t.flush=t.flush||Em.Z_NO_FLUSH,t.finishFlush=t.finishFlush||Em.Z_FINISH,super(t,r),this[$8]=Em.Z_FULL_FLUSH,this[H8]=t.level,this[V8]=t.strategy}params(t,r){if(!this[JA]){if(!this[ui])throw new Error("cannot switch params when binding is closed");if(!this[ui].params)throw new Error("not supported in this implementation");if(this[H8]!==t||this[V8]!==r){this.flush(Em.Z_SYNC_FLUSH),z8(this[ui],"zlib binding closed");let n=this[ui].flush;this[ui].flush=(i,a)=>{this.flush(i),a()};try{this[ui].params(t,r)}finally{this[ui].flush=n}this[ui]&&(this[H8]=t,this[V8]=r)}}}},Dfe=class extends lp{constructor(t){super(t,"Deflate")}},kfe=class extends lp{constructor(t){super(t,"Inflate")}},Tfe=class extends lp{constructor(t){super(t,"Gzip")}},Rfe=class extends lp{constructor(t){super(t,"Gunzip")}},Pfe=class extends lp{constructor(t){super(t,"DeflateRaw")}},Ffe=class extends lp{constructor(t){super(t,"InflateRaw")}},Ife=class extends lp{constructor(t){super(t,"Unzip")}},W8=class extends J8{constructor(t,r){t=t||{},t.flush=t.flush||Em.BROTLI_OPERATION_PROCESS,t.finishFlush=t.finishFlush||Em.BROTLI_OPERATION_FINISH,super(t,r),this[$8]=Em.BROTLI_OPERATION_FLUSH}},Ofe=class extends W8{constructor(t){super(t,"BrotliCompress")}},jfe=class extends W8{constructor(t){super(t,"BrotliDecompress")}};vo.Deflate=Dfe;vo.Inflate=kfe;vo.Gzip=Tfe;vo.Gunzip=Rfe;vo.DeflateRaw=Pfe;vo.InflateRaw=Ffe;vo.Unzip=Ife;typeof Cfe.BrotliCompress=="function"?(vo.BrotliCompress=Ofe,vo.BrotliDecompress=jfe):vo.BrotliCompress=vo.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var YA=y(WA=>{"use strict";WA.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);WA.code=new Map(Array.from(WA.name).map(e=>[e[1],e[0]]))});var _m=y((Drr,qfe)=>{var got=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;qfe.exports=got!=="win32"?e=>e:e=>e&&e.replace(/\\/g,"/")});var H1=y((Rrr,Lfe)=>{"use strict";var krr=YA(),vot=x0(),Q8=_m(),X8=Symbol("slurp");Lfe.exports=class extends vot{constructor(t,r,n){super();switch(this.pause(),this.extended=r,this.globalExtended=n,this.header=t,this.startBlockSize=512*Math.ceil(t.size/512),this.blockRemain=this.startBlockSize,this.remain=t.size,this.type=t.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=Q8(t.path),this.mode=t.mode,this.mode&&(this.mode=this.mode&4095),this.uid=t.uid,this.gid=t.gid,this.uname=t.uname,this.gname=t.gname,this.size=t.size,this.mtime=t.mtime,this.atime=t.atime,this.ctime=t.ctime,this.linkpath=Q8(t.linkpath),this.uname=t.uname,this.gname=t.gname,r&&this[X8](r),n&&this[X8](n,!0)}write(t){let r=t.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");let n=this.remain,i=this.blockRemain;return this.remain=Math.max(0,n-r),this.blockRemain=Math.max(0,i-r),this.ignore?!0:n>=r?super.write(t):super.write(t.slice(0,n))}[X8](t,r){for(let n in t)t[n]!==null&&t[n]!==void 0&&!(r&&n==="path")&&(this[n]=n==="path"||n==="linkpath"?Q8(t[n]):t[n])}}});var Mfe=y(Z8=>{"use strict";var Prr=Z8.encode=(e,t)=>{if(Number.isSafeInteger(e))e<0?bot(e,t):yot(e,t);else throw TypeError("cannot encode number outside of javascript safe integer range");return t},yot=(e,t)=>{t[0]=128;for(var r=t.length;r>1;r--)t[r-1]=e&255,e=Math.floor(e/256)},bot=(e,t)=>{t[0]=255;var r=!1;e=e*-1;for(var n=t.length;n>1;n--){var i=e&255;e=Math.floor(e/256),r?t[n-1]=Nfe(i):i===0?t[n-1]=0:(r=!0,t[n-1]=Bfe(i))}},Frr=Z8.parse=e=>{var t=e[e.length-1],r=e[0],n;if(r===128)n=Eot(e.slice(1,e.length));else if(r===255)n=wot(e);else throw TypeError("invalid base256 encoding");if(!Number.isSafeInteger(n))throw TypeError("parsed number outside of javascript safe integer range");return n},wot=e=>{for(var t=e.length,r=0,n=!1,i=t-1;i>-1;i--){var a=e[i],s;n?s=Nfe(a):a===0?s=a:(n=!0,s=Bfe(a)),s!==0&&(r-=s*Math.pow(256,t-i-1))}return r},Eot=e=>{for(var t=e.length,r=0,n=t-1;n>-1;n--){var i=e[n];i!==0&&(r+=i*Math.pow(256,t-n-1))}return r},Nfe=e=>(255^e)&255,Bfe=e=>(255^e)+1&255});var S0=y((Orr,Ufe)=>{"use strict";var fp=sp(),e6=YA(),C0=require("path").posix,zfe=Mfe(),t6=Symbol("slurp"),yo=Symbol("type"),$fe=class{constructor(t,r,n,i){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[yo]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,fp.isBuffer(t)?this.decode(t,r||0,n,i):t&&this.set(t)}decode(t,r,n,i){if(r||(r=0),!t||!(t.length>=r+512))throw new Error("need 512 bytes for header");if(this.path=xm(t,r,100),this.mode=dp(t,r+100,8),this.uid=dp(t,r+108,8),this.gid=dp(t,r+116,8),this.size=dp(t,r+124,12),this.mtime=r6(t,r+136,12),this.cksum=dp(t,r+148,12),this[t6](n),this[t6](i,!0),this[yo]=xm(t,r+156,1),this[yo]===""&&(this[yo]="0"),this[yo]==="0"&&this.path.substr(-1)==="/"&&(this[yo]="5"),this[yo]==="5"&&(this.size=0),this.linkpath=xm(t,r+157,100),t.slice(r+257,r+265).toString()==="ustar\x0000")if(this.uname=xm(t,r+265,32),this.gname=xm(t,r+297,32),this.devmaj=dp(t,r+329,8),this.devmin=dp(t,r+337,8),t[r+475]!==0){let s=xm(t,r+345,155);this.path=s+"/"+this.path}else{let s=xm(t,r+345,130);s&&(this.path=s+"/"+this.path),this.atime=r6(t,r+476,12),this.ctime=r6(t,r+488,12)}let a=8*32;for(let s=r;s<r+148;s++)a+=t[s];for(let s=r+156;s<r+512;s++)a+=t[s];this.cksumValid=a===this.cksum,this.cksum===null&&a===8*32&&(this.nullBlock=!0)}[t6](t,r){for(let n in t)t[n]!==null&&t[n]!==void 0&&!(r&&n==="path")&&(this[n]=t[n])}encode(t,r){if(t||(t=this.block=fp.alloc(512),r=0),r||(r=0),!(t.length>=r+512))throw new Error("need 512 bytes for header");let n=this.ctime||this.atime?130:155,i=_ot(this.path||"",n),a=i[0],s=i[1];this.needPax=i[2],this.needPax=Cm(t,r,100,a)||this.needPax,this.needPax=pp(t,r+100,8,this.mode)||this.needPax,this.needPax=pp(t,r+108,8,this.uid)||this.needPax,this.needPax=pp(t,r+116,8,this.gid)||this.needPax,this.needPax=pp(t,r+124,12,this.size)||this.needPax,this.needPax=n6(t,r+136,12,this.mtime)||this.needPax,t[r+156]=this[yo].charCodeAt(0),this.needPax=Cm(t,r+157,100,this.linkpath)||this.needPax,t.write("ustar\x0000",r+257,8),this.needPax=Cm(t,r+265,32,this.uname)||this.needPax,this.needPax=Cm(t,r+297,32,this.gname)||this.needPax,this.needPax=pp(t,r+329,8,this.devmaj)||this.needPax,this.needPax=pp(t,r+337,8,this.devmin)||this.needPax,this.needPax=Cm(t,r+345,n,s)||this.needPax,t[r+475]!==0?this.needPax=Cm(t,r+345,155,s)||this.needPax:(this.needPax=Cm(t,r+345,130,s)||this.needPax,this.needPax=n6(t,r+476,12,this.atime)||this.needPax,this.needPax=n6(t,r+488,12,this.ctime)||this.needPax);let o=8*32;for(let u=r;u<r+148;u++)o+=t[u];for(let u=r+156;u<r+512;u++)o+=t[u];return this.cksum=o,pp(t,r+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(t){for(let r in t)t[r]!==null&&t[r]!==void 0&&(this[r]=t[r])}get type(){return e6.name.get(this[yo])||this[yo]}get typeKey(){return this[yo]}set type(t){e6.code.has(t)?this[yo]=e6.code.get(t):this[yo]=t}},_ot=(e,t)=>{let r=100,n=e,i="",a,s=C0.parse(e).root||".";if(fp.byteLength(n)<r)a=[n,i,!1];else{i=C0.dirname(n),n=C0.basename(n);do fp.byteLength(n)<=r&&fp.byteLength(i)<=t?a=[n,i,!1]:fp.byteLength(n)>r&&fp.byteLength(i)<=t?a=[n.substr(0,r-1),i,!0]:(n=C0.join(C0.basename(i),n),i=C0.dirname(i));while(i!==s&&!a);a||(a=[e.substr(0,r-1),"",!0])}return a},xm=(e,t,r)=>e.slice(t,t+r).toString("utf8").replace(/\0.*/,""),r6=(e,t,r)=>xot(dp(e,t,r)),xot=e=>e===null?null:new Date(e*1e3),dp=(e,t,r)=>e[t]&128?zfe.parse(e.slice(t,t+r)):Cot(e,t,r),Sot=e=>isNaN(e)?null:e,Cot=(e,t,r)=>Sot(parseInt(e.slice(t,t+r).toString("utf8").replace(/\0.*$/,"").trim(),8)),Aot={12:8589934591,8:2097151},pp=(e,t,r,n)=>n===null?!1:n>Aot[r]||n<0?(zfe.encode(n,e.slice(t,t+r)),!0):(Dot(e,t,r,n),!1),Dot=(e,t,r,n)=>e.write(kot(n,r),t,r,"ascii"),kot=(e,t)=>Tot(Math.floor(e).toString(8),t),Tot=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0",n6=(e,t,r,n)=>n===null?!1:pp(e,t,r,n.getTime()/1e3),Rot=new Array(156).join("\0"),Cm=(e,t,r,n)=>n===null?!1:(e.write(n+Rot,t,r,"utf8"),n.length!==fp.byteLength(n)||n.length>r);Ufe.exports=$fe});var ZA=y((jrr,Gfe)=>{"use strict";var QA=sp(),Pot=S0(),Fot=require("path"),XA=class{constructor(t,r){this.atime=t.atime||null,this.charset=t.charset||null,this.comment=t.comment||null,this.ctime=t.ctime||null,this.gid=t.gid||null,this.gname=t.gname||null,this.linkpath=t.linkpath||null,this.mtime=t.mtime||null,this.path=t.path||null,this.size=t.size||null,this.uid=t.uid||null,this.uname=t.uname||null,this.dev=t.dev||null,this.ino=t.ino||null,this.nlink=t.nlink||null,this.global=r||!1}encode(){let t=this.encodeBody();if(t==="")return null;let r=QA.byteLength(t),n=512*Math.ceil(1+r/512),i=QA.allocUnsafe(n);for(let a=0;a<512;a++)i[a]=0;new Pot({path:("PaxHeader/"+Fot.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(i),i.write(t,512,r,"utf8");for(let a=r+512;a<i.length;a++)i[a]=0;return i}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(t){if(this[t]===null||this[t]===void 0)return"";let r=this[t]instanceof Date?this[t].getTime()/1e3:this[t],n=" "+(t==="dev"||t==="ino"||t==="nlink"?"SCHILY.":"")+t+"="+r+`
225
+ `),this.close()}_(t,r){return t.toLowerCase()==="y"?(this.value=!0,this.submit()):t.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Ele.hide):this.out.write(Pst(this.outputText,this.out.columns)),super.render(),this.outputText=[wle.symbol(this.done,this.aborted),ble.bold(this.msg),wle.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:ble.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Fst.line+Ele.to(0)+this.outputText))}};yle.exports=_le});var Sle=y((irr,Cle)=>{"use strict";Cle.exports={TextPrompt:sce(),SelectPrompt:fce(),TogglePrompt:gce(),DatePrompt:Qce(),NumberPrompt:rle(),MultiselectPrompt:_8(),AutocompletePrompt:dle(),AutocompleteMultiselectPrompt:vle(),ConfirmPrompt:xle()}});var Dle=y(Ale=>{"use strict";var Hs=Ale,Ist=Sle(),qA=e=>e;function Uc(e,t,r={}){return new Promise((n,i)=>{let a=new Ist[e](t),s=r.onAbort||qA,o=r.onSubmit||qA,u=r.onExit||qA;a.on("state",t.onState||qA),a.on("submit",c=>n(o(c))),a.on("exit",c=>n(u(c))),a.on("abort",c=>i(s(c)))})}Hs.text=e=>Uc("TextPrompt",e);Hs.password=e=>(e.style="password",Hs.text(e));Hs.invisible=e=>(e.style="invisible",Hs.text(e));Hs.number=e=>Uc("NumberPrompt",e);Hs.date=e=>Uc("DatePrompt",e);Hs.confirm=e=>Uc("ConfirmPrompt",e);Hs.list=e=>{let t=e.separator||",";return Uc("TextPrompt",e,{onSubmit:r=>r.split(t).map(n=>n.trim())})};Hs.toggle=e=>Uc("TogglePrompt",e);Hs.select=e=>Uc("SelectPrompt",e);Hs.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=r=>r.filter(n=>n.selected).map(n=>n.value);return Uc("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};Hs.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=r=>r.filter(n=>n.selected).map(n=>n.value);return Uc("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var Ost=(e,t)=>Promise.resolve(t.filter(r=>r.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));Hs.autocomplete=e=>(e.suggest=e.suggest||Ost,e.choices=[].concat(e.choices||[]),Uc("AutocompletePrompt",e))});var Rle=y((srr,kle)=>{"use strict";var S8=Dle(),jst=["suggest","format","onState","validate","onRender","type"],Tle=()=>{};async function ep(e=[],{onSubmit:t=Tle,onCancel:r=Tle}={}){let n={},i=ep._override||{};e=[].concat(e);let a,s,o,u,c,l,f=async(d,p,h=!1)=>{if(!(!h&&d.validate&&d.validate(p)!==!0))return d.format?await d.format(p,n):p};for(s of e)if({name:u,type:c}=s,typeof c=="function"&&(c=await c(a,m({},n),s),s.type=c),!!c){for(let d in s){if(jst.includes(d))continue;let p=s[d];s[d]=typeof p=="function"?await p(a,m({},n),l):p}if(l=s,typeof s.message!="string")throw new Error("prompt message is required");if({name:u,type:c}=s,S8[c]===void 0)throw new Error(`prompt type (${c}) is not defined`);if(i[s.name]!==void 0&&(a=await f(s,i[s.name]),a!==void 0)){n[u]=a;continue}try{a=ep._injected?qst(ep._injected,s.initial):await S8[c](s),n[u]=a=await f(s,a,!0),o=await t(s,a,n)}catch(d){o=!await r(s,n)}if(o)return n}return n}function qst(e,t){let r=e.shift();if(r instanceof Error)throw r;return r===void 0?t:r}function Lst(e){ep._injected=(ep._injected||[]).concat(e)}function Nst(e){ep._override=Object.assign({},e)}kle.exports=Object.assign(ep,{prompt:ep,prompts:S8,inject:Lst,override:Nst})});var A8=y((orr,Ple)=>{function Bst(e){e=(Array.isArray(e)?e:e.split(".")).map(Number);let t=0,r=process.versions.node.split(".").map(Number);for(;t<e.length;t++){if(r[t]>e[t])return!1;if(e[t]>r[t])return!0}return!1}Ple.exports=Bst("8.6.0")?Nue():Rle()});var qle=y((prr,jle)=>{jle.exports={name:"@sentry/craft",version:"0.31.0",description:"The universal sentry workflow CLI",main:"dist/craft",repository:"https://github.com/getsentry/craft",author:"Sentry",license:"MIT",bin:{craft:"dist/craft","sentry-craft":"dist/craft"},resolutions:{"**/set-value":">=2.0.1","**/https-proxy-agent":">=2.2.3","**/node-forge":">=0.10.0","**/dot-prop":">=4.2.1","**/kind-of":">=6.0.3","**/node-fetch":">=2.6.1","**/yargs-parser":">=18.1.2","**/parse-url":">=5.0.3","**/ansi-regex":">=5.0.1 < 6.0.0"},devDependencies:{"@aws-sdk/client-lambda":"^3.2.0","@google-cloud/storage":"^5.7.0","@octokit/plugin-retry":"^3.0.9","@octokit/request-error":"^2.1.0","@octokit/rest":"^18.10.0","@sentry/node":"4.6.3","@sentry/typescript":"^5.17.0","@types/async":"^3.0.1","@types/aws4":"^1.5.1","@types/cli-table":"^0.3.0","@types/git-url-parse":"^9.0.0","@types/is-ci":"^2.0.0","@types/jest":"^26.0.14","@types/js-yaml":"^4.0.5","@types/mkdirp":"^1.0.0","@types/node":"^12.11.1","@types/node-fetch":"^2.5.10","@types/ora":"^1.3.4","@types/prompts":"^2.0.11","@types/rimraf":"^2.0.2","@types/shell-quote":"^1.6.0","@types/tar":"^4.0.0","@types/tmp":"^0.0.33","@types/unzipper":"^0.10.3","@types/yargs":"^15.0.3","@typescript-eslint/eslint-plugin":"^3.3.0","@typescript-eslint/parser":"^3.3.0",ajv:"6.6.2",async:"3.1.0",aws4:"^1.11.0",chalk:"4.1.1","cli-table":"0.3.1",consola:"2.15.3",esbuild:"^0.11.6",eslint:"^7.2.0","eslint-config-prettier":"^6.11.0","fast-xml-parser":"^3.19.0","git-url-parse":"^11.4.4","is-ci":"^2.0.0",jest:"^26.5.3","js-yaml":"4.1.0","json-schema-to-typescript":"5.7.0",mkdirp:"0.5.1",mustache:"3.0.1",nock:"^13.2.4","node-fetch":"^2.6.1",nvar:"1.3.1",ora:"5.4.0",prettier:"^2.2.1",prompts:"2.4.1",rimraf:"2.7.1","shell-quote":"1.6.1","simple-git":"2.38.0","source-map-support":"^0.5.20",split:"1.0.1","string-length":"3.1.0",tar:"4.4.18",tmp:"0.1.0","ts-jest":"^26.5.5",typescript:"^4.1.3",unzipper:"0.10.11",yargs:"15.4.1"},scripts:{"build:fat":"yarn run compile-config-schema && tsc -p tsconfig.build.json","build:watch":"yarn run compile-config-schema && tsc -p tsconfig.build.json --watch",build:"yarn compile-config-schema && esbuild src/index.ts --sourcemap --bundle --platform=node --target=node14.17 --outfile=dist/craft --minify",precli:"yarn build",cli:"node -r source-map-support/register dist/craft",clean:"rimraf dist coverage",fix:"prettier --write .",test:"jest","test:watch":"jest --watch --notify","compile-config-schema":"node ./scripts/config-json-schema-to-ts.js"},volta:{node:"14.17.6",yarn:"1.22.10"}}});var ym=y((zc,Mle)=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});function q1(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var Bu=q1(require("stream")),Ule=q1(require("http")),k8=q1(require("url")),Gst=q1(require("https")),gm=q1(require("zlib")),Hst=Bu.Readable,Ef=Symbol("buffer"),T8=Symbol("type"),vm=class{constructor(){this[T8]="";let t=arguments[0],r=arguments[1],n=[],i=0;if(t){let s=t,o=Number(s.length);for(let u=0;u<o;u++){let c=s[u],l;c instanceof Buffer?l=c:ArrayBuffer.isView(c)?l=Buffer.from(c.buffer,c.byteOffset,c.byteLength):c instanceof ArrayBuffer?l=Buffer.from(c):c instanceof vm?l=c[Ef]:l=Buffer.from(typeof c=="string"?c:String(c)),i+=l.length,n.push(l)}}this[Ef]=Buffer.concat(n);let a=r&&r.type!==void 0&&String(r.type).toLowerCase();a&&!/[^\u0020-\u007E]/.test(a)&&(this[T8]=a)}get size(){return this[Ef].length}get type(){return this[T8]}text(){return Promise.resolve(this[Ef].toString())}arrayBuffer(){let t=this[Ef],r=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(r)}stream(){let t=new Hst;return t._read=function(){},t.push(this[Ef]),t.push(null),t}toString(){return"[object Blob]"}slice(){let t=this.size,r=arguments[0],n=arguments[1],i,a;r===void 0?i=0:r<0?i=Math.max(t+r,0):i=Math.min(r,t),n===void 0?a=t:n<0?a=Math.max(t+n,0):a=Math.min(n,t);let s=Math.max(a-i,0),u=this[Ef].slice(i,i+s),c=new vm([],{type:arguments[2]});return c[Ef]=u,c}};Object.defineProperties(vm.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});Object.defineProperty(vm.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0});function as(e,t,r){Error.call(this,e),this.message=e,this.type=t,r&&(this.code=this.errno=r.code),Error.captureStackTrace(this,this.constructor)}as.prototype=Object.create(Error.prototype);as.prototype.constructor=as;as.prototype.name="FetchError";var R8;try{R8=require("encoding").convert}catch(e){}var _f=Symbol("Body internals"),zle=Bu.PassThrough;function wa(e){var t=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.size;let i=n===void 0?0:n;var a=r.timeout;let s=a===void 0?0:a;e==null?e=null:$le(e)?e=Buffer.from(e.toString()):L1(e)||Buffer.isBuffer(e)||(Object.prototype.toString.call(e)==="[object ArrayBuffer]"?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof Bu||(e=Buffer.from(String(e)))),this[_f]={body:e,disturbed:!1,error:null},this.size=i,this.timeout=s,e instanceof Bu&&e.on("error",function(o){let u=o.name==="AbortError"?o:new as(`Invalid response body while trying to fetch ${t.url}: ${o.message}`,"system",o);t[_f].error=u})}wa.prototype={get body(){return this[_f].body},get bodyUsed(){return this[_f].disturbed},arrayBuffer(){return b0.call(this).then(function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)})},blob(){let e=this.headers&&this.headers.get("content-type")||"";return b0.call(this).then(function(t){return Object.assign(new vm([],{type:e.toLowerCase()}),{[Ef]:t})})},json(){var e=this;return b0.call(this).then(function(t){try{return JSON.parse(t.toString())}catch(r){return wa.Promise.reject(new as(`invalid json response body at ${e.url} reason: ${r.message}`,"invalid-json"))}})},text(){return b0.call(this).then(function(e){return e.toString()})},buffer(){return b0.call(this)},textConverted(){var e=this;return b0.call(this).then(function(t){return Vst(t,e.headers)})}};Object.defineProperties(wa.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});wa.mixIn=function(e){for(let t of Object.getOwnPropertyNames(wa.prototype))if(!(t in e)){let r=Object.getOwnPropertyDescriptor(wa.prototype,t);Object.defineProperty(e,t,r)}};function b0(){var e=this;if(this[_f].disturbed)return wa.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[_f].disturbed=!0,this[_f].error)return wa.Promise.reject(this[_f].error);let t=this.body;if(t===null)return wa.Promise.resolve(Buffer.alloc(0));if(L1(t)&&(t=t.stream()),Buffer.isBuffer(t))return wa.Promise.resolve(t);if(!(t instanceof Bu))return wa.Promise.resolve(Buffer.alloc(0));let r=[],n=0,i=!1;return new wa.Promise(function(a,s){let o;e.timeout&&(o=setTimeout(function(){i=!0,s(new as(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))},e.timeout)),t.on("error",function(u){u.name==="AbortError"?(i=!0,s(u)):s(new as(`Invalid response body while trying to fetch ${e.url}: ${u.message}`,"system",u))}),t.on("data",function(u){if(!(i||u===null)){if(e.size&&n+u.length>e.size){i=!0,s(new as(`content size at ${e.url} over limit: ${e.size}`,"max-size"));return}n+=u.length,r.push(u)}}),t.on("end",function(){if(!i){clearTimeout(o);try{a(Buffer.concat(r,n))}catch(u){s(new as(`Could not create Buffer from response body for ${e.url}: ${u.message}`,"system",u))}}})})}function Vst(e,t){if(typeof R8!="function")throw new Error("The package `encoding` must be installed to use the textConverted() function");let r=t.get("content-type"),n="utf-8",i,a;return r&&(i=/charset=([^;]*)/i.exec(r)),a=e.slice(0,1024).toString(),!i&&a&&(i=/<meta.+?charset=(['"])(.+?)\1/i.exec(a)),!i&&a&&(i=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(a),i||(i=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(a),i&&i.pop()),i&&(i=/charset=(.*)/i.exec(i.pop()))),!i&&a&&(i=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(a)),i&&(n=i.pop(),(n==="gb2312"||n==="gbk")&&(n="gb18030")),R8(e,"UTF-8",n).toString()}function $le(e){return typeof e!="object"||typeof e.append!="function"||typeof e.delete!="function"||typeof e.get!="function"||typeof e.getAll!="function"||typeof e.has!="function"||typeof e.set!="function"?!1:e.constructor.name==="URLSearchParams"||Object.prototype.toString.call(e)==="[object URLSearchParams]"||typeof e.sort=="function"}function L1(e){return typeof e=="object"&&typeof e.arrayBuffer=="function"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.constructor=="function"&&typeof e.constructor.name=="string"&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function Gle(e){let t,r,n=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return n instanceof Bu&&typeof n.getBoundary!="function"&&(t=new zle,r=new zle,n.pipe(t),n.pipe(r),e[_f].body=t,n=r),n}function Hle(e){return e===null?null:typeof e=="string"?"text/plain;charset=UTF-8":$le(e)?"application/x-www-form-urlencoded;charset=UTF-8":L1(e)?e.type||null:Buffer.isBuffer(e)||Object.prototype.toString.call(e)==="[object ArrayBuffer]"||ArrayBuffer.isView(e)?null:typeof e.getBoundary=="function"?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof Bu?null:"text/plain;charset=UTF-8"}function Vle(e){let t=e.body;return t===null?0:L1(t)?t.size:Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&(t._lengthRetrievers&&t._lengthRetrievers.length==0||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}function Kst(e,t){let r=t.body;r===null?e.end():L1(r)?r.stream().pipe(e):Buffer.isBuffer(r)?(e.write(r),e.end()):r.pipe(e)}wa.Promise=global.Promise;var Kle=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,P8=/[^\t\x20-\x7e\x80-\xff]/;function N1(e){if(e=`${e}`,Kle.test(e)||e==="")throw new TypeError(`${e} is not a legal HTTP header name`)}function Jle(e){if(e=`${e}`,P8.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function w0(e,t){t=t.toLowerCase();for(let r in e)if(r.toLowerCase()===t)return r}var Li=Symbol("map"),go=class{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;if(this[Li]=Object.create(null),t instanceof go){let r=t.raw(),n=Object.keys(r);for(let i of n)for(let a of r[i])this.append(i,a);return}if(t!=null)if(typeof t=="object"){let r=t[Symbol.iterator];if(r!=null){if(typeof r!="function")throw new TypeError("Header pairs must be iterable");let n=[];for(let i of t){if(typeof i!="object"||typeof i[Symbol.iterator]!="function")throw new TypeError("Each header pair must be iterable");n.push(Array.from(i))}for(let i of n){if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");this.append(i[0],i[1])}}else for(let n of Object.keys(t)){let i=t[n];this.append(n,i)}}else throw new TypeError("Provided initializer must be an object")}get(t){t=`${t}`,N1(t);let r=w0(this[Li],t);return r===void 0?null:this[Li][r].join(", ")}forEach(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=F8(this),i=0;for(;i<n.length;){var a=n[i];let s=a[0],o=a[1];t.call(r,o,s,this),n=F8(this),i++}}set(t,r){t=`${t}`,r=`${r}`,N1(t),Jle(r);let n=w0(this[Li],t);this[Li][n!==void 0?n:t]=[r]}append(t,r){t=`${t}`,r=`${r}`,N1(t),Jle(r);let n=w0(this[Li],t);n!==void 0?this[Li][n].push(r):this[Li][t]=[r]}has(t){return t=`${t}`,N1(t),w0(this[Li],t)!==void 0}delete(t){t=`${t}`,N1(t);let r=w0(this[Li],t);r!==void 0&&delete this[Li][r]}raw(){return this[Li]}keys(){return I8(this,"key")}values(){return I8(this,"value")}[Symbol.iterator](){return I8(this,"key+value")}};go.prototype.entries=go.prototype[Symbol.iterator];Object.defineProperty(go.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(go.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});function F8(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key+value";return Object.keys(e[Li]).sort().map(t==="key"?function(n){return n.toLowerCase()}:t==="value"?function(n){return e[Li][n].join(", ")}:function(n){return[n.toLowerCase(),e[Li][n].join(", ")]})}var O8=Symbol("internal");function I8(e,t){let r=Object.create(j8);return r[O8]={target:e,kind:t,index:0},r}var j8=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==j8)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[O8];let t=e.target,r=e.kind,n=e.index,i=F8(t,r),a=i.length;return n>=a?{value:void 0,done:!0}:(this[O8].index=n+1,{value:i[n],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Object.defineProperty(j8,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});function Jst(e){let t=Object.assign({__proto__:null},e[Li]),r=w0(e[Li],"Host");return r!==void 0&&(t[r]=t[r][0]),t}function Wst(e){let t=new go;for(let r of Object.keys(e))if(!Kle.test(r))if(Array.isArray(e[r]))for(let n of e[r])P8.test(n)||(t[Li][r]===void 0?t[Li][r]=[n]:t[Li][r].push(n));else P8.test(e[r])||(t[Li][r]=[e[r]]);return t}var ip=Symbol("Response internals"),Yst=Ule.STATUS_CODES,Jo=class{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};wa.call(this,t,r);let n=r.status||200,i=new go(r.headers);if(t!=null&&!i.has("Content-Type")){let a=Hle(t);a&&i.append("Content-Type",a)}this[ip]={url:r.url,status:n,statusText:r.statusText||Yst[n],headers:i,counter:r.counter}}get url(){return this[ip].url||""}get status(){return this[ip].status}get ok(){return this[ip].status>=200&&this[ip].status<300}get redirected(){return this[ip].counter>0}get statusText(){return this[ip].statusText}get headers(){return this[ip].headers}clone(){return new Jo(Gle(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}};wa.mixIn(Jo.prototype);Object.defineProperties(Jo.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});Object.defineProperty(Jo.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});var xf=Symbol("Request internals"),q8=k8.parse,Qst=k8.format,Xst="destroy"in Bu.Readable.prototype;function MA(e){return typeof e=="object"&&typeof e[xf]=="object"}function Zst(e){let t=e&&typeof e=="object"&&Object.getPrototypeOf(e);return!!(t&&t.constructor.name==="AbortSignal")}var Cf=class{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n;MA(t)?n=q8(t.url):(t&&t.href?n=q8(t.href):n=q8(`${t}`),t={});let i=r.method||t.method||"GET";if(i=i.toUpperCase(),(r.body!=null||MA(t)&&t.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let a=r.body!=null?r.body:MA(t)&&t.body!==null?Gle(t):null;wa.call(this,a,{timeout:r.timeout||t.timeout||0,size:r.size||t.size||0});let s=new go(r.headers||t.headers||{});if(a!=null&&!s.has("Content-Type")){let u=Hle(a);u&&s.append("Content-Type",u)}let o=MA(t)?t.signal:null;if("signal"in r&&(o=r.signal),o!=null&&!Zst(o))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[xf]={method:i,redirect:r.redirect||t.redirect||"follow",headers:s,parsedURL:n,signal:o},this.follow=r.follow!==void 0?r.follow:t.follow!==void 0?t.follow:20,this.compress=r.compress!==void 0?r.compress:t.compress!==void 0?t.compress:!0,this.counter=r.counter||t.counter||0,this.agent=r.agent||t.agent}get method(){return this[xf].method}get url(){return Qst(this[xf].parsedURL)}get headers(){return this[xf].headers}get redirect(){return this[xf].redirect}get signal(){return this[xf].signal}clone(){return new Cf(this)}};wa.mixIn(Cf.prototype);Object.defineProperty(Cf.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(Cf.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}});function eot(e){let t=e[xf].parsedURL,r=new go(e[xf].headers);if(r.has("Accept")||r.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof Bu.Readable&&!Xst)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let n=null;if(e.body==null&&/^(POST|PUT)$/i.test(e.method)&&(n="0"),e.body!=null){let a=Vle(e);typeof a=="number"&&(n=String(a))}n&&r.set("Content-Length",n),r.has("User-Agent")||r.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip,deflate");let i=e.agent;return typeof i=="function"&&(i=i(t)),!r.has("Connection")&&!i&&r.set("Connection","close"),Object.assign({},t,{method:e.method,headers:Jst(r),agent:i})}function B1(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}B1.prototype=Object.create(Error.prototype);B1.prototype.constructor=B1;B1.prototype.name="AbortError";var Wle=Bu.PassThrough,tot=k8.resolve;function ap(e,t){if(!ap.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return wa.Promise=ap.Promise,new ap.Promise(function(r,n){let i=new Cf(e,t),a=eot(i),s=(a.protocol==="https:"?Gst:Ule).request,o=i.signal,u=null,c=function(){let g=new B1("The user aborted a request.");n(g),i.body&&i.body instanceof Bu.Readable&&i.body.destroy(g),!(!u||!u.body)&&u.body.emit("error",g)};if(o&&o.aborted){c();return}let l=function(){c(),p()},f=s(a),d;o&&o.addEventListener("abort",l);function p(){f.abort(),o&&o.removeEventListener("abort",l),clearTimeout(d)}i.timeout&&f.once("socket",function(h){d=setTimeout(function(){n(new as(`network timeout at: ${i.url}`,"request-timeout")),p()},i.timeout)}),f.on("error",function(h){n(new as(`request to ${i.url} failed, reason: ${h.message}`,"system",h)),p()}),f.on("response",function(h){clearTimeout(d);let g=Wst(h.headers);if(ap.isRedirect(h.statusCode)){let S=g.get("Location"),F=S===null?null:tot(i.url,S);switch(i.redirect){case"error":n(new as(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),p();return;case"manual":if(F!==null)try{g.set("Location",F)}catch(K){n(K)}break;case"follow":if(F===null)break;if(i.counter>=i.follow){n(new as(`maximum redirect reached at: ${i.url}`,"max-redirect")),p();return}let P={headers:new go(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:i.body,signal:i.signal,timeout:i.timeout,size:i.size};if(h.statusCode!==303&&i.body&&Vle(i)===null){n(new as("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(h.statusCode===303||(h.statusCode===301||h.statusCode===302)&&i.method==="POST")&&(P.method="GET",P.body=void 0,P.headers.delete("content-length")),r(ap(new Cf(F,P))),p();return}}h.once("end",function(){o&&o.removeEventListener("abort",l)});let v=h.pipe(new Wle),b={url:i.url,status:h.statusCode,statusText:h.statusMessage,headers:g,size:i.size,timeout:i.timeout,counter:i.counter},E=g.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||E===null||h.statusCode===204||h.statusCode===304){u=new Jo(v,b),r(u);return}let _={flush:gm.Z_SYNC_FLUSH,finishFlush:gm.Z_SYNC_FLUSH};if(E=="gzip"||E=="x-gzip"){v=v.pipe(gm.createGunzip(_)),u=new Jo(v,b),r(u);return}if(E=="deflate"||E=="x-deflate"){h.pipe(new Wle).once("data",function(F){(F[0]&15)==8?v=v.pipe(gm.createInflate()):v=v.pipe(gm.createInflateRaw()),u=new Jo(v,b),r(u)});return}if(E=="br"&&typeof gm.createBrotliDecompress=="function"){v=v.pipe(gm.createBrotliDecompress()),u=new Jo(v,b),r(u);return}u=new Jo(v,b),r(u)}),Kst(f,i)})}ap.isRedirect=function(e){return e===301||e===302||e===303||e===307||e===308};ap.Promise=global.Promise;Mle.exports=zc=ap;Object.defineProperty(zc,"__esModule",{value:!0});zc.default=zc;zc.Headers=go;zc.Request=Cf;zc.Response=Jo;zc.FetchError=as});var Xle=y((Yle,Qle)=>{var rot=require("stream");Yle=Qle.exports=L8;L8.through=L8;function L8(e,t,r){e=e||function(l){this.queue(l)},t=t||function(){this.queue(null)};var n=!1,i=!1,a=[],s=!1,o=new rot;o.readable=o.writable=!0,o.paused=!1,o.autoDestroy=!(r&&r.autoDestroy===!1),o.write=function(l){return e.call(this,l),!o.paused};function u(){for(;a.length&&!o.paused;){var l=a.shift();if(l===null)return o.emit("end");o.emit("data",l)}}o.queue=o.push=function(l){return s||(l===null&&(s=!0),a.push(l),u()),o},o.on("end",function(){o.readable=!1,!o.writable&&o.autoDestroy&&process.nextTick(function(){o.destroy()})});function c(){o.writable=!1,t.call(o),!o.readable&&o.autoDestroy&&o.destroy()}return o.end=function(l){if(!n)return n=!0,arguments.length&&o.write(l),c(),o},o.destroy=function(){if(!i)return i=!0,n=!0,a.length=0,o.writable=o.readable=!1,o.emit("close"),o},o.pause=function(){if(!o.paused)return o.paused=!0,o},o.resume=function(){return o.paused&&(o.paused=!1,o.emit("resume")),u(),o.paused||o.emit("drain"),o},o}});var efe=y((grr,Zle)=>{var not=Xle(),iot=require("string_decoder").StringDecoder;Zle.exports=aot;function aot(e,t,r){var n=new iot,i="",a=r&&r.maxLength,s=!(r&&r.trailing===!1);typeof e=="function"&&(t=e,e=null),e||(e=/\r?\n/);function o(c,l){if(t){try{l=t(l)}catch(f){return c.emit("error",f)}typeof l!="undefined"&&c.queue(l)}else c.queue(l)}function u(c,l){var f=((i??"")+l).split(e);if(i=f.pop(),a&&i.length>a)return c.emit("error",new Error("maximum buffer reached"));for(var d=0;d<f.length;d++){var p=f[d];o(c,p)}}return not(function(c){u(this,n.write(c))},function(){n.end&&u(this,n.end()),s&&i!=null&&o(this,i),this.queue(null)})}});var E0=y((yrr,tfe)=>{"use strict";var rfe=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]),vrr=tfe.exports=e=>e?Object.keys(e).map(t=>[rfe.has(t)?rfe.get(t):t,e[t]]).reduce((t,r)=>(t[r[0]]=r[1],t),Object.create(null)):{}});var afe=y((N8,nfe)=>{var UA=require("buffer"),$c=UA.Buffer;function ife(e,t){for(var r in e)t[r]=e[r]}$c.from&&$c.alloc&&$c.allocUnsafe&&$c.allocUnsafeSlow?nfe.exports=UA:(ife(UA,N8),N8.Buffer=bm);function bm(e,t,r){return $c(e,t,r)}bm.prototype=Object.create($c.prototype);ife($c,bm);bm.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return $c(e,t,r)};bm.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=$c(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};bm.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return $c(e)};bm.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return UA.SlowBuffer(e)}});var sp=y((brr,sfe)=>{"use strict";var B8=Buffer;B8.alloc||(B8=afe().Buffer);sfe.exports=B8});var ufe=y((wrr,ofe)=>{"use strict";ofe.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}});var zA=y((Err,cfe)=>{"use strict";cfe.exports=bn;bn.Node=wm;bn.create=bn;function bn(e){var t=this;if(t instanceof bn||(t=new bn),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(i){t.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)t.push(arguments[r]);return t}bn.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t};bn.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}};bn.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}};bn.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)sot(this,arguments[e]);return this.length};bn.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)oot(this,arguments[e]);return this.length};bn.prototype.pop=function(){if(!!this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}};bn.prototype.shift=function(){if(!!this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}};bn.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;r!==null;n++)e.call(t,r.value,n,this),r=r.next};bn.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;r!==null;n--)e.call(t,r.value,n,this),r=r.prev};bn.prototype.get=function(e){for(var t=0,r=this.head;r!==null&&t<e;t++)r=r.next;if(t===e&&r!==null)return r.value};bn.prototype.getReverse=function(e){for(var t=0,r=this.tail;r!==null&&t<e;t++)r=r.prev;if(t===e&&r!==null)return r.value};bn.prototype.map=function(e,t){t=t||this;for(var r=new bn,n=this.head;n!==null;)r.push(e.call(t,n.value,this)),n=n.next;return r};bn.prototype.mapReverse=function(e,t){t=t||this;for(var r=new bn,n=this.tail;n!==null;)r.push(e.call(t,n.value,this)),n=n.prev;return r};bn.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=e(r,n.value,i),n=n.next;return r};bn.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=e(r,n.value,i),n=n.prev;return r};bn.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;r!==null;t++)e[t]=r.value,r=r.next;return e};bn.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;r!==null;t++)e[t]=r.value,r=r.prev;return e};bn.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new bn;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=0,i=this.head;i!==null&&n<e;n++)i=i.next;for(;i!==null&&n<t;n++,i=i.next)r.push(i.value);return r};bn.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new bn;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=this.length,i=this.tail;i!==null&&n>t;n--)i=i.prev;for(;i!==null&&n>e;n--,i=i.prev)r.push(i.value);return r};bn.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,n=this.head;n!==null&&r<e;r++)n=n.next;for(var i=[],r=0;n&&r<t;r++)i.push(n.value),n=this.removeNode(n);n===null&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(var r=2;r<arguments.length;r++)n=uot(this,n,arguments[r]);return i};bn.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};function uot(e,t,r){var n=t===e.head?new wm(r,null,t,e):new wm(r,t,t.next,e);return n.next===null&&(e.tail=n),n.prev===null&&(e.head=n),e.length++,n}function sot(e,t){e.tail=new wm(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function oot(e,t){e.head=new wm(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function wm(e,t,r,n){if(!(this instanceof wm))return new wm(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{ufe()(bn)}catch(e){}});var Ss=y((M8,lfe)=>{var $A=require("buffer"),Sf=$A.Buffer;function ffe(e,t){for(var r in e)t[r]=e[r]}Sf.from&&Sf.alloc&&Sf.allocUnsafe&&Sf.allocUnsafeSlow?lfe.exports=$A:(ffe($A,M8),M8.Buffer=_0);function _0(e,t,r){return Sf(e,t,r)}ffe(Sf,_0);_0.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Sf(e,t,r)};_0.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Sf(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};_0.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Sf(e)};_0.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return $A.SlowBuffer(e)}});var x0=y((_rr,dfe)=>{"use strict";var pfe=require("events"),M1=zA(),hfe=require("string_decoder").StringDecoder,Af=Symbol("EOF"),U1=Symbol("maybeEmitEnd"),op=Symbol("emittedEnd"),GA=Symbol("emittingEnd"),HA=Symbol("closed"),mfe=Symbol("read"),gfe=Symbol("flush"),vfe=Symbol("flushChunk"),Vs=Symbol("encoding"),Df=Symbol("decoder"),VA=Symbol("flowing"),z1=Symbol("paused"),$1=Symbol("resume"),Ks=Symbol("bufferLength"),yfe=Symbol("bufferPush"),U8=Symbol("bufferShift"),Js=Symbol("objectMode"),ss=Symbol("destroyed"),bfe=global._MP_NO_ITERATOR_SYMBOLS_!=="1",cot=bfe&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),lot=bfe&&Symbol.iterator||Symbol("iterator not implemented"),up=Buffer.alloc?Buffer:Ss().Buffer,wfe=e=>e==="end"||e==="finish"||e==="prefinish",fot=e=>e instanceof ArrayBuffer||typeof e=="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0,dot=e=>!up.isBuffer(e)&&ArrayBuffer.isView(e);dfe.exports=class Efe extends pfe{constructor(t){super();this[VA]=!1,this[z1]=!1,this.pipes=new M1,this.buffer=new M1,this[Js]=t&&t.objectMode||!1,this[Js]?this[Vs]=null:this[Vs]=t&&t.encoding||null,this[Vs]==="buffer"&&(this[Vs]=null),this[Df]=this[Vs]?new hfe(this[Vs]):null,this[Af]=!1,this[op]=!1,this[GA]=!1,this[HA]=!1,this.writable=!0,this.readable=!0,this[Ks]=0,this[ss]=!1}get bufferLength(){return this[Ks]}get encoding(){return this[Vs]}set encoding(t){if(this[Js])throw new Error("cannot set encoding in objectMode");if(this[Vs]&&t!==this[Vs]&&(this[Df]&&this[Df].lastNeed||this[Ks]))throw new Error("cannot change encoding");this[Vs]!==t&&(this[Df]=t?new hfe(t):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[Df].write(r)))),this[Vs]=t}setEncoding(t){this.encoding=t}get objectMode(){return this[Js]}set objectMode(t){this[Js]=this[Js]||!!t}write(t,r,n){if(this[Af])throw new Error("write after end");if(this[ss])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;if(typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8"),!this[Js]&&!up.isBuffer(t)&&(dot(t)?t=up.from(t.buffer,t.byteOffset,t.byteLength):fot(t)?t=up.from(t):typeof t!="string"&&(this.objectMode=!0)),!this.objectMode&&!t.length){let i=this.flowing;return this[Ks]!==0&&this.emit("readable"),n&&n(),i}typeof t=="string"&&!this[Js]&&!(r===this[Vs]&&!this[Df].lastNeed)&&(t=up.from(t,r)),up.isBuffer(t)&&this[Vs]&&(t=this[Df].write(t));try{return this.flowing?(this.emit("data",t),this.flowing):(this[yfe](t),!1)}finally{this[Ks]!==0&&this.emit("readable"),n&&n()}}read(t){if(this[ss])return null;try{return this[Ks]===0||t===0||t>this[Ks]?null:(this[Js]&&(t=null),this.buffer.length>1&&!this[Js]&&(this.encoding?this.buffer=new M1([Array.from(this.buffer).join("")]):this.buffer=new M1([up.concat(Array.from(this.buffer),this[Ks])])),this[mfe](t||null,this.buffer.head.value))}finally{this[U1]()}}[mfe](t,r){return t===r.length||t===null?this[U8]():(this.buffer.head.value=r.slice(t),r=r.slice(0,t),this[Ks]-=t),this.emit("data",r),!this.buffer.length&&!this[Af]&&this.emit("drain"),r}end(t,r,n){return typeof t=="function"&&(n=t,t=null),typeof r=="function"&&(n=r,r="utf8"),t&&this.write(t,r),n&&this.once("end",n),this[Af]=!0,this.writable=!1,(this.flowing||!this[z1])&&this[U1](),this}[$1](){this[ss]||(this[z1]=!1,this[VA]=!0,this.emit("resume"),this.buffer.length?this[gfe]():this[Af]?this[U1]():this.emit("drain"))}resume(){return this[$1]()}pause(){this[VA]=!1,this[z1]=!0}get destroyed(){return this[ss]}get flowing(){return this[VA]}get paused(){return this[z1]}[yfe](t){return this[Js]?this[Ks]+=1:this[Ks]+=t.length,this.buffer.push(t)}[U8](){return this.buffer.length&&(this[Js]?this[Ks]-=1:this[Ks]-=this.buffer.head.value.length),this.buffer.shift()}[gfe](){do;while(this[vfe](this[U8]()));!this.buffer.length&&!this[Af]&&this.emit("drain")}[vfe](t){return t?(this.emit("data",t),this.flowing):!1}pipe(t,r){if(this[ss])return;let n=this[op];r=r||{},t===process.stdout||t===process.stderr?r.end=!1:r.end=r.end!==!1;let i={dest:t,opts:r,ondrain:a=>this[$1]()};return this.pipes.push(i),t.on("drain",i.ondrain),this[$1](),n&&i.opts.end&&i.dest.end(),t}addListener(t,r){return this.on(t,r)}on(t,r){try{return super.on(t,r)}finally{t==="data"&&!this.pipes.length&&!this.flowing?this[$1]():wfe(t)&&this[op]&&(super.emit(t),this.removeAllListeners(t))}}get emittedEnd(){return this[op]}[U1](){!this[GA]&&!this[op]&&!this[ss]&&this.buffer.length===0&&this[Af]&&(this[GA]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[HA]&&this.emit("close"),this[GA]=!1)}emit(t,r){if(t!=="error"&&t!=="close"&&t!==ss&&this[ss])return;if(t==="data"){if(!r)return;this.pipes.length&&this.pipes.forEach(i=>i.dest.write(r)===!1&&this.pause())}else if(t==="end"){if(this[op]===!0)return;this[op]=!0,this.readable=!1,this[Df]&&(r=this[Df].end(),r&&(this.pipes.forEach(i=>i.dest.write(r)),super.emit("data",r))),this.pipes.forEach(i=>{i.dest.removeListener("drain",i.ondrain),i.opts.end&&i.dest.end()})}else if(t==="close"&&(this[HA]=!0,!this[op]&&!this[ss]))return;let n=new Array(arguments.length);if(n[0]=t,n[1]=r,arguments.length>2)for(let i=2;i<arguments.length;i++)n[i]=arguments[i];try{return super.emit.apply(this,n)}finally{wfe(t)?this.removeAllListeners(t):this[U1]()}}collect(){let t=[];return t.dataLength=0,this.on("data",r=>{t.push(r),t.dataLength+=r.length}),this.promise().then(()=>t)}concat(){return this[Js]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(t=>this[Js]?Promise.reject(new Error("cannot concat in objectMode")):this[Vs]?t.join(""):up.concat(t,t.dataLength))}promise(){return new Promise((t,r)=>{this.on(ss,()=>r(new Error("stream destroyed"))),this.on("end",()=>t()),this.on("error",n=>r(n))})}[cot](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[Af])return Promise.resolve({done:!0});let n=null,i=null,a=c=>{this.removeListener("data",s),this.removeListener("end",o),i(c)},s=c=>{this.removeListener("error",a),this.removeListener("end",o),this.pause(),n({value:c,done:!!this[Af]})},o=()=>{this.removeListener("error",a),this.removeListener("data",s),n({done:!0})},u=()=>a(new Error("stream destroyed"));return new Promise((c,l)=>{i=l,n=c,this.once(ss,u),this.once("error",a),this.once("end",o),this.once("data",s)})}}}[lot](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(t){return this[ss]?(t?this.emit("error",t):this.emit(ss),this):(this[ss]=!0,this.buffer=new M1,this[Ks]=0,typeof this.close=="function"&&!this[HA]&&this.close(),t?this.emit("error",t):this.emit(ss),this)}static isStream(t){return!!t&&(t instanceof Efe||t instanceof pfe&&(typeof t.pipe=="function"||typeof t.write=="function"&&typeof t.end=="function"))}}});var xfe=y((xrr,_fe)=>{var pot=require("zlib").constants||{ZLIB_VERNUM:4736};_fe.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:Infinity,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},pot))});var Y8=y(vo=>{"use strict";var z8=require("assert"),cp=require("buffer").Buffer,Cfe=require("zlib"),Em=vo.constants=xfe(),hot=x0(),Sfe=cp.concat,KA=class extends Error{constructor(t){super("zlib: "+t.message);this.code=t.code,this.errno=t.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+t.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},mot=Symbol("opts"),G1=Symbol("flushFlag"),Afe=Symbol("finishFlushFlag"),$8=Symbol("fullFlushFlag"),ui=Symbol("handle"),G8=Symbol("onError"),JA=Symbol("sawError"),H8=Symbol("level"),V8=Symbol("strategy"),K8=Symbol("ended"),Crr=Symbol("_defaultFullFlush"),J8=class extends hot{constructor(t,r){if(!t||typeof t!="object")throw new TypeError("invalid options for ZlibBase constructor");super(t);this[K8]=!1,this[mot]=t,this[G1]=t.flush,this[Afe]=t.finishFlush;try{this[ui]=new Cfe[r](t)}catch(n){throw new KA(n)}this[G8]=n=>{this[JA]=!0,this.close(),this.emit("error",n)},this[ui].on("error",n=>this[G8](new KA(n))),this.once("end",()=>this.close)}close(){this[ui]&&(this[ui].close(),this[ui]=null,this.emit("close"))}reset(){if(!this[JA])return z8(this[ui],"zlib binding closed"),this[ui].reset()}flush(t){this.ended||(typeof t!="number"&&(t=this[$8]),this.write(Object.assign(cp.alloc(0),{[G1]:t})))}end(t,r,n){return t&&this.write(t,r),this.flush(this[Afe]),this[K8]=!0,super.end(null,null,n)}get ended(){return this[K8]}write(t,r,n){if(typeof r=="function"&&(n=r,r="utf8"),typeof t=="string"&&(t=cp.from(t,r)),this[JA])return;z8(this[ui],"zlib binding closed");let i=this[ui]._handle,a=i.close;i.close=()=>{};let s=this[ui].close;this[ui].close=()=>{},cp.concat=c=>c;let o;try{let c=typeof t[G1]=="number"?t[G1]:this[G1];o=this[ui]._processChunk(t,c),cp.concat=Sfe}catch(c){cp.concat=Sfe,this[G8](new KA(c))}finally{this[ui]&&(this[ui]._handle=i,i.close=a,this[ui].close=s,this[ui].removeAllListeners("error"))}let u;if(o)if(Array.isArray(o)&&o.length>0){u=super.write(cp.from(o[0]));for(let c=1;c<o.length;c++)u=super.write(o[c])}else u=super.write(cp.from(o));return n&&n(),u}},lp=class extends J8{constructor(t,r){t=t||{},t.flush=t.flush||Em.Z_NO_FLUSH,t.finishFlush=t.finishFlush||Em.Z_FINISH,super(t,r),this[$8]=Em.Z_FULL_FLUSH,this[H8]=t.level,this[V8]=t.strategy}params(t,r){if(!this[JA]){if(!this[ui])throw new Error("cannot switch params when binding is closed");if(!this[ui].params)throw new Error("not supported in this implementation");if(this[H8]!==t||this[V8]!==r){this.flush(Em.Z_SYNC_FLUSH),z8(this[ui],"zlib binding closed");let n=this[ui].flush;this[ui].flush=(i,a)=>{this.flush(i),a()};try{this[ui].params(t,r)}finally{this[ui].flush=n}this[ui]&&(this[H8]=t,this[V8]=r)}}}},Dfe=class extends lp{constructor(t){super(t,"Deflate")}},kfe=class extends lp{constructor(t){super(t,"Inflate")}},Tfe=class extends lp{constructor(t){super(t,"Gzip")}},Rfe=class extends lp{constructor(t){super(t,"Gunzip")}},Pfe=class extends lp{constructor(t){super(t,"DeflateRaw")}},Ffe=class extends lp{constructor(t){super(t,"InflateRaw")}},Ife=class extends lp{constructor(t){super(t,"Unzip")}},W8=class extends J8{constructor(t,r){t=t||{},t.flush=t.flush||Em.BROTLI_OPERATION_PROCESS,t.finishFlush=t.finishFlush||Em.BROTLI_OPERATION_FINISH,super(t,r),this[$8]=Em.BROTLI_OPERATION_FLUSH}},Ofe=class extends W8{constructor(t){super(t,"BrotliCompress")}},jfe=class extends W8{constructor(t){super(t,"BrotliDecompress")}};vo.Deflate=Dfe;vo.Inflate=kfe;vo.Gzip=Tfe;vo.Gunzip=Rfe;vo.DeflateRaw=Pfe;vo.InflateRaw=Ffe;vo.Unzip=Ife;typeof Cfe.BrotliCompress=="function"?(vo.BrotliCompress=Ofe,vo.BrotliDecompress=jfe):vo.BrotliCompress=vo.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var YA=y(WA=>{"use strict";WA.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);WA.code=new Map(Array.from(WA.name).map(e=>[e[1],e[0]]))});var _m=y((Drr,qfe)=>{var got=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;qfe.exports=got!=="win32"?e=>e:e=>e&&e.replace(/\\/g,"/")});var H1=y((Rrr,Lfe)=>{"use strict";var krr=YA(),vot=x0(),Q8=_m(),X8=Symbol("slurp");Lfe.exports=class extends vot{constructor(t,r,n){super();switch(this.pause(),this.extended=r,this.globalExtended=n,this.header=t,this.startBlockSize=512*Math.ceil(t.size/512),this.blockRemain=this.startBlockSize,this.remain=t.size,this.type=t.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=Q8(t.path),this.mode=t.mode,this.mode&&(this.mode=this.mode&4095),this.uid=t.uid,this.gid=t.gid,this.uname=t.uname,this.gname=t.gname,this.size=t.size,this.mtime=t.mtime,this.atime=t.atime,this.ctime=t.ctime,this.linkpath=Q8(t.linkpath),this.uname=t.uname,this.gname=t.gname,r&&this[X8](r),n&&this[X8](n,!0)}write(t){let r=t.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");let n=this.remain,i=this.blockRemain;return this.remain=Math.max(0,n-r),this.blockRemain=Math.max(0,i-r),this.ignore?!0:n>=r?super.write(t):super.write(t.slice(0,n))}[X8](t,r){for(let n in t)t[n]!==null&&t[n]!==void 0&&!(r&&n==="path")&&(this[n]=n==="path"||n==="linkpath"?Q8(t[n]):t[n])}}});var Mfe=y(Z8=>{"use strict";var Prr=Z8.encode=(e,t)=>{if(Number.isSafeInteger(e))e<0?bot(e,t):yot(e,t);else throw TypeError("cannot encode number outside of javascript safe integer range");return t},yot=(e,t)=>{t[0]=128;for(var r=t.length;r>1;r--)t[r-1]=e&255,e=Math.floor(e/256)},bot=(e,t)=>{t[0]=255;var r=!1;e=e*-1;for(var n=t.length;n>1;n--){var i=e&255;e=Math.floor(e/256),r?t[n-1]=Nfe(i):i===0?t[n-1]=0:(r=!0,t[n-1]=Bfe(i))}},Frr=Z8.parse=e=>{var t=e[e.length-1],r=e[0],n;if(r===128)n=Eot(e.slice(1,e.length));else if(r===255)n=wot(e);else throw TypeError("invalid base256 encoding");if(!Number.isSafeInteger(n))throw TypeError("parsed number outside of javascript safe integer range");return n},wot=e=>{for(var t=e.length,r=0,n=!1,i=t-1;i>-1;i--){var a=e[i],s;n?s=Nfe(a):a===0?s=a:(n=!0,s=Bfe(a)),s!==0&&(r-=s*Math.pow(256,t-i-1))}return r},Eot=e=>{for(var t=e.length,r=0,n=t-1;n>-1;n--){var i=e[n];i!==0&&(r+=i*Math.pow(256,t-n-1))}return r},Nfe=e=>(255^e)&255,Bfe=e=>(255^e)+1&255});var S0=y((Orr,Ufe)=>{"use strict";var fp=sp(),e6=YA(),C0=require("path").posix,zfe=Mfe(),t6=Symbol("slurp"),yo=Symbol("type"),$fe=class{constructor(t,r,n,i){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[yo]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,fp.isBuffer(t)?this.decode(t,r||0,n,i):t&&this.set(t)}decode(t,r,n,i){if(r||(r=0),!t||!(t.length>=r+512))throw new Error("need 512 bytes for header");if(this.path=xm(t,r,100),this.mode=dp(t,r+100,8),this.uid=dp(t,r+108,8),this.gid=dp(t,r+116,8),this.size=dp(t,r+124,12),this.mtime=r6(t,r+136,12),this.cksum=dp(t,r+148,12),this[t6](n),this[t6](i,!0),this[yo]=xm(t,r+156,1),this[yo]===""&&(this[yo]="0"),this[yo]==="0"&&this.path.substr(-1)==="/"&&(this[yo]="5"),this[yo]==="5"&&(this.size=0),this.linkpath=xm(t,r+157,100),t.slice(r+257,r+265).toString()==="ustar\x0000")if(this.uname=xm(t,r+265,32),this.gname=xm(t,r+297,32),this.devmaj=dp(t,r+329,8),this.devmin=dp(t,r+337,8),t[r+475]!==0){let s=xm(t,r+345,155);this.path=s+"/"+this.path}else{let s=xm(t,r+345,130);s&&(this.path=s+"/"+this.path),this.atime=r6(t,r+476,12),this.ctime=r6(t,r+488,12)}let a=8*32;for(let s=r;s<r+148;s++)a+=t[s];for(let s=r+156;s<r+512;s++)a+=t[s];this.cksumValid=a===this.cksum,this.cksum===null&&a===8*32&&(this.nullBlock=!0)}[t6](t,r){for(let n in t)t[n]!==null&&t[n]!==void 0&&!(r&&n==="path")&&(this[n]=t[n])}encode(t,r){if(t||(t=this.block=fp.alloc(512),r=0),r||(r=0),!(t.length>=r+512))throw new Error("need 512 bytes for header");let n=this.ctime||this.atime?130:155,i=_ot(this.path||"",n),a=i[0],s=i[1];this.needPax=i[2],this.needPax=Cm(t,r,100,a)||this.needPax,this.needPax=pp(t,r+100,8,this.mode)||this.needPax,this.needPax=pp(t,r+108,8,this.uid)||this.needPax,this.needPax=pp(t,r+116,8,this.gid)||this.needPax,this.needPax=pp(t,r+124,12,this.size)||this.needPax,this.needPax=n6(t,r+136,12,this.mtime)||this.needPax,t[r+156]=this[yo].charCodeAt(0),this.needPax=Cm(t,r+157,100,this.linkpath)||this.needPax,t.write("ustar\x0000",r+257,8),this.needPax=Cm(t,r+265,32,this.uname)||this.needPax,this.needPax=Cm(t,r+297,32,this.gname)||this.needPax,this.needPax=pp(t,r+329,8,this.devmaj)||this.needPax,this.needPax=pp(t,r+337,8,this.devmin)||this.needPax,this.needPax=Cm(t,r+345,n,s)||this.needPax,t[r+475]!==0?this.needPax=Cm(t,r+345,155,s)||this.needPax:(this.needPax=Cm(t,r+345,130,s)||this.needPax,this.needPax=n6(t,r+476,12,this.atime)||this.needPax,this.needPax=n6(t,r+488,12,this.ctime)||this.needPax);let o=8*32;for(let u=r;u<r+148;u++)o+=t[u];for(let u=r+156;u<r+512;u++)o+=t[u];return this.cksum=o,pp(t,r+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(t){for(let r in t)t[r]!==null&&t[r]!==void 0&&(this[r]=t[r])}get type(){return e6.name.get(this[yo])||this[yo]}get typeKey(){return this[yo]}set type(t){e6.code.has(t)?this[yo]=e6.code.get(t):this[yo]=t}},_ot=(e,t)=>{let r=100,n=e,i="",a,s=C0.parse(e).root||".";if(fp.byteLength(n)<r)a=[n,i,!1];else{i=C0.dirname(n),n=C0.basename(n);do fp.byteLength(n)<=r&&fp.byteLength(i)<=t?a=[n,i,!1]:fp.byteLength(n)>r&&fp.byteLength(i)<=t?a=[n.substr(0,r-1),i,!0]:(n=C0.join(C0.basename(i),n),i=C0.dirname(i));while(i!==s&&!a);a||(a=[e.substr(0,r-1),"",!0])}return a},xm=(e,t,r)=>e.slice(t,t+r).toString("utf8").replace(/\0.*/,""),r6=(e,t,r)=>xot(dp(e,t,r)),xot=e=>e===null?null:new Date(e*1e3),dp=(e,t,r)=>e[t]&128?zfe.parse(e.slice(t,t+r)):Cot(e,t,r),Sot=e=>isNaN(e)?null:e,Cot=(e,t,r)=>Sot(parseInt(e.slice(t,t+r).toString("utf8").replace(/\0.*$/,"").trim(),8)),Aot={12:8589934591,8:2097151},pp=(e,t,r,n)=>n===null?!1:n>Aot[r]||n<0?(zfe.encode(n,e.slice(t,t+r)),!0):(Dot(e,t,r,n),!1),Dot=(e,t,r,n)=>e.write(kot(n,r),t,r,"ascii"),kot=(e,t)=>Tot(Math.floor(e).toString(8),t),Tot=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0",n6=(e,t,r,n)=>n===null?!1:pp(e,t,r,n.getTime()/1e3),Rot=new Array(156).join("\0"),Cm=(e,t,r,n)=>n===null?!1:(e.write(n+Rot,t,r,"utf8"),n.length!==fp.byteLength(n)||n.length>r);Ufe.exports=$fe});var ZA=y((jrr,Gfe)=>{"use strict";var QA=sp(),Pot=S0(),Fot=require("path"),XA=class{constructor(t,r){this.atime=t.atime||null,this.charset=t.charset||null,this.comment=t.comment||null,this.ctime=t.ctime||null,this.gid=t.gid||null,this.gname=t.gname||null,this.linkpath=t.linkpath||null,this.mtime=t.mtime||null,this.path=t.path||null,this.size=t.size||null,this.uid=t.uid||null,this.uname=t.uname||null,this.dev=t.dev||null,this.ino=t.ino||null,this.nlink=t.nlink||null,this.global=r||!1}encode(){let t=this.encodeBody();if(t==="")return null;let r=QA.byteLength(t),n=512*Math.ceil(1+r/512),i=QA.allocUnsafe(n);for(let a=0;a<512;a++)i[a]=0;new Pot({path:("PaxHeader/"+Fot.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(i),i.write(t,512,r,"utf8");for(let a=r+512;a<i.length;a++)i[a]=0;return i}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(t){if(this[t]===null||this[t]===void 0)return"";let r=this[t]instanceof Date?this[t].getTime()/1e3:this[t],n=" "+(t==="dev"||t==="ino"||t==="nlink"?"SCHILY.":"")+t+"="+r+`
226
226
  `,i=QA.byteLength(n),a=Math.floor(Math.log(i)/Math.log(10))+1;return i+a>=Math.pow(10,a)&&(a+=1),a+i+n}};XA.parse=(e,t,r)=>new XA(Iot(Oot(e),t),r);var Iot=(e,t)=>t?Object.keys(e).reduce((r,n)=>(r[n]=e[n],r),t):e,Oot=e=>e.replace(/\n$/,"").split(`
227
227
  `).reduce(jot,Object.create(null)),jot=(e,t)=>{let r=parseInt(t,10);if(r!==QA.byteLength(t)+1)return e;t=t.substr((r+" ").length);let n=t.split("="),i=n.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!i)return e;let a=n.join("=");return e[i]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i)?new Date(a*1e3):/^[0-9]+$/.test(a)?+a:a,e};Gfe.exports=XA});var A0=y((qrr,Hfe)=>{var qot=["/".repeat(1024),"/".repeat(512),"/".repeat(256),"/".repeat(128),"/".repeat(64),"/".repeat(32),"/".repeat(16),"/".repeat(8),"/".repeat(4),"/".repeat(2),"/"];Hfe.exports=e=>{for(let t of qot)for(;e.length>=t.length&&e.slice(-1*t.length)===t;)e=e.slice(0,-1*t.length);return e}});var eD=y((Lrr,Vfe)=>{"use strict";Vfe.exports=e=>class extends e{warn(t,r){if(!this.strict)this.emit("warn",t,r);else if(r instanceof Error)this.emit("error",r);else{let n=new Error(t);n.data=r,this.emit("error",n)}}}});var a6=y((Nrr,Kfe)=>{"use strict";var tD=["|","<",">","?",":"],i6=tD.map(e=>String.fromCharCode(61440+e.charCodeAt(0))),Lot=new Map(tD.map((e,t)=>[e,i6[t]])),Not=new Map(i6.map((e,t)=>[e,tD[t]]));Kfe.exports={encode:e=>tD.reduce((t,r)=>t.split(r).join(Lot.get(r)),e),decode:e=>i6.reduce((t,r)=>t.split(r).join(Not.get(r)),e)}});var s6=y((Brr,Jfe)=>{var{isAbsolute:Bot,parse:Wfe}=require("path").win32;Jfe.exports=e=>{let t="",r=Wfe(e);for(;Bot(e)||r.root;){let n=e.charAt(0)==="/"&&e.slice(0,4)!=="//?/"?"/":r.root;e=e.substr(n.length),t+=n,r=Wfe(e)}return[t,e]}});var Qfe=y((Mrr,Yfe)=>{"use strict";Yfe.exports=(e,t)=>(e&=4095,t&&(e&256&&(e|=64),e&32&&(e|=8),e&4&&(e|=1)),e)});var m6=y((Grr,Xfe)=>{"use strict";var rD=sp(),Zfe=x0(),ede=ZA(),tde=S0(),Urr=H1(),Gc=require("fs"),rde=require("path"),kf=_m(),Mot=A0(),nde=(e,t)=>t?(e=kf(e).replace(/^\.(\/|$)/,""),Mot(t)+"/"+e):e,Uot=16*1024*1024,ide=Symbol("process"),ade=Symbol("file"),sde=Symbol("directory"),o6=Symbol("symlink"),ode=Symbol("hardlink"),V1=Symbol("header"),nD=Symbol("read"),u6=Symbol("lstat"),iD=Symbol("onlstat"),c6=Symbol("onread"),l6=Symbol("onreadlink"),f6=Symbol("openfile"),d6=Symbol("onopenfile"),hp=Symbol("close"),aD=Symbol("mode"),p6=Symbol("awaitDrain"),h6=Symbol("ondrain"),Hc=Symbol("prefix"),ude=Symbol("hadError"),cde=eD(),zot=a6(),lde=s6(),fde=Qfe(),sD=cde(class extends Zfe{constructor(t,r){if(r=r||{},super(r),typeof t!="string")throw new TypeError("path is required");if(this.path=kf(t),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||Uot,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=kf(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?kf(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn),!this.preservePaths){let n=lde(this.path);n[0]&&(this.warn("stripping "+n[0]+" from absolute path",this.path),this.path=n[1])}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=zot.decode(this.path.replace(/\\/g,"/")),t=t.replace(/\\/g,"/")),this.absolute=kf(r.absolute||rde.resolve(this.cwd,t)),this.path===""&&(this.path="./"),this.statCache.has(this.absolute)?this[iD](this.statCache.get(this.absolute)):this[u6]()}emit(t,...r){return t==="error"&&(this[ude]=!0),super.emit(t,...r)}[u6](){Gc.lstat(this.absolute,(t,r)=>{if(t)return this.emit("error",t);this[iD](r)})}[iD](t){this.statCache.set(this.absolute,t),this.stat=t,t.isFile()||(t.size=0),this.type=$ot(t),this.emit("stat",t),this[ide]()}[ide](){switch(this.type){case"File":return this[ade]();case"Directory":return this[sde]();case"SymbolicLink":return this[o6]();default:return this.end()}}[aD](t){return fde(t,this.type==="Directory")}[Hc](t){return nde(t,this.prefix)}[V1](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new tde({path:this[Hc](this.path),linkpath:this.type==="Link"?this[Hc](this.linkpath):this.linkpath,mode:this[aD](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new ede({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[Hc](this.path),linkpath:this.type==="Link"?this[Hc](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[sde](){this.path.substr(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[V1](),this.end()}[o6](){Gc.readlink(this.absolute,(t,r)=>{if(t)return this.emit("error",t);this[l6](r)})}[l6](t){this.linkpath=kf(t),this[V1](),this.end()}[ode](t){this.type="Link",this.linkpath=kf(rde.relative(this.cwd,t)),this.stat.size=0,this[V1](),this.end()}[ade](){if(this.stat.nlink>1){let t=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(t)){let r=this.linkCache.get(t);if(r.indexOf(this.cwd)===0)return this[ode](r)}this.linkCache.set(t,this.absolute)}if(this[V1](),this.stat.size===0)return this.end();this[f6]()}[f6](){Gc.open(this.absolute,"r",(t,r)=>{if(t)return this.emit("error",t);this[d6](r)})}[d6](t){if(this.fd=t,this[ude])return this[hp]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let r=Math.min(this.blockLen,this.maxReadSize);this.buf=rD.allocUnsafe(r),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[nD]()}[nD](){let{fd:t,buf:r,offset:n,length:i,pos:a}=this;Gc.read(t,r,n,i,a,(s,o)=>{if(s)return this[hp](()=>this.emit("error",s));this[c6](o)})}[hp](t){Gc.close(this.fd,t)}[c6](t){if(t<=0&&this.remain>0){let i=new Error("encountered unexpected EOF");return i.path=this.absolute,i.syscall="read",i.code="EOF",this[hp](()=>this.emit("error",i))}if(t>this.remain){let i=new Error("did not encounter expected EOF");return i.path=this.absolute,i.syscall="read",i.code="EOF",this[hp](()=>this.emit("error",i))}if(t===this.remain)for(let i=t;i<this.length&&t<this.blockRemain;i++)this.buf[i+this.offset]=0,t++,this.remain++;let r=this.offset===0&&t===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+t);this.write(r)?this[h6]():this[p6](()=>this[h6]())}[p6](t){this.once("drain",t)}write(t){if(this.blockRemain<t.length){let r=new Error("writing more data than expected");return r.path=this.absolute,this.emit("error",r)}return this.remain-=t.length,this.blockRemain-=t.length,this.pos+=t.length,this.offset+=t.length,super.write(t)}[h6](){if(!this.remain)return this.blockRemain&&super.write(rD.alloc(this.blockRemain)),this[hp](t=>t?this.emit("error",t):this.end());this.offset>=this.length&&(this.buf=rD.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[nD]()}}),dde=class extends sD{constructor(t,r){super(t,r)}[u6](){this[iD](Gc.lstatSync(this.absolute))}[o6](){this[l6](Gc.readlinkSync(this.absolute))}[f6](){this[d6](Gc.openSync(this.absolute,"r"))}[nD](){let t=!0;try{let{fd:r,buf:n,offset:i,length:a,pos:s}=this,o=Gc.readSync(r,n,i,a,s);this[c6](o),t=!1}finally{if(t)try{this[hp](()=>{})}catch(r){}}}[p6](t){t()}[hp](t){Gc.closeSync(this.fd),t()}},Got=cde(class extends Zfe{constructor(t,r){if(r=r||{},super(r),this.preservePaths=!!r.preservePaths,this.portable=!!r.portable,this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.readEntry=t,this.type=t.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=r.prefix||null,this.path=kf(t.path),this.mode=this[aD](t.mode),this.uid=this.portable?null:t.uid,this.gid=this.portable?null:t.gid,this.uname=this.portable?null:t.uname,this.gname=this.portable?null:t.gname,this.size=t.size,this.mtime=this.noMtime?null:r.mtime||t.mtime,this.atime=this.portable?null:t.atime,this.ctime=this.portable?null:t.ctime,this.linkpath=kf(t.linkpath),typeof r.onwarn=="function"&&this.on("warn",r.onwarn),!this.preservePaths){let n=lde(this.path);n[0]&&(this.warn("stripping "+n[0]+" from absolute path",this.path),this.path=n[1])}this.remain=t.size,this.blockRemain=t.startBlockSize,this.header=new tde({path:this[Hc](this.path),linkpath:this.type==="Link"?this[Hc](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),this.header.encode()&&!this.noPax&&super.write(new ede({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[Hc](this.path),linkpath:this.type==="Link"?this[Hc](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),t.pipe(this)}[Hc](t){return nde(t,this.prefix)}[aD](t){return fde(t,this.type==="Directory")}write(t){let r=t.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(t)}end(){return this.blockRemain&&super.write(rD.alloc(this.blockRemain)),super.end()}});sD.Sync=dde;sD.Tar=Got;var $ot=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";Xfe.exports=sD});var hD=y((Vrr,pde)=>{"use strict";var Hot=sp(),g6=class{constructor(t,r){this.path=t||"./",this.absolute=r,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},Vot=x0(),Kot=Y8(),Jot=H1(),v6=m6(),Wot=v6.Sync,Yot=v6.Tar,Qot=zA(),hde=Hot.alloc(1024),oD=Symbol("onStat"),uD=Symbol("ended"),Vc=Symbol("queue"),D0=Symbol("current"),Sm=Symbol("process"),cD=Symbol("processing"),mde=Symbol("processJob"),Kc=Symbol("jobs"),y6=Symbol("jobDone"),lD=Symbol("addFSEntry"),gde=Symbol("addTarEntry"),b6=Symbol("stat"),w6=Symbol("readdir"),fD=Symbol("onreaddir"),dD=Symbol("pipe"),vde=Symbol("entry"),E6=Symbol("entryOpt"),_6=Symbol("writeEntryClass"),yde=Symbol("write"),x6=Symbol("ondrain"),pD=require("fs"),bde=require("path"),Xot=eD(),C6=_m(),S6=Xot(class extends Vot{constructor(t){super(t);t=t||Object.create(null),this.opt=t,this.cwd=t.cwd||process.cwd(),this.maxReadSize=t.maxReadSize,this.preservePaths=!!t.preservePaths,this.strict=!!t.strict,this.noPax=!!t.noPax,this.prefix=C6(t.prefix||""),this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.readdirCache=t.readdirCache||new Map,this[_6]=v6,typeof t.onwarn=="function"&&this.on("warn",t.onwarn),this.zip=null,t.gzip?(typeof t.gzip!="object"&&(t.gzip={}),this.zip=new Kot.Gzip(t.gzip),this.zip.on("data",r=>super.write(r)),this.zip.on("end",r=>super.end()),this.zip.on("drain",r=>this[x6]()),this.on("resume",r=>this.zip.resume())):this.on("drain",this[x6]),this.portable=!!t.portable,this.noDirRecurse=!!t.noDirRecurse,this.follow=!!t.follow,this.noMtime=!!t.noMtime,this.mtime=t.mtime||null,this.filter=typeof t.filter=="function"?t.filter:r=>!0,this[Vc]=new Qot,this[Kc]=0,this.jobs=+t.jobs||4,this[cD]=!1,this[uD]=!1}[yde](t){return super.write(t)}add(t){return this.write(t),this}end(t){return t&&this.write(t),this[uD]=!0,this[Sm](),this}write(t){if(this[uD])throw new Error("write after end");return t instanceof Jot?this[gde](t):this[lD](t),this.flowing}[gde](t){let r=C6(bde.resolve(this.cwd,t.path));if(!this.filter(t.path,t))t.resume();else{let n=new g6(t.path,r,!1);n.entry=new Yot(t,this[E6](n)),n.entry.on("end",i=>this[y6](n)),this[Kc]+=1,this[Vc].push(n)}this[Sm]()}[lD](t){let r=C6(bde.resolve(this.cwd,t));this[Vc].push(new g6(t,r)),this[Sm]()}[b6](t){t.pending=!0,this[Kc]+=1;let r=this.follow?"stat":"lstat";pD[r](t.absolute,(n,i)=>{t.pending=!1,this[Kc]-=1,n?this.emit("error",n):this[oD](t,i)})}[oD](t,r){this.statCache.set(t.absolute,r),t.stat=r,this.filter(t.path,r)||(t.ignore=!0),this[Sm]()}[w6](t){t.pending=!0,this[Kc]+=1,pD.readdir(t.absolute,(r,n)=>{if(t.pending=!1,this[Kc]-=1,r)return this.emit("error",r);this[fD](t,n)})}[fD](t,r){this.readdirCache.set(t.absolute,r),t.readdir=r,this[Sm]()}[Sm](){if(!this[cD]){this[cD]=!0;for(let t=this[Vc].head;t!==null&&this[Kc]<this.jobs;t=t.next)if(this[mde](t.value),t.value.ignore){let r=t.next;this[Vc].removeNode(t),t.next=r}this[cD]=!1,this[uD]&&!this[Vc].length&&this[Kc]===0&&(this.zip?this.zip.end(hde):(super.write(hde),super.end()))}}get[D0](){return this[Vc]&&this[Vc].head&&this[Vc].head.value}[y6](t){this[Vc].shift(),this[Kc]-=1,this[Sm]()}[mde](t){if(!t.pending){if(t.entry){t===this[D0]&&!t.piped&&this[dD](t);return}if(t.stat||(this.statCache.has(t.absolute)?this[oD](t,this.statCache.get(t.absolute)):this[b6](t)),!!t.stat&&!t.ignore&&!(!this.noDirRecurse&&t.stat.isDirectory()&&!t.readdir&&(this.readdirCache.has(t.absolute)?this[fD](t,this.readdirCache.get(t.absolute)):this[w6](t),!t.readdir))){if(t.entry=this[vde](t),!t.entry){t.ignore=!0;return}t===this[D0]&&!t.piped&&this[dD](t)}}}[E6](t){return{onwarn:(r,n)=>{this.warn(r,n)},noPax:this.noPax,cwd:this.cwd,absolute:t.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[vde](t){this[Kc]+=1;try{return new this[_6](t.path,this[E6](t)).on("end",()=>this[y6](t)).on("error",r=>this.emit("error",r))}catch(r){this.emit("error",r)}}[x6](){this[D0]&&this[D0].entry&&this[D0].entry.resume()}[dD](t){t.piped=!0,t.readdir&&t.readdir.forEach(i=>{let a=t.path,s=a==="./"?"":a.replace(/\/*$/,"/");this[lD](s+i)});let r=t.entry,n=this.zip;n?r.on("data",i=>{n.write(i)||r.pause()}):r.on("data",i=>{super.write(i)||r.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),wde=class extends S6{constructor(t){super(t);this[_6]=Wot}pause(){}resume(){}[b6](t){let r=this.follow?"statSync":"lstatSync";this[oD](t,pD[r](t.absolute))}[w6](t,r){this[fD](t,pD.readdirSync(t.absolute))}[dD](t){let r=t.entry,n=this.zip;t.readdir&&t.readdir.forEach(i=>{let a=t.path,s=a==="./"?"":a.replace(/\/*$/,"/");this[lD](s+i)}),n?r.on("data",i=>{n.write(i)}):r.on("data",i=>{super[yde](i)})}};S6.Sync=wde;pde.exports=S6});var I0=y(K1=>{"use strict";var Zot=x0(),eut=require("events").EventEmitter,Wo=require("fs"),mD=process.binding("fs"),Krr=mD.writeBuffers,tut=mD.FSReqWrap||mD.FSReqCallback,k0=Symbol("_autoClose"),Jc=Symbol("_close"),J1=Symbol("_ended"),Mn=Symbol("_fd"),Ede=Symbol("_finished"),Am=Symbol("_flags"),A6=Symbol("_flush"),D6=Symbol("_handleChunk"),k6=Symbol("_makeBuf"),T6=Symbol("_mode"),gD=Symbol("_needDrain"),T0=Symbol("_onerror"),R0=Symbol("_onopen"),R6=Symbol("_onread"),Dm=Symbol("_onwrite"),mp=Symbol("_open"),gp=Symbol("_path"),km=Symbol("_pos"),Wc=Symbol("_queue"),P0=Symbol("_read"),_de=Symbol("_readSize"),vp=Symbol("_reading"),vD=Symbol("_remain"),xde=Symbol("_size"),yD=Symbol("_write"),F0=Symbol("_writing"),bD=Symbol("_defaultFlag"),P6=class extends Zot{constructor(t,r){if(r=r||{},super(r),this.writable=!1,typeof t!="string")throw new TypeError("path must be a string");this[Mn]=typeof r.fd=="number"?r.fd:null,this[gp]=t,this[_de]=r.readSize||16*1024*1024,this[vp]=!1,this[xde]=typeof r.size=="number"?r.size:Infinity,this[vD]=this[xde],this[k0]=typeof r.autoClose=="boolean"?r.autoClose:!0,typeof this[Mn]=="number"?this[P0]():this[mp]()}get fd(){return this[Mn]}get path(){return this[gp]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[mp](){Wo.open(this[gp],"r",(t,r)=>this[R0](t,r))}[R0](t,r){t?this[T0](t):(this[Mn]=r,this.emit("open",r),this[P0]())}[k6](){return Buffer.allocUnsafe(Math.min(this[_de],this[vD]))}[P0](){if(!this[vp]){this[vp]=!0;let t=this[k6]();if(t.length===0)return process.nextTick(()=>this[R6](null,0,t));Wo.read(this[Mn],t,0,t.length,null,(r,n,i)=>this[R6](r,n,i))}}[R6](t,r,n){this[vp]=!1,t?this[T0](t):this[D6](r,n)&&this[P0]()}[Jc](){this[k0]&&typeof this[Mn]=="number"&&(Wo.close(this[Mn],t=>this.emit("close")),this[Mn]=null)}[T0](t){this[vp]=!0,this[Jc](),this.emit("error",t)}[D6](t,r){let n=!1;return this[vD]-=t,t>0&&(n=super.write(t<r.length?r.slice(0,t):r)),(t===0||this[vD]<=0)&&(n=!1,this[Jc](),super.end()),n}emit(t,r){switch(t){case"prefinish":case"finish":break;case"drain":typeof this[Mn]=="number"&&this[P0]();break;default:return super.emit(t,r)}}},Cde=class extends P6{[mp](){let t=!0;try{this[R0](null,Wo.openSync(this[gp],"r")),t=!1}finally{t&&this[Jc]()}}[P0](){let t=!0;try{if(!this[vp]){this[vp]=!0;do{let r=this[k6](),n=r.length===0?0:Wo.readSync(this[Mn],r,0,r.length,null);if(!this[D6](n,r))break}while(!0);this[vp]=!1}t=!1}finally{t&&this[Jc]()}}[Jc](){if(this[k0]&&typeof this[Mn]=="number"){try{Wo.closeSync(this[Mn])}catch(t){}this[Mn]=null,this.emit("close")}}},F6=class extends eut{constructor(t,r){r=r||{},super(r),this.readable=!1,this[F0]=!1,this[J1]=!1,this[gD]=!1,this[Wc]=[],this[gp]=t,this[Mn]=typeof r.fd=="number"?r.fd:null,this[T6]=r.mode===void 0?438:r.mode,this[km]=typeof r.start=="number"?r.start:null,this[k0]=typeof r.autoClose=="boolean"?r.autoClose:!0;let n=this[km]!==null?"r+":"w";this[bD]=r.flags===void 0,this[Am]=this[bD]?n:r.flags,this[Mn]===null&&this[mp]()}get fd(){return this[Mn]}get path(){return this[gp]}[T0](t){this[Jc](),this[F0]=!0,this.emit("error",t)}[mp](){Wo.open(this[gp],this[Am],this[T6],(t,r)=>this[R0](t,r))}[R0](t,r){this[bD]&&this[Am]==="r+"&&t&&t.code==="ENOENT"?(this[Am]="w",this[mp]()):t?this[T0](t):(this[Mn]=r,this.emit("open",r),this[A6]())}end(t,r){t&&this.write(t,r),this[J1]=!0,!this[F0]&&!this[Wc].length&&typeof this[Mn]=="number"&&this[Dm](null,0)}write(t,r){return typeof t=="string"&&(t=new Buffer(t,r)),this[J1]?(this.emit("error",new Error("write() after end()")),!1):this[Mn]===null||this[F0]||this[Wc].length?(this[Wc].push(t),this[gD]=!0,!1):(this[F0]=!0,this[yD](t),!0)}[yD](t){Wo.write(this[Mn],t,0,t.length,this[km],(r,n)=>this[Dm](r,n))}[Dm](t,r){t?this[T0](t):(this[km]!==null&&(this[km]+=r),this[Wc].length?this[A6]():(this[F0]=!1,this[J1]&&!this[Ede]?(this[Ede]=!0,this[Jc](),this.emit("finish")):this[gD]&&(this[gD]=!1,this.emit("drain"))))}[A6](){if(this[Wc].length===0)this[J1]&&this[Dm](null,0);else if(this[Wc].length===1)this[yD](this[Wc].pop());else{let t=this[Wc];this[Wc]=[],rut(this[Mn],t,this[km],(r,n)=>this[Dm](r,n))}}[Jc](){this[k0]&&typeof this[Mn]=="number"&&(Wo.close(this[Mn],t=>this.emit("close")),this[Mn]=null)}},Sde=class extends F6{[mp](){let t;try{t=Wo.openSync(this[gp],this[Am],this[T6])}catch(r){if(this[bD]&&this[Am]==="r+"&&r&&r.code==="ENOENT")return this[Am]="w",this[mp]();throw r}this[R0](null,t)}[Jc](){if(this[k0]&&typeof this[Mn]=="number"){try{Wo.closeSync(this[Mn])}catch(t){}this[Mn]=null,this.emit("close")}}[yD](t){try{this[Dm](null,Wo.writeSync(this[Mn],t,0,t.length,this[km]))}catch(r){this[Dm](r,0)}}},rut=(e,t,r,n)=>{let i=(s,o)=>n(s,o,t),a=new tut;a.oncomplete=i,mD.writeBuffers(e,t,r,a)};K1.ReadStream=P6;K1.ReadStreamSync=Cde;K1.WriteStream=F6;K1.WriteStreamSync=Sde});var Q1=y((Qrr,Ade)=>{"use strict";var nut=eD(),Wrr=require("path"),iut=S0(),aut=require("events"),sut=zA(),out=1024*1024,uut=H1(),Dde=ZA(),cut=Y8(),wD=sp(),I6=wD.from([31,139]),Tf=Symbol("state"),Tm=Symbol("writeEntry"),Rf=Symbol("readEntry"),O6=Symbol("nextEntry"),kde=Symbol("processEntry"),Yo=Symbol("extendedHeader"),W1=Symbol("globalExtendedHeader"),yp=Symbol("meta"),Tde=Symbol("emitMeta"),ei=Symbol("buffer"),Pf=Symbol("queue"),Rm=Symbol("ended"),Rde=Symbol("emittedEnd"),O0=Symbol("emit"),Ws=Symbol("unzip"),ED=Symbol("consumeChunk"),_D=Symbol("consumeChunkSub"),j6=Symbol("consumeBody"),Pde=Symbol("consumeMeta"),Fde=Symbol("consumeHeader"),xD=Symbol("consuming"),q6=Symbol("bufferConcat"),L6=Symbol("maybeEnd"),Y1=Symbol("writing"),bp=Symbol("aborted"),N6=Symbol("onDone"),lut=e=>!0;Ade.exports=nut(class extends aut{constructor(t){t=t||{},super(t),t.ondone?this.on(N6,t.ondone):this.on(N6,r=>{this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close")}),this.strict=!!t.strict,this.maxMetaEntrySize=t.maxMetaEntrySize||out,this.filter=typeof t.filter=="function"?t.filter:lut,this.writable=!0,this.readable=!1,this[Pf]=new sut,this[ei]=null,this[Rf]=null,this[Tm]=null,this[Tf]="begin",this[yp]="",this[Yo]=null,this[W1]=null,this[Rm]=!1,this[Ws]=null,this[bp]=!1,typeof t.onwarn=="function"&&this.on("warn",t.onwarn),typeof t.onentry=="function"&&this.on("entry",t.onentry)}[Fde](t,r){let n;try{n=new iut(t,r,this[Yo],this[W1])}catch(i){return this.warn("invalid entry",i)}if(n.nullBlock)this[O0]("nullBlock");else if(!n.cksumValid)this.warn("invalid entry",n);else if(!n.path)this.warn("invalid: path is required",n);else{let i=n.type;if(/^(Symbolic)?Link$/.test(i)&&!n.linkpath)this.warn("invalid: linkpath required",n);else if(!/^(Symbolic)?Link$/.test(i)&&n.linkpath)this.warn("invalid: linkpath forbidden",n);else{let a=this[Tm]=new uut(n,this[Yo],this[W1]);a.meta?a.size>this.maxMetaEntrySize?(a.ignore=!0,this[O0]("ignoredEntry",a),this[Tf]="ignore"):a.size>0&&(this[yp]="",a.on("data",s=>this[yp]+=s),this[Tf]="meta"):(this[Yo]=null,a.ignore=a.ignore||!this.filter(a.path,a),a.ignore?(this[O0]("ignoredEntry",a),this[Tf]=a.remain?"ignore":"begin"):(a.remain?this[Tf]="body":(this[Tf]="begin",a.end()),this[Rf]?this[Pf].push(a):(this[Pf].push(a),this[O6]())))}}}[kde](t){let r=!0;return t?Array.isArray(t)?this.emit.apply(this,t):(this[Rf]=t,this.emit("entry",t),t.emittedEnd||(t.on("end",n=>this[O6]()),r=!1)):(this[Rf]=null,r=!1),r}[O6](){do;while(this[kde](this[Pf].shift()));if(!this[Pf].length){let t=this[Rf];!t||t.flowing||t.size===t.remain?this[Y1]||this.emit("drain"):t.once("drain",n=>this.emit("drain"))}}[j6](t,r){let n=this[Tm],i=n.blockRemain,a=i>=t.length&&r===0?t:t.slice(r,r+i);return n.write(a),n.blockRemain||(this[Tf]="begin",this[Tm]=null,n.end()),a.length}[Pde](t,r){let n=this[Tm],i=this[j6](t,r);return this[Tm]||this[Tde](n),i}[O0](t,r,n){!this[Pf].length&&!this[Rf]?this.emit(t,r,n):this[Pf].push([t,r,n])}[Tde](t){switch(this[O0]("meta",this[yp]),t.type){case"ExtendedHeader":case"OldExtendedHeader":this[Yo]=Dde.parse(this[yp],this[Yo],!1);break;case"GlobalExtendedHeader":this[W1]=Dde.parse(this[yp],this[W1],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[Yo]=this[Yo]||Object.create(null),this[Yo].path=this[yp].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[Yo]=this[Yo]||Object.create(null),this[Yo].linkpath=this[yp].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+t.type)}}abort(t,r){this[bp]=!0,this.warn(t,r),this.emit("abort",r),this.emit("error",r)}write(t){if(this[bp])return;if(this[Ws]===null&&t){if(this[ei]&&(t=wD.concat([this[ei],t]),this[ei]=null),t.length<I6.length)return this[ei]=t,!0;for(let n=0;this[Ws]===null&&n<I6.length;n++)t[n]!==I6[n]&&(this[Ws]=!1);if(this[Ws]===null){let n=this[Rm];this[Rm]=!1,this[Ws]=new cut.Unzip,this[Ws].on("data",a=>this[ED](a)),this[Ws].on("error",a=>this.abort(a.message,a)),this[Ws].on("end",a=>{this[Rm]=!0,this[ED]()}),this[Y1]=!0;let i=this[Ws][n?"end":"write"](t);return this[Y1]=!1,i}}this[Y1]=!0,this[Ws]?this[Ws].write(t):this[ED](t),this[Y1]=!1;let r=this[Pf].length?!1:this[Rf]?this[Rf].flowing:!0;return!r&&!this[Pf].length&&this[Rf].once("drain",n=>this.emit("drain")),r}[q6](t){t&&!this[bp]&&(this[ei]=this[ei]?wD.concat([this[ei],t]):t)}[L6](){if(this[Rm]&&!this[Rde]&&!this[bp]&&!this[xD]){this[Rde]=!0;let t=this[Tm];if(t&&t.blockRemain){let r=this[ei]?this[ei].length:0;this.warn("Truncated input (needed "+t.blockRemain+" more bytes, only "+r+" available)",t),this[ei]&&t.write(this[ei]),t.end()}this[O0](N6)}}[ED](t){if(this[xD])this[q6](t);else if(!t&&!this[ei])this[L6]();else{if(this[xD]=!0,this[ei]){this[q6](t);let r=this[ei];this[ei]=null,this[_D](r)}else this[_D](t);for(;this[ei]&&this[ei].length>=512&&!this[bp];){let r=this[ei];this[ei]=null,this[_D](r)}this[xD]=!1}(!this[ei]||this[Rm])&&this[L6]()}[_D](t){let r=0,n=t.length;for(;r+512<=n&&!this[bp];)switch(this[Tf]){case"begin":this[Fde](t,r),r+=512;break;case"ignore":case"body":r+=this[j6](t,r);break;case"meta":r+=this[Pde](t,r);break;default:throw new Error("invalid state: "+this[Tf])}r<n&&(this[ei]?this[ei]=wD.concat([t.slice(r),this[ei]]):this[ei]=t.slice(r))}end(t){this[bp]||(this[Ws]?this[Ws].end(t):(this[Rm]=!0,this.write(t)))}})});var CD=y((Zrr,Ide)=>{"use strict";var fut=sp(),dut=E0(),Ode=Q1(),j0=require("fs"),put=I0(),jde=require("path"),B6=A0(),Xrr=Ide.exports=(e,t,r)=>{typeof e=="function"?(r=e,t=null,e={}):Array.isArray(e)&&(t=e,e={}),typeof t=="function"&&(r=t,t=null),t?t=Array.from(t):t=[];let n=dut(e);if(n.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!n.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return t.length&&mut(n,t),n.noResume||hut(n),n.file&&n.sync?gut(n):n.file?vut(n,r):qde(n)},hut=e=>{let t=e.onentry;e.onentry=t?r=>{t(r),r.resume()}:r=>r.resume()},mut=(e,t)=>{let r=new Map(t.map(a=>[B6(a),!0])),n=e.filter,i=(a,s)=>{let o=s||jde.parse(a).root||".",u=a===o?!1:r.has(a)?r.get(a):i(jde.dirname(a),o);return r.set(a,u),u};e.filter=n?(a,s)=>n(a,s)&&i(B6(a)):a=>i(B6(a))},gut=e=>{let t=qde(e),r=e.file,n=!0,i;try{let a=j0.statSync(r),s=e.maxReadSize||16*1024*1024;if(a.size<s)t.end(j0.readFileSync(r));else{let o=0,u=fut.allocUnsafe(s);for(i=j0.openSync(r,"r");o<a.size;){let c=j0.readSync(i,u,0,s,o);o+=c,t.write(u.slice(0,c))}t.end()}n=!1}finally{if(n&&i)try{j0.closeSync(i)}catch(a){}}},vut=(e,t)=>{let r=new Ode(e),n=e.maxReadSize||16*1024*1024,i=e.file,a=new Promise((s,o)=>{r.on("error",o),r.on("end",s),j0.stat(i,(u,c)=>{if(u)o(u);else{let l=new put.ReadStream(i,{readSize:n,size:c.size});l.on("error",o),l.pipe(r)}})});return t?a.then(t,t):a},qde=e=>new Ode(e)});var zde=y((rnr,Lde)=>{"use strict";var yut=E0(),SD=hD(),enr=require("fs"),Nde=I0(),Bde=CD(),Mde=require("path"),tnr=Lde.exports=(e,t,r)=>{if(typeof t=="function"&&(r=t),Array.isArray(e)&&(t=e,e={}),!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);let n=yut(e);if(n.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!n.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return n.file&&n.sync?but(n,t):n.file?wut(n,t,r):n.sync?Eut(n,t):_ut(n,t)},but=(e,t)=>{let r=new SD.Sync(e),n=new Nde.WriteStreamSync(e.file,{mode:e.mode||438});r.pipe(n),Ude(r,t)},wut=(e,t,r)=>{let n=new SD(e),i=new Nde.WriteStream(e.file,{mode:e.mode||438});n.pipe(i);let a=new Promise((s,o)=>{i.on("error",o),i.on("close",s),n.on("error",o)});return M6(n,t),r?a.then(r,r):a},Ude=(e,t)=>{t.forEach(r=>{r.charAt(0)==="@"?Bde({file:Mde.resolve(e.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:n=>e.add(n)}):e.add(r)}),e.end()},M6=(e,t)=>{for(;t.length;){let r=t.shift();if(r.charAt(0)==="@")return Bde({file:Mde.resolve(e.cwd,r.substr(1)),noResume:!0,onentry:n=>e.add(n)}).then(n=>M6(e,t));e.add(r)}e.end()},Eut=(e,t)=>{let r=new SD.Sync(e);return Ude(r,t),r},_ut=(e,t)=>{let r=new SD(e);return M6(r,t),r}});var U6=y((anr,$de)=>{"use strict";var Gde=sp(),xut=E0(),Hde=hD(),nnr=Q1(),bo=require("fs"),Vde=I0(),Kde=CD(),Jde=require("path"),Wde=S0(),inr=$de.exports=(e,t,r)=>{let n=xut(e);if(!n.file)throw new TypeError("file is required");if(n.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");return t=Array.from(t),n.sync?Cut(n,t):Sut(n,t,r)},Cut=(e,t)=>{let r=new Hde.Sync(e),n=!0,i,a;try{try{i=bo.openSync(e.file,"r+")}catch(u){if(u.code==="ENOENT")i=bo.openSync(e.file,"w+");else throw u}let s=bo.fstatSync(i),o=Gde.alloc(512);e:for(a=0;a<s.size;a+=512){for(let l=0,f=0;l<512;l+=f){if(f=bo.readSync(i,o,l,o.length-l,a+l),a===0&&o[0]===31&&o[1]===139)throw new Error("cannot append to compressed archives");if(!f)break e}let u=new Wde(o);if(!u.cksumValid)break;let c=512*Math.ceil(u.size/512);if(a+c+512>s.size)break;a+=c,e.mtimeCache&&e.mtimeCache.set(u.path,u.mtime)}n=!1,Aut(e,r,a,i,t)}finally{if(n)try{bo.closeSync(i)}catch(s){}}},Aut=(e,t,r,n,i)=>{let a=new Vde.WriteStreamSync(e.file,{fd:n,start:r});t.pipe(a),Dut(t,i)},Sut=(e,t,r)=>{t=Array.from(t);let n=new Hde(e),i=(s,o,u)=>{let c=(h,g)=>{h?bo.close(s,v=>u(h)):u(null,g)},l=0;if(o===0)return c(null,0);let f=0,d=Gde.alloc(512),p=(h,g)=>{if(h)return c(h);if(f+=g,f<512&&g)return bo.read(s,d,f,d.length-f,l+f,p);if(l===0&&d[0]===31&&d[1]===139)return c(new Error("cannot append to compressed archives"));if(f<512)return c(null,l);let v=new Wde(d);if(!v.cksumValid)return c(null,l);let b=512*Math.ceil(v.size/512);if(l+b+512>o||(l+=b+512,l>=o))return c(null,l);e.mtimeCache&&e.mtimeCache.set(v.path,v.mtime),f=0,bo.read(s,d,0,512,l,p)};bo.read(s,d,0,512,l,p)},a=new Promise((s,o)=>{n.on("error",o);let u="r+",c=(l,f)=>{if(l&&l.code==="ENOENT"&&u==="r+")return u="w+",bo.open(e.file,u,c);if(l)return o(l);bo.fstat(f,(d,p)=>{if(d)return bo.close(f,()=>o(d));i(f,p.size,(h,g)=>{if(h)return o(h);let v=new Vde.WriteStream(e.file,{fd:f,start:g});n.pipe(v),v.on("error",o),v.on("close",s),Yde(n,t)})})};bo.open(e.file,u,c)});return r?a.then(r,r):a},Dut=(e,t)=>{t.forEach(r=>{r.charAt(0)==="@"?Kde({file:Jde.resolve(e.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:n=>e.add(n)}):e.add(r)}),e.end()},Yde=(e,t)=>{for(;t.length;){let r=t.shift();if(r.charAt(0)==="@")return Kde({file:Jde.resolve(e.cwd,r.substr(1)),noResume:!0,onentry:n=>e.add(n)}).then(n=>Yde(e,t));e.add(r)}e.end()}});var Xde=y((onr,Qde)=>{"use strict";var kut=E0(),Tut=U6(),snr=Qde.exports=(e,t,r)=>{let n=kut(e);if(!n.file)throw new TypeError("file is required");if(n.gzip)throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");return t=Array.from(t),Rut(n),Tut(n,t,r)},Rut=e=>{let t=e.filter;e.mtimeCache||(e.mtimeCache=new Map),e.filter=t?(r,n)=>t(r,n)&&!(e.mtimeCache.get(r)>n.mtime):(r,n)=>!(e.mtimeCache.get(r)>n.mtime)}});var rpe=y((unr,Zde)=>{var X1=require("path"),epe=require("fs"),tpe=parseInt("0777",8);Zde.exports=q0.mkdirp=q0.mkdirP=q0;function q0(e,t,r,n){typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t});var i=t.mode,a=t.fs||epe;i===void 0&&(i=tpe),n||(n=null);var s=r||function(){};e=X1.resolve(e),a.mkdir(e,i,function(o){if(!o)return n=n||e,s(null,n);switch(o.code){case"ENOENT":if(X1.dirname(e)===e)return s(o);q0(X1.dirname(e),t,function(u,c){u?s(u,c):q0(e,t,s,c)});break;default:a.stat(e,function(u,c){u||!c.isDirectory()?s(o,n):s(null,n)});break}})}q0.sync=function e(t,r,n){(!r||typeof r!="object")&&(r={mode:r});var i=r.mode,a=r.fs||epe;i===void 0&&(i=tpe),n||(n=null),t=X1.resolve(t);try{a.mkdirSync(t,i),n=n||t}catch(o){switch(o.code){case"ENOENT":n=e(X1.dirname(t),r,n),e(t,r,n);break;default:var s;try{s=a.statSync(t)}catch(u){throw o}if(!s.isDirectory())throw o;break}}return n}});var cpe=y((cnr,npe)=>{"use strict";var Qo=require("fs"),Pm=require("path"),Put=Qo.lchown?"lchown":"chown",Fut=Qo.lchownSync?"lchownSync":"chownSync",ipe=Qo.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),ape=(e,t,r)=>{try{return Qo[Fut](e,t,r)}catch(n){if(n.code!=="ENOENT")throw n}},Iut=(e,t,r)=>{try{return Qo.chownSync(e,t,r)}catch(n){if(n.code!=="ENOENT")throw n}},Out=ipe?(e,t,r,n)=>i=>{!i||i.code!=="EISDIR"?n(i):Qo.chown(e,t,r,n)}:(e,t,r,n)=>n,z6=ipe?(e,t,r)=>{try{return ape(e,t,r)}catch(n){if(n.code!=="EISDIR")throw n;Iut(e,t,r)}}:(e,t,r)=>ape(e,t,r),jut=process.version,spe=(e,t,r)=>Qo.readdir(e,t,r),qut=(e,t)=>Qo.readdirSync(e,t);/^v4\./.test(jut)&&(spe=(e,t,r)=>Qo.readdir(e,r));var AD=(e,t,r,n)=>{Qo[Put](e,t,r,Out(e,t,r,i=>{n(i&&i.code!=="ENOENT"?i:null)}))},ope=(e,t,r,n,i)=>{if(typeof t=="string")return Qo.lstat(Pm.resolve(e,t),(a,s)=>{if(a)return i(a.code!=="ENOENT"?a:null);s.name=t,ope(e,s,r,n,i)});if(t.isDirectory())$6(Pm.resolve(e,t.name),r,n,a=>{if(a)return i(a);let s=Pm.resolve(e,t.name);AD(s,r,n,i)});else{let a=Pm.resolve(e,t.name);AD(a,r,n,i)}},$6=(e,t,r,n)=>{spe(e,{withFileTypes:!0},(i,a)=>{if(i){if(i.code==="ENOENT")return n();if(i.code!=="ENOTDIR"&&i.code!=="ENOTSUP")return n(i)}if(i||!a.length)return AD(e,t,r,n);let s=a.length,o=null,u=c=>{if(!o){if(c)return n(o=c);if(--s==0)return AD(e,t,r,n)}};a.forEach(c=>ope(e,c,t,r,u))})},Lut=(e,t,r,n)=>{if(typeof t=="string")try{let i=Qo.lstatSync(Pm.resolve(e,t));i.name=t,t=i}catch(i){if(i.code==="ENOENT")return;throw i}t.isDirectory()&&upe(Pm.resolve(e,t.name),r,n),z6(Pm.resolve(e,t.name),r,n)},upe=(e,t,r)=>{let n;try{n=qut(e,{withFileTypes:!0})}catch(i){if(i.code==="ENOENT")return;if(i.code==="ENOTDIR"||i.code==="ENOTSUP")return z6(e,t,r);throw i}return n&&n.length&&n.forEach(i=>Lut(e,i,t,r)),z6(e,t,r)};npe.exports=$6;$6.sync=upe});var ppe=y((lnr,G6)=>{"use strict";var lpe=rpe(),Xo=require("fs"),DD=require("path"),fpe=cpe(),Mu=_m(),H6=class extends Error{constructor(t,r){super("Cannot extract through symbolic link");this.path=r,this.symlink=t}get name(){return"SylinkError"}},V6=class extends Error{constructor(t,r){super(r+": Cannot cd into '"+t+"'");this.path=t,this.code=r}get name(){return"CwdError"}},kD=(e,t)=>e.get(Mu(t)),Z1=(e,t,r)=>e.set(Mu(t),r),Nut=(e,t)=>{Xo.stat(e,(r,n)=>{(r||!n.isDirectory())&&(r=new V6(e,r&&r.code||"ENOTDIR")),t(r)})};G6.exports=(e,t,r)=>{e=Mu(e);let n=t.umask,i=t.mode|448,a=(i&n)!=0,s=t.uid,o=t.gid,u=typeof s=="number"&&typeof o=="number"&&(s!==t.processUid||o!==t.processGid),c=t.preserve,l=t.unlink,f=t.cache,d=Mu(t.cwd),p=(v,b)=>{v?r(v):(Z1(f,e,!0),b&&u?fpe(b,s,o,E=>p(E)):a?Xo.chmod(e,i,r):r())};if(f&&kD(f,e)===!0)return p();if(e===d)return Nut(e,p);if(c)return lpe(e,i,p);let g=Mu(DD.relative(d,e)).split("/");TD(d,g,i,f,l,d,null,p)};var TD=(e,t,r,n,i,a,s,o)=>{if(!t.length)return o(null,s);let u=t.shift(),c=Mu(DD.resolve(e+"/"+u));if(kD(n,c))return TD(c,t,r,n,i,a,s,o);Xo.mkdir(c,r,dpe(c,t,r,n,i,a,s,o))},dpe=(e,t,r,n,i,a,s,o)=>u=>{u?Xo.lstat(e,(c,l)=>{if(c)c.path=c.path&&Mu(c.path),o(c);else if(l.isDirectory())TD(e,t,r,n,i,a,s,o);else if(i)Xo.unlink(e,f=>{if(f)return o(f);Xo.mkdir(e,r,dpe(e,t,r,n,i,a,s,o))});else{if(l.isSymbolicLink())return o(new H6(e,e+"/"+t.join("/")));o(u)}}):(s=s||e,TD(e,t,r,n,i,a,s,o))},But=e=>{let t=!1,r="ENOTDIR";try{t=Xo.statSync(e).isDirectory()}catch(n){r=n.code}finally{if(!t)throw new V6(e,r)}};G6.exports.sync=(e,t)=>{e=Mu(e);let r=t.umask,n=t.mode|448,i=(n&r)!=0,a=t.uid,s=t.gid,o=typeof a=="number"&&typeof s=="number"&&(a!==t.processUid||s!==t.processGid),u=t.preserve,c=t.unlink,l=t.cache,f=Mu(t.cwd),d=v=>{Z1(l,e,!0),v&&o&&fpe.sync(v,a,s),i&&Xo.chmodSync(e,n)};if(l&&kD(l,e)===!0)return d();if(e===f)return But(f),d();if(u)return d(lpe.sync(e,n));let h=Mu(DD.relative(f,e)).split("/"),g=null;for(let v=h.shift(),b=f;v&&(b+="/"+v);v=h.shift())if(b=Mu(DD.resolve(b)),!kD(l,b))try{Xo.mkdirSync(b,n),g=g||b,Z1(l,b,!0)}catch(E){let _=Xo.lstatSync(b);if(_.isDirectory()){Z1(l,b,!0);continue}else if(c){Xo.unlinkSync(b),Xo.mkdirSync(b,n),g=g||b,Z1(l,b,!0);continue}else if(_.isSymbolicLink())return new H6(b,b+"/"+h.join("/"))}return d(g)}});var ype=y((fnr,hpe)=>{var mpe=require("assert"),gpe=_m(),Mut=A0(),{join:vpe}=require("path"),Uut=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,zut=Uut==="win32";hpe.exports=()=>{let e=new Map,t=new Map,r=c=>c.split("/").slice(0,-1).reduce((f,d)=>(f.length&&(d=gpe(vpe(f[f.length-1],d))),f.push(d||"/"),f),[]),n=new Set,i=c=>{let l=t.get(c);if(!l)throw new Error("function does not have any path reservations");return{paths:l.paths.map(f=>e.get(f)),dirs:[...l.dirs].map(f=>e.get(f))}},a=c=>{let{paths:l,dirs:f}=i(c);return l.every(d=>d[0]===c)&&f.every(d=>d[0]instanceof Set&&d[0].has(c))},s=c=>n.has(c)||!a(c)?!1:(n.add(c),c(()=>o(c)),!0),o=c=>{if(!n.has(c))return!1;let{paths:l,dirs:f}=t.get(c),d=new Set;return l.forEach(p=>{let h=e.get(p);mpe.equal(h[0],c),h.length===1?e.delete(p):(h.shift(),typeof h[0]=="function"?d.add(h[0]):h[0].forEach(g=>d.add(g)))}),f.forEach(p=>{let h=e.get(p);mpe(h[0]instanceof Set),h[0].size===1&&h.length===1?e.delete(p):h[0].size===1?(h.shift(),d.add(h[0])):h[0].delete(c)}),n.delete(c),d.forEach(p=>s(p)),!0};return{check:a,reserve:(c,l)=>{c=zut?["win32 parallelization disabled"]:c.map(d=>Mut(gpe(vpe(d))).normalize("NFKD").toLowerCase());let f=new Set(c.map(d=>r(d)).reduce((d,p)=>d.concat(p)));return t.set(l,{dirs:f,paths:c}),c.forEach(d=>{let p=e.get(d);p?p.push(l):e.set(d,[l])}),f.forEach(d=>{let p=e.get(d);p?p[p.length-1]instanceof Set?p[p.length-1].add(l):p.push(new Set([l])):e.set(d,[new Set([l])])}),s(l)}}}});var tB=y((mnr,bpe)=>{"use strict";var $ut=require("assert"),dnr=require("events").EventEmitter,Gut=Q1(),wn=require("fs"),Hut=I0(),Ff=require("path"),K6=ppe(),pnr=K6.sync,wpe=a6(),Vut=s6(),Kut=ype(),wo=_m(),Jut=A0(),Epe=Symbol("onEntry"),J6=Symbol("checkFs"),_pe=Symbol("checkFs2"),RD=Symbol("pruneCache"),W6=Symbol("isReusable"),Zo=Symbol("makeFs"),Y6=Symbol("file"),Q6=Symbol("directory"),PD=Symbol("link"),xpe=Symbol("symlink"),Cpe=Symbol("hardlink"),Spe=Symbol("unsupported"),hnr=Symbol("unknown"),Ape=Symbol("checkPath"),wp=Symbol("mkdir"),os=Symbol("onError"),FD=Symbol("pending"),Dpe=Symbol("pend"),L0=Symbol("unpend"),X6=Symbol("ended"),Z6=Symbol("maybeClose"),eB=Symbol("skip"),eE=Symbol("doChown"),tE=Symbol("uid"),rE=Symbol("gid"),nE=Symbol("checkedCwd"),kpe=require("crypto"),Wut=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,N0=Wut==="win32",Yut=(e,t)=>{if(!N0)return wn.unlink(e,t);let r=e+".DELETE."+kpe.randomBytes(16).toString("hex");wn.rename(e,r,n=>{if(n)return t(n);wn.unlink(r,t)})},Qut=e=>{if(!N0)return wn.unlinkSync(e);let t=e+".DELETE."+kpe.randomBytes(16).toString("hex");wn.renameSync(e,t),wn.unlinkSync(t)},Tpe=(e,t,r)=>e===e>>>0?e:t===t>>>0?t:r,Rpe=e=>Jut(wo(e)).normalize("NFKD").toLowerCase(),Xut=(e,t)=>{t=Rpe(t);for(let r of e.keys()){let n=Rpe(r);(n===t||n.indexOf(t+"/")===0)&&e.delete(r)}},Zut=e=>{for(let t of e.keys())e.delete(t)},ID=class extends Gut{constructor(t){if(t||(t={}),t.ondone=r=>{this[X6]=!0,this[Z6]()},super(t),this[nE]=!1,this.reservations=Kut(),this.transform=typeof t.transform=="function"?t.transform:null,this.writable=!0,this.readable=!1,this[FD]=0,this[X6]=!1,this.dirCache=t.dirCache||new Map,typeof t.uid=="number"||typeof t.gid=="number"){if(typeof t.uid!="number"||typeof t.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(t.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=t.uid,this.gid=t.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;t.preserveOwner===void 0&&typeof t.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!t.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=t.forceChown===!0,this.win32=!!t.win32||N0,this.newer=!!t.newer,this.keep=!!t.keep,this.noMtime=!!t.noMtime,this.preservePaths=!!t.preservePaths,this.unlink=!!t.unlink,this.cwd=wo(Ff.resolve(t.cwd||process.cwd())),this.strip=+t.strip||0,this.processUmask=process.umask(),this.umask=typeof t.umask=="number"?t.umask:this.processUmask,this.dmode=t.dmode||511&~this.umask,this.fmode=t.fmode||438&~this.umask,this.on("entry",r=>this[Epe](r))}[Z6](){this[X6]&&this[FD]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close"))}[Ape](t){if(this.strip){let r=wo(t.path).split("/");if(r.length<this.strip)return!1;if(t.path=r.slice(this.strip).join("/"),t.type==="Link"){let n=wo(t.linkpath).split("/");if(n.length>=this.strip)t.linkpath=n.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let r=wo(t.path),n=r.split("/");if(n.includes("..")||N0&&/^[a-z]:\.\.$/i.test(n[0]))return this.warn("path contains '..'",r),!1;let i=Vut(r);i[0]&&(t.path=i[1],this.warn(`stripping ${i[0]} from absolute path`,r))}if(Ff.isAbsolute(t.path)?t.absolute=wo(Ff.resolve(t.path)):t.absolute=wo(Ff.resolve(this.cwd,t.path)),!this.preservePaths&&t.absolute.indexOf(this.cwd+"/")!==0&&t.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:t,path:wo(t.path),resolvedPath:t.absolute,cwd:this.cwd}),!1;if(t.absolute===this.cwd&&t.type!=="Directory"&&t.type!=="GNUDumpDir")return!1;if(this.win32){let{root:r}=Ff.win32.parse(t.absolute);t.absolute=r+wpe.encode(t.absolute.substr(r.length));let{root:n}=Ff.win32.parse(t.path);t.path=n+wpe.encode(t.path.substr(n.length))}return!0}[Epe](t){if(!this[Ape](t))return t.resume();switch($ut.equal(typeof t.absolute,"string"),t.type){case"Directory":case"GNUDumpDir":t.mode&&(t.mode=t.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[J6](t);case"CharacterDevice":case"BlockDevice":case"FIFO":return this[Spe](t)}}[os](t,r){t.name==="CwdError"?this.emit("error",t):(this.warn(t.message,t),this[L0](),r.resume())}[wp](t,r,n){K6(wo(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r},n)}[eE](t){return this.forceChown||this.preserveOwner&&(typeof t.uid=="number"&&t.uid!==this.processUid||typeof t.gid=="number"&&t.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[tE](t){return Tpe(this.uid,t.uid,this.processUid)}[rE](t){return Tpe(this.gid,t.gid,this.processGid)}[Y6](t,r){let n=t.mode&4095||this.fmode,i=new Hut.WriteStream(t.absolute,{mode:n,autoClose:!1});i.on("error",u=>{i.fd&&wn.close(i.fd,()=>{}),i.write=()=>!0,this[os](u,t),r()});let a=1,s=u=>{if(u){i.fd&&wn.close(i.fd,()=>{}),this[os](u,t),r();return}--a==0&&wn.close(i.fd,c=>{r(),c?this[os](c,t):this[L0]()})};i.on("finish",u=>{let c=t.absolute,l=i.fd;if(t.mtime&&!this.noMtime){a++;let f=t.atime||new Date,d=t.mtime;wn.futimes(l,f,d,p=>p?wn.utimes(c,f,d,h=>s(h&&p)):s())}if(this[eE](t)){a++;let f=this[tE](t),d=this[rE](t);wn.fchown(l,f,d,p=>p?wn.chown(c,f,d,h=>s(h&&p)):s())}s()});let o=this.transform&&this.transform(t)||t;o!==t&&(o.on("error",u=>this[os](u,t)),t.pipe(o)),o.pipe(i)}[Q6](t,r){let n=t.mode&4095||this.dmode;this[wp](t.absolute,n,i=>{if(i)return r(),this[os](i,t);let a=1,s=o=>{--a==0&&(r(),this[L0](),t.resume())};t.mtime&&!this.noMtime&&(a++,wn.utimes(t.absolute,t.atime||new Date,t.mtime,s)),this[eE](t)&&(a++,wn.chown(t.absolute,this[tE](t),this[rE](t),s)),s()})}[Spe](t){this.warn("unsupported entry type: "+t.type,t),t.resume()}[xpe](t,r){this[PD](t,t.linkpath,"symlink",r)}[Cpe](t,r){let n=wo(Ff.resolve(this.cwd,t.linkpath));this[PD](t,n,"link",r)}[Dpe](){this[FD]++}[L0](){this[FD]--,this[Z6]()}[eB](t){this[L0](),t.resume()}[W6](t,r){return t.type==="File"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!N0}[J6](t){this[Dpe]();let r=[t.path];t.linkpath&&r.push(t.linkpath),this.reservations.reserve(r,n=>this[_pe](t,n))}[RD](t){N0&&t.type==="SymbolicLink"?Zut(this.dirCache):t.type!=="Directory"&&Xut(this.dirCache,t.absolute)}[_pe](t,r){this[RD](t);let n=o=>{this[RD](t),r(o)},i=()=>{this[wp](this.cwd,this.dmode,o=>{if(o){this[os](o,t),n();return}this[nE]=!0,a()})},a=()=>{if(t.absolute!==this.cwd){let o=wo(Ff.dirname(t.absolute));if(o!==this.cwd)return this[wp](o,this.dmode,u=>{if(u){this[os](u,t),n();return}s()})}s()},s=()=>{wn.lstat(t.absolute,(o,u)=>{if(u&&(this.keep||this.newer&&u.mtime>t.mtime)){this[eB](t),n();return}if(o||this[W6](t,u))return this[Zo](null,t,n);if(u.isDirectory()){if(t.type==="Directory"){let c=!this.noChmod&&t.mode&&(u.mode&4095)!==t.mode,l=f=>this[Zo](f,t,n);return c?wn.chmod(t.absolute,t.mode,l):l()}if(t.absolute!==this.cwd)return wn.rmdir(t.absolute,c=>this[Zo](c,t,n))}if(t.absolute===this.cwd)return this[Zo](null,t,n);Yut(t.absolute,c=>this[Zo](c,t,n))})};this[nE]?a():i()}[Zo](t,r,n){if(t)return this[os](t,r);switch(r.type){case"File":case"OldFile":case"ContiguousFile":return this[Y6](r,n);case"Link":return this[Cpe](r,n);case"SymbolicLink":return this[xpe](r,n);case"Directory":case"GNUDumpDir":return this[Q6](r,n)}}[PD](t,r,n,i){wn[n](r,t.absolute,a=>{if(a)return this[os](a,t);i(),this[L0](),t.resume()})}},OD=e=>{try{return[null,e()]}catch(t){return[t,null]}},Ppe=class extends ID{[Zo](t,r){return super[Zo](t,r,()=>{})}[J6](t){if(this[RD](t),!this[nE]){let a=this[wp](this.cwd,this.dmode);if(a)return this[os](a,t);this[nE]=!0}if(t.absolute!==this.cwd){let a=wo(Ff.dirname(t.absolute));if(a!==this.cwd){let s=this[wp](a,this.dmode);if(s)return this[os](s,t)}}let[r,n]=OD(()=>wn.lstatSync(t.absolute));if(n&&(this.keep||this.newer&&n.mtime>t.mtime))return this[eB](t);if(r||this[W6](t,n))return this[Zo](null,t);if(n.isDirectory()){if(t.type==="Directory"){let s=!this.noChmod&&t.mode&&(n.mode&4095)!==t.mode,[o]=s?OD(()=>{wn.chmodSync(t.absolute,t.mode)}):[];return this[Zo](o,t)}let[a]=OD(()=>wn.rmdirSync(t.absolute));this[Zo](a,t)}let[i]=t.absolute===this.cwd?[]:OD(()=>Qut(t.absolute));this[Zo](i,t)}[Y6](t,r){let n=t.mode&4095||this.fmode,i=u=>{let c;try{wn.closeSync(s)}catch(l){c=l}(u||c)&&this[os](u||c,t),r()},a,s;try{s=wn.openSync(t.absolute,"w",n)}catch(u){return i(u)}let o=this.transform&&this.transform(t)||t;o!==t&&(o.on("error",u=>this[os](u,t)),t.pipe(o)),o.on("data",u=>{try{wn.writeSync(s,u,0,u.length)}catch(c){i(c)}}),o.on("end",u=>{let c=null;if(t.mtime&&!this.noMtime){let l=t.atime||new Date,f=t.mtime;try{wn.futimesSync(s,l,f)}catch(d){try{wn.utimesSync(t.absolute,l,f)}catch(p){c=d}}}if(this[eE](t)){let l=this[tE](t),f=this[rE](t);try{wn.fchownSync(s,l,f)}catch(d){try{wn.chownSync(t.absolute,l,f)}catch(p){c=c||d}}}i(c)})}[Q6](t,r){let n=t.mode&4095||this.dmode,i=this[wp](t.absolute,n);if(i){this[os](i,t),r();return}if(t.mtime&&!this.noMtime)try{wn.utimesSync(t.absolute,t.atime||new Date,t.mtime)}catch(a){}if(this[eE](t))try{wn.chownSync(t.absolute,this[tE](t),this[rE](t))}catch(a){}r(),t.resume()}[wp](t,r){try{return K6.sync(wo(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r})}catch(n){return n}}[PD](t,r,n,i){try{wn[n+"Sync"](r,t.absolute),i(),t.resume()}catch(a){return this[os](a,t)}}};ID.Sync=Ppe;bpe.exports=ID});var qpe=y((vnr,Fpe)=>{"use strict";var ect=E0(),jD=tB(),Ipe=require("fs"),Ope=I0(),jpe=require("path"),rB=A0(),gnr=Fpe.exports=(e,t,r)=>{typeof e=="function"?(r=e,t=null,e={}):Array.isArray(e)&&(t=e,e={}),typeof t=="function"&&(r=t,t=null),t?t=Array.from(t):t=[];let n=ect(e);if(n.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!n.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return t.length&&tct(n,t),n.file&&n.sync?rct(n):n.file?nct(n,r):n.sync?ict(n):act(n)},tct=(e,t)=>{let r=new Map(t.map(a=>[rB(a),!0])),n=e.filter,i=(a,s)=>{let o=s||jpe.parse(a).root||".",u=a===o?!1:r.has(a)?r.get(a):i(jpe.dirname(a),o);return r.set(a,u),u};e.filter=n?(a,s)=>n(a,s)&&i(rB(a)):a=>i(rB(a))},rct=e=>{let t=new jD.Sync(e),r=e.file,n=!0,i,a=Ipe.statSync(r),s=e.maxReadSize||16*1024*1024;new Ope.ReadStreamSync(r,{readSize:s,size:a.size}).pipe(t)},nct=(e,t)=>{let r=new jD(e),n=e.maxReadSize||16*1024*1024,i=e.file,a=new Promise((s,o)=>{r.on("error",o),r.on("close",s),Ipe.stat(i,(u,c)=>{if(u)o(u);else{let l=new Ope.ReadStream(i,{readSize:n,size:c.size});l.on("error",o),l.pipe(r)}})});return t?a.then(t,t):a},ict=e=>new jD.Sync(e),act=e=>new jD(e)});var Lpe=y(sa=>{"use strict";sa.c=sa.create=zde();sa.r=sa.replace=U6();sa.t=sa.list=CD();sa.u=sa.update=Xde();sa.x=sa.extract=qpe();sa.Pack=hD();sa.Unpack=tB();sa.Parse=Q1();sa.ReadEntry=H1();sa.WriteEntry=m6();sa.Header=S0();sa.Pax=ZA();sa.types=YA()});var Bpe=y((bnr,Npe)=>{"use strict";var nB=require("events").listenerCount;nB=nB||function(e,t){var r=e&&e._events&&e._events[t];return Array.isArray(r)?r.length:typeof r=="function"?1:0};Npe.exports=nB});var Upe=y((wnr,Mpe)=>{Mpe.exports=function(t){var r=process&&process.version?process.version:"v5.0.0",n=r.split(".")[0].replace("v","");return n<6?new Buffer(t):Buffer.from(t)}});var $pe=y(()=>{"use strict";var iE=Upe();Buffer.prototype.indexOf||(Buffer.prototype.indexOf=function(e,t){t=t||0,typeof e=="string"||e instanceof String?e=iE(e):(typeof e=="number"||e instanceof Number)&&(e=iE([e]));for(var r=e.length,n=t;n<=this.length-r;n++){for(var i=!1,a=0;a<r;a++)if(this[n+a]!=e[a]){i=!0;break}if(!i)return n}return-1});function zpe(e,t){typeof e=="string"||e instanceof String?e=iE(e):(typeof e=="number"||e instanceof Number)&&(e=iE([e]));var r=e.length;t=t||this.length-r;for(var n=t;n>=0;n--){for(var i=!1,a=0;a<r;a++)if(this[n+a]!=e[a]){i=!0;break}if(!i)return n}return-1}Buffer.prototype.lastIndexOf?iE("ABC").lastIndexOf("ABC")===-1&&(Buffer.prototype.lastIndexOf=zpe):Buffer.prototype.lastIndexOf=zpe});var Hpe=y(Gpe=>{(function(e,t){"use strict";if(e.setImmediate)return;var r=1,n={},i=!1,a=e.document,s;function o(E){typeof E!="function"&&(E=new Function(""+E));for(var _=new Array(arguments.length-1),S=0;S<_.length;S++)_[S]=arguments[S+1];var F={callback:E,args:_};return n[r]=F,s(r),r++}function u(E){delete n[E]}function c(E){var _=E.callback,S=E.args;switch(S.length){case 0:_();break;case 1:_(S[0]);break;case 2:_(S[0],S[1]);break;case 3:_(S[0],S[1],S[2]);break;default:_.apply(t,S);break}}function l(E){if(i)setTimeout(l,0,E);else{var _=n[E];if(_){i=!0;try{c(_)}finally{u(E),i=!1}}}}function f(){s=function(E){process.nextTick(function(){l(E)})}}function d(){if(e.postMessage&&!e.importScripts){var E=!0,_=e.onmessage;return e.onmessage=function(){E=!1},e.postMessage("","*"),e.onmessage=_,E}}function p(){var E="setImmediate$"+Math.random()+"$",_=function(S){S.source===e&&typeof S.data=="string"&&S.data.indexOf(E)===0&&l(+S.data.slice(E.length))};e.addEventListener?e.addEventListener("message",_,!1):e.attachEvent("onmessage",_),s=function(S){e.postMessage(E+S,"*")}}function h(){var E=new MessageChannel;E.port1.onmessage=function(_){var S=_.data;l(S)},s=function(_){E.port2.postMessage(_)}}function g(){var E=a.documentElement;s=function(_){var S=a.createElement("script");S.onreadystatechange=function(){l(_),S.onreadystatechange=null,E.removeChild(S),S=null},E.appendChild(S)}}function v(){s=function(E){setTimeout(l,0,E)}}var b=Object.getPrototypeOf&&Object.getPrototypeOf(e);b=b&&b.setTimeout?b:e,{}.toString.call(e.process)==="[object process]"?f():d()?p():e.MessageChannel?h():a&&"onreadystatechange"in a.createElement("script")?g():v(),b.setImmediate=o,b.clearImmediate=u})(typeof self=="undefined"?typeof global=="undefined"?Gpe:global:self)});var Wpe=y((Cnr,Vpe)=>{Vpe.exports=us;function us(e){if(!(this instanceof us))return new us(e);this.value=e}us.prototype.get=function(e){for(var t=this.value,r=0;r<e.length;r++){var n=e[r];if(!Object.hasOwnProperty.call(t,n)){t=void 0;break}t=t[n]}return t};us.prototype.set=function(e,t){for(var r=this.value,n=0;n<e.length-1;n++){var i=e[n];Object.hasOwnProperty.call(r,i)||(r[i]={}),r=r[i]}return r[e[n]]=t,t};us.prototype.map=function(e){return Kpe(this.value,e,!0)};us.prototype.forEach=function(e){return this.value=Kpe(this.value,e,!1),this.value};us.prototype.reduce=function(e,t){var r=arguments.length===1,n=r?this.value:t;return this.forEach(function(i){(!this.isRoot||!r)&&(n=e.call(this,n,i))}),n};us.prototype.deepEqual=function(e){if(arguments.length!==1)throw new Error("deepEqual requires exactly one object to compare against");var t=!0,r=e;return this.forEach(function(n){var i=function(){t=!1}.bind(this);if(!this.isRoot){if(typeof r!="object")return i();r=r[this.key]}var a=r;this.post(function(){r=a});var s=function(f){return Object.prototype.toString.call(f)};if(this.circular)us(e).get(this.circular.path)!==a&&i();else if(typeof a!=typeof n)i();else if(a===null||n===null||a===void 0||n===void 0)a!==n&&i();else if(a.__proto__!==n.__proto__)i();else if(a!==n){if(typeof a=="function")a instanceof RegExp?a.toString()!=n.toString()&&i():a!==n&&i();else if(typeof a=="object")if(s(n)==="[object Arguments]"||s(a)==="[object Arguments]")s(a)!==s(n)&&i();else if(a instanceof Date||n instanceof Date)(!(a instanceof Date)||!(n instanceof Date)||a.getTime()!==n.getTime())&&i();else{var o=Object.keys(a),u=Object.keys(n);if(o.length!==u.length)return i();for(var c=0;c<o.length;c++){var l=o[c];Object.hasOwnProperty.call(n,l)||i()}}}}),t};us.prototype.paths=function(){var e=[];return this.forEach(function(t){e.push(this.path)}),e};us.prototype.nodes=function(){var e=[];return this.forEach(function(t){e.push(this.node)}),e};us.prototype.clone=function(){var e=[],t=[];return function r(n){for(var i=0;i<e.length;i++)if(e[i]===n)return t[i];if(typeof n=="object"&&n!==null){var a=Jpe(n);return e.push(n),t.push(a),Object.keys(n).forEach(function(s){a[s]=r(n[s])}),e.pop(),t.pop(),a}else return n}(this.value)};function Kpe(e,t,r){var n=[],i=[],a=!0;return function s(o){var u=r?Jpe(o):o,c={},l={node:u,node_:o,path:[].concat(n),parent:i.slice(-1)[0],key:n.slice(-1)[0],isRoot:n.length===0,level:n.length,circular:null,update:function(h){l.isRoot||(l.parent.node[l.key]=h),l.node=h},delete:function(){delete l.parent.node[l.key]},remove:function(){Array.isArray(l.parent.node)?l.parent.node.splice(l.key,1):delete l.parent.node[l.key]},before:function(h){c.before=h},after:function(h){c.after=h},pre:function(h){c.pre=h},post:function(h){c.post=h},stop:function(){a=!1}};if(!a)return l;if(typeof u=="object"&&u!==null){l.isLeaf=Object.keys(u).length==0;for(var f=0;f<i.length;f++)if(i[f].node_===o){l.circular=i[f];break}}else l.isLeaf=!0;l.notLeaf=!l.isLeaf,l.notRoot=!l.isRoot;var d=t.call(l,l.node);if(d!==void 0&&l.update&&l.update(d),c.before&&c.before.call(l,l.node),typeof l.node=="object"&&l.node!==null&&!l.circular){i.push(l);var p=Object.keys(l.node);p.forEach(function(h,g){n.push(h),c.pre&&c.pre.call(l,l.node[h],h);var v=s(l.node[h]);r&&Object.hasOwnProperty.call(l.node,h)&&(l.node[h]=v.node),v.isLast=g==p.length-1,v.isFirst=g==0,c.post&&c.post.call(l,v),n.pop()}),i.pop()}return c.after&&c.after.call(l,l.node),l}(e).node}Object.keys(us.prototype).forEach(function(e){us[e]=function(t){var r=[].slice.call(arguments,1),n=us(t);return n[e].apply(n,r)}});function Jpe(e){if(typeof e=="object"&&e!==null){var t;return Array.isArray(e)?t=[]:e instanceof Date?t=new Date(e):e instanceof Boolean?t=new Boolean(e):e instanceof Number?t=new Number(e):e instanceof String?t=new String(e):t=Object.create(Object.getPrototypeOf(e)),Object.keys(e).forEach(function(r){t[r]=e[r]}),t}else return e}});var Qpe=y((Snr,Ype)=>{var sct=Wpe(),oct=require("events").EventEmitter;Ype.exports=B0;function B0(e){var t=B0.saw(e,{}),r=e.call(t.handlers,t);return r!==void 0&&(t.handlers=r),t.record(),t.chain()}B0.light=function(t){var r=B0.saw(t,{}),n=t.call(r.handlers,r);return n!==void 0&&(r.handlers=n),r.chain()};B0.saw=function(e,t){var r=new oct;return r.handlers=t,r.actions=[],r.chain=function(){var n=sct(r.handlers).map(function(i){if(this.isRoot)return i;var a=this.path;typeof i=="function"&&this.update(function(){return r.actions.push({path:a,args:[].slice.call(arguments)}),n})});return process.nextTick(function(){r.emit("begin"),r.next()}),n},r.pop=function(){return r.actions.shift()},r.next=function(){var n=r.pop();if(!n)r.emit("end");else if(!n.trap){var i=r.handlers;n.path.forEach(function(a){i=i[a]}),i.apply(r.handlers,n.args)}},r.nest=function(n){var i=[].slice.call(arguments,1),a=!0;if(typeof n=="boolean"){var a=n;n=i.shift()}var s=B0.saw(e,{}),o=e.call(s.handlers,s);o!==void 0&&(s.handlers=o),typeof r.step!="undefined"&&s.record(),n.apply(s.chain(),i),a!==!1&&s.on("end",r.next)},r.record=function(){uct(r)},["trap","down","jump"].forEach(function(n){r[n]=function(){throw new Error("To use the trap, down and jump features, please call record() first to start recording actions.")}}),r};function uct(e){e.step=0,e.pop=function(){return e.actions[e.step++]},e.trap=function(t,r){var n=Array.isArray(t)?t:[t];e.actions.push({path:n,step:e.step,cb:r,trap:!0})},e.down=function(t){var r=(Array.isArray(t)?t:[t]).join("/"),n=e.actions.slice(e.step).map(function(a){return a.trap&&a.step<=e.step?!1:a.path.join("/")==r}).indexOf(!0);n>=0?e.step+=n:e.step=e.actions.length;var i=e.actions[e.step-1];i&&i.trap?(e.step=i.step,i.cb()):e.next()},e.jump=function(t){e.step=t,e.next()}}});var Zpe=y((Anr,Xpe)=>{Xpe.exports=As;function As(e){if(!(this instanceof As))return new As(e);this.buffers=e||[],this.length=this.buffers.reduce(function(t,r){return t+r.length},0)}As.prototype.push=function(){for(var e=0;e<arguments.length;e++)if(!Buffer.isBuffer(arguments[e]))throw new TypeError("Tried to push a non-buffer");for(var e=0;e<arguments.length;e++){var t=arguments[e];this.buffers.push(t),this.length+=t.length}return this.length};As.prototype.unshift=function(){for(var e=0;e<arguments.length;e++)if(!Buffer.isBuffer(arguments[e]))throw new TypeError("Tried to unshift a non-buffer");for(var e=0;e<arguments.length;e++){var t=arguments[e];this.buffers.unshift(t),this.length+=t.length}return this.length};As.prototype.copy=function(e,t,r,n){return this.slice(r,n).copy(e,t,0,n-r)};As.prototype.splice=function(e,t){var r=this.buffers,n=e>=0?e:this.length-e,i=[].slice.call(arguments,2);t===void 0?t=this.length-n:t>this.length-n&&(t=this.length-n);for(var e=0;e<i.length;e++)this.length+=i[e].length;for(var a=new As,s=0,o=0,u=0;u<r.length&&o+r[u].length<n;u++)o+=r[u].length;if(n-o>0){var c=n-o;if(c+t<r[u].length){a.push(r[u].slice(c,c+t));for(var l=r[u],f=new Buffer(c),e=0;e<c;e++)f[e]=l[e];for(var d=new Buffer(l.length-c-t),e=c+t;e<l.length;e++)d[e-t-c]=l[e];if(i.length>0){var p=i.slice();p.unshift(f),p.push(d),r.splice.apply(r,[u,1].concat(p)),u+=p.length,i=[]}else r.splice(u,1,f,d),u+=2}else a.push(r[u].slice(c)),r[u]=r[u].slice(0,c),u++}for(i.length>0&&(r.splice.apply(r,[u,0].concat(i)),u+=i.length);a.length<t;){var h=r[u],g=h.length,v=Math.min(g,t-a.length);v===g?(a.push(h),r.splice(u,1)):(a.push(h.slice(0,v)),r[u]=r[u].slice(v))}return this.length-=a.length,a};As.prototype.slice=function(e,t){var r=this.buffers;t===void 0&&(t=this.length),e===void 0&&(e=0),t>this.length&&(t=this.length);for(var n=0,i=0;i<r.length&&n+r[i].length<=e;i++)n+=r[i].length;for(var a=new Buffer(t-e),s=0,o=i;s<t-e&&o<r.length;o++){var u=r[o].length,c=s===0?e-n:0,l=s+u>=t-e?Math.min(c+(t-e)-s,u):u;r[o].copy(a,s,c,l),s+=l-c}return a};As.prototype.pos=function(e){if(e<0||e>=this.length)throw new Error("oob");for(var t=e,r=0,n=null;;){if(n=this.buffers[r],t<n.length)return{buf:r,offset:t};t-=n.length,r++}};As.prototype.get=function(t){var r=this.pos(t);return this.buffers[r.buf].get(r.offset)};As.prototype.set=function(t,r){var n=this.pos(t);return this.buffers[n.buf].set(n.offset,r)};As.prototype.indexOf=function(e,t){if(typeof e=="string")e=new Buffer(e);else if(!(e instanceof Buffer))throw new Error("Invalid type for a search string");if(!e.length)return 0;if(!this.length)return-1;var r=0,n=0,i=0,a,s=0;if(t){var o=this.pos(t);r=o.buf,n=o.offset,s=t}for(;;){for(;n>=this.buffers[r].length;)if(n=0,r++,r>=this.buffers.length)return-1;var u=this.buffers[r][n];if(u==e[i]){if(i==0&&(a={i:r,j:n,pos:s}),i++,i==e.length)return a.pos}else i!=0&&(r=a.i,n=a.j,s=a.pos,i=0);n++,s++}};As.prototype.toBuffer=function(){return this.slice()};As.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)}});var the=y((Dnr,ehe)=>{ehe.exports=function(e){function t(n,i){var a=r.store,s=n.split(".");s.slice(0,-1).forEach(function(u){a[u]===void 0&&(a[u]={}),a=a[u]});var o=s[s.length-1];return arguments.length==1?a[o]:a[o]=i}var r={get:function(n){return t(n)},set:function(n,i){return t(n,i)},store:e||{}};return r}});var aE=y((Fm,rhe)=>{var cct=Qpe(),nhe=require("events").EventEmitter,lct=Zpe(),qD=the(),fct=require("stream").Stream;Fm=rhe.exports=function(e,t){if(Buffer.isBuffer(e))return Fm.parse(e);var r=Fm.stream();return e&&e.pipe?e.pipe(r):e&&(e.on(t||"data",function(n){r.write(n)}),e.on("end",function(){r.end()})),r};Fm.stream=function(e){if(e)return Fm.apply(null,arguments);var t=null;function r(f,d,p){t={bytes:f,skip:p,cb:function(h){t=null,d(h)}},i()}var n=null;function i(){if(!t){l&&(c=!0);return}if(typeof t=="function")t();else{var f=n+t.bytes;if(o.length>=f){var d;n==null?(d=o.splice(0,f),t.skip||(d=d.slice())):(t.skip||(d=o.slice(n,f)),n=f),t.skip?t.cb():t.cb(d)}}}function a(f){function d(){c||f.next()}var p=ihe(function(h,g){return function(v){r(h,function(b){u.set(v,g(b)),d()})}});return p.tap=function(h){f.nest(h,u.store)},p.into=function(h,g){u.get(h)||u.set(h,{});var v=u;u=qD(v.get(h)),f.nest(function(){g.apply(this,arguments),this.tap(function(){u=v})},u.store)},p.flush=function(){u.store={},d()},p.loop=function(h){var g=!1;f.nest(!1,function v(){this.vars=u.store,h.call(this,function(){g=!0,d()},u.store),this.tap(function(){g?f.next():v.call(this)}.bind(this))},u.store)},p.buffer=function(h,g){typeof g=="string"&&(g=u.get(g)),r(g,function(v){u.set(h,v),d()})},p.skip=function(h){typeof h=="string"&&(h=u.get(h)),r(h,function(){d()})},p.scan=function(g,v){if(typeof v=="string")v=new Buffer(v);else if(!Buffer.isBuffer(v))throw new Error("search must be a Buffer or a string");var b=0;t=function(){var E=o.indexOf(v,n+b),_=E-n-b;E!==-1?(t=null,n!=null?(u.set(g,o.slice(n,n+b+_)),n+=b+_+v.length):(u.set(g,o.slice(0,b+_)),o.splice(0,b+_+v.length)),d(),i()):_=Math.max(o.length-v.length-n-b,0),b+=_},i()},p.peek=function(h){n=0,f.nest(function(){h.call(this,u.store),this.tap(function(){n=null})})},p}var s=cct.light(a);s.writable=!0;var o=lct();s.write=function(f){o.push(f),i()};var u=qD(),c=!1,l=!1;return s.end=function(){l=!0},s.pipe=fct.prototype.pipe,Object.getOwnPropertyNames(nhe.prototype).forEach(function(f){s[f]=nhe.prototype[f]}),s};Fm.parse=function(t){var r=ihe(function(a,s){return function(o){if(n+a<=t.length){var u=t.slice(n,n+a);n+=a,i.set(o,s(u))}else i.set(o,null);return r}}),n=0,i=qD();return r.vars=i.store,r.tap=function(a){return a.call(r,i.store),r},r.into=function(a,s){i.get(a)||i.set(a,{});var o=i;return i=qD(o.get(a)),s.call(r,i.store),i=o,r},r.loop=function(a){for(var s=!1,o=function(){s=!0};s===!1;)a.call(r,o,i.store);return r},r.buffer=function(a,s){typeof s=="string"&&(s=i.get(s));var o=t.slice(n,Math.min(t.length,n+s));return n+=s,i.set(a,o),r},r.skip=function(a){return typeof a=="string"&&(a=i.get(a)),n+=a,r},r.scan=function(a,s){if(typeof s=="string")s=new Buffer(s);else if(!Buffer.isBuffer(s))throw new Error("search must be a Buffer or a string");i.set(a,null);for(var o=0;o+n<=t.length-s.length+1;o++){for(var u=0;u<s.length&&t[n+o+u]===s[u];u++);if(u===s.length)break}return i.set(a,t.slice(n,n+o)),n+=o+s.length,r},r.peek=function(a){var s=n;return a.call(r,i.store),n=s,r},r.flush=function(){return i.store={},r},r.eof=function(){return n>=t.length},r};function ahe(e){for(var t=0,r=0;r<e.length;r++)t+=Math.pow(256,r)*e[r];return t}function she(e){for(var t=0,r=0;r<e.length;r++)t+=Math.pow(256,e.length-r-1)*e[r];return t}function dct(e){var t=she(e);return(e[0]&128)==128&&(t-=Math.pow(256,e.length)),t}function pct(e){var t=ahe(e);return(e[e.length-1]&128)==128&&(t-=Math.pow(256,e.length)),t}function ihe(e){var t={};return[1,2,4,8].forEach(function(r){var n=r*8;t["word"+n+"le"]=t["word"+n+"lu"]=e(r,ahe),t["word"+n+"ls"]=e(r,pct),t["word"+n+"be"]=t["word"+n+"bu"]=e(r,she),t["word"+n+"bs"]=e(r,dct)}),t.word8=t.word8u=t.word8be,t.word8s=t.word8bs,t}});var Im=y((knr,iB)=>{var aB=function(){"use strict";return this===void 0}();aB?iB.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:aB,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!!(!r||r.writable||r.set)}}:(ohe={}.hasOwnProperty,uhe={}.toString,che={}.constructor.prototype,sB=function(e){var t=[];for(var r in e)ohe.call(e,r)&&t.push(r);return t},lhe=function(e,t){return{value:e[t]}},fhe=function(e,t,r){return e[t]=r.value,e},dhe=function(e){return e},phe=function(e){try{return Object(e).constructor.prototype}catch(t){return che}},hhe=function(e){try{return uhe.call(e)==="[object Array]"}catch(t){return!1}},iB.exports={isArray:hhe,keys:sB,names:sB,defineProperty:fhe,getDescriptor:lhe,freeze:dhe,getPrototypeOf:phe,isES5:aB,propertyIsWritable:function(){return!0}});var ohe,uhe,che,sB,lhe,fhe,dhe,phe,hhe});var zn=y((exports,module)=>{"use strict";var es5=Im(),canEvaluate=typeof navigator=="undefined",errorObj={e:{}},tryCatchTarget,globalObject=typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:exports!==void 0?exports:null;function tryCatcher(){try{var e=tryCatchTarget;return tryCatchTarget=null,e.apply(this,arguments)}catch(t){return errorObj.e=t,errorObj}}function tryCatch(e){return tryCatchTarget=e,tryCatcher}var inherits=function(e,t){var r={}.hasOwnProperty;function n(){this.constructor=e,this.constructor$=t;for(var i in t.prototype)r.call(t.prototype,i)&&i.charAt(i.length-1)!=="$"&&(this[i+"$"]=t.prototype[i])}return n.prototype=t.prototype,e.prototype=new n,e.prototype};function isPrimitive(e){return e==null||e===!0||e===!1||typeof e=="string"||typeof e=="number"}function isObject(e){return typeof e=="function"||typeof e=="object"&&e!==null}function maybeWrapAsError(e){return isPrimitive(e)?new Error(safeToString(e)):e}function withAppended(e,t){var r=e.length,n=new Array(r+1),i;for(i=0;i<r;++i)n[i]=e[i];return n[i]=t,n}function getDataPropertyOrDefault(e,t,r){if(es5.isES5){var n=Object.getOwnPropertyDescriptor(e,t);if(n!=null)return n.get==null&&n.set==null?n.value:r}else return{}.hasOwnProperty.call(e,t)?e[t]:void 0}function notEnumerableProp(e,t,r){if(isPrimitive(e))return e;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return es5.defineProperty(e,t,n),e}function thrower(e){throw e}var inheritedDataKeys=function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(i){for(var a=0;a<e.length;++a)if(e[a]===i)return!0;return!1};if(es5.isES5){var r=Object.getOwnPropertyNames;return function(i){for(var a=[],s=Object.create(null);i!=null&&!t(i);){var o;try{o=r(i)}catch(f){return a}for(var u=0;u<o.length;++u){var c=o[u];if(!s[c]){s[c]=!0;var l=Object.getOwnPropertyDescriptor(i,c);l!=null&&l.get==null&&l.set==null&&a.push(c)}}i=es5.getPrototypeOf(i)}return a}}else{var n={}.hasOwnProperty;return function(i){if(t(i))return[];var a=[];e:for(var s in i)if(n.call(i,s))a.push(s);else{for(var o=0;o<e.length;++o)if(n.call(e[o],s))continue e;a.push(s)}return a}}}(),thisAssignmentPattern=/this\s*\.\s*\S+\s*=/;function isClass(e){try{if(typeof e=="function"){var t=es5.names(e.prototype),r=es5.isES5&&t.length>1,n=t.length>0&&!(t.length===1&&t[0]==="constructor"),i=thisAssignmentPattern.test(e+"")&&es5.names(e).length>0;if(r||n||i)return!0}return!1}catch(a){return!1}}function toFastProperties(obj){function FakeConstructor(){}FakeConstructor.prototype=obj;for(var l=8;l--;)new FakeConstructor;return obj}var rident=/^[a-z$_][a-z$_0-9]*$/i;function isIdentifier(e){return rident.test(e)}function filledRange(e,t,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=t+i+r;return n}function safeToString(e){try{return e+""}catch(t){return"[no string representation]"}}function isError(e){return e!==null&&typeof e=="object"&&typeof e.message=="string"&&typeof e.name=="string"}function markAsOriginatingFromRejection(e){try{notEnumerableProp(e,"isOperational",!0)}catch(t){}}function originatesFromRejection(e){return e==null?!1:e instanceof Error.__BluebirdErrorTypes__.OperationalError||e.isOperational===!0}function canAttachTrace(e){return isError(e)&&es5.propertyIsWritable(e,"stack")}var ensureErrorObject=function(){return"stack"in new Error?function(e){return canAttachTrace(e)?e:new Error(safeToString(e))}:function(e){if(canAttachTrace(e))return e;try{throw new Error(safeToString(e))}catch(t){return t}}}();function classString(e){return{}.toString.call(e)}function copyDescriptors(e,t,r){for(var n=es5.names(e),i=0;i<n.length;++i){var a=n[i];if(r(a))try{es5.defineProperty(t,a,es5.getDescriptor(e,a))}catch(s){}}}var asArray=function(e){return es5.isArray(e)?e:null};typeof Symbol!="undefined"&&Symbol.iterator&&(ArrayFrom=typeof Array.from=="function"?function(e){return Array.from(e)}:function(e){for(var t=[],r=e[Symbol.iterator](),n;!(n=r.next()).done;)t.push(n.value);return t},asArray=function(e){return es5.isArray(e)?e:e!=null&&typeof e[Symbol.iterator]=="function"?ArrayFrom(e):null});var ArrayFrom,isNode=typeof process!="undefined"&&classString(process).toLowerCase()==="[object process]",hasEnvVariables=typeof process!="undefined"&&typeof process.env!="undefined";function env(e){return hasEnvVariables?process.env[e]:void 0}function getNativePromise(){if(typeof Promise=="function")try{var e=new Promise(function(){});if({}.toString.call(e)==="[object Promise]")return Promise}catch(t){}}function domainBind(e,t){return e.bind(t)}var ret={isClass,isIdentifier,inheritedDataKeys,getDataPropertyOrDefault,thrower,isArray:es5.isArray,asArray,notEnumerableProp,isPrimitive,isObject,isError,canEvaluate,errorObj,tryCatch,inherits,withAppended,maybeWrapAsError,toFastProperties,filledRange,toString:safeToString,canAttachTrace,ensureErrorObject,originatesFromRejection,markAsOriginatingFromRejection,classString,copyDescriptors,hasDevTools:typeof chrome!="undefined"&&chrome&&typeof chrome.loadTimes=="function",isNode,hasEnvVariables,env,global:globalObject,getNativePromise,domainBind};ret.isRecentNode=ret.isNode&&function(){var e=process.versions.node.split(".").map(Number);return e[0]===0&&e[1]>10||e[0]>0}();ret.isNode&&ret.toFastProperties(process);try{throw new Error}catch(e){ret.lastLineError=e}module.exports=ret});var bhe=y((Tnr,mhe)=>{"use strict";var oB=zn(),Om,hct=function(){throw new Error(`No async scheduler available
228
228
 
@@ -622,7 +622,7 @@ ${X3.toHex(a)}`}getCanonicalPath({path:t}){return this.uriEscapePath?`/${encodeU
622
622
  `+e.slice(i,a),i=a+1),s=o;return u+=`
623
623
  `,e.length-i>t&&s>i?u+=e.slice(i,s)+`
624
624
  `+e.slice(s+1):u+=e.slice(i),u.slice(1)}function RQe(e){for(var t="",r=0,n,i=0;i<e.length;r>=65536?i+=2:i++)r=p1(e,i),n=is[r],!n&&d1(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=n||_Qe(r);return t}function FQe(e,t,r){var n="",i=e.tag,a,s,o;for(a=0,s=r.length;a<s;a+=1)o=r[a],e.replacer&&(o=e.replacer.call(r,String(a),o)),(cf(e,t,o,!1,!1)||typeof o=="undefined"&&cf(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=i,e.dump="["+n+"]"}function vne(e,t,r,n){var i="",a=e.tag,s,o,u;for(s=0,o=r.length;s<o;s+=1)u=r[s],e.replacer&&(u=e.replacer.call(r,String(s),u)),(cf(e,t+1,u,!0,!0,!1,!0)||typeof u=="undefined"&&cf(e,t+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=dN(e,t)),e.dump&&l1===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=a,e.dump=i||"[]"}function IQe(e,t,r){var n="",i=e.tag,a=Object.keys(r),s,o,u,c,l;for(s=0,o=a.length;s<o;s+=1)l="",n!==""&&(l+=", "),e.condenseFlow&&(l+='"'),u=a[s],c=r[u],e.replacer&&(c=e.replacer.call(r,u,c)),!!cf(e,t,u,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),!!cf(e,t,c,!1,!1)&&(l+=e.dump,n+=l));e.tag=i,e.dump="{"+n+"}"}function OQe(e,t,r,n){var i="",a=e.tag,s=Object.keys(r),o,u,c,l,f,d;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Ms("sortKeys must be a boolean or a function");for(o=0,u=s.length;o<u;o+=1)d="",(!n||i!=="")&&(d+=dN(e,t)),c=s[o],l=r[c],e.replacer&&(l=e.replacer.call(r,c,l)),!!cf(e,t+1,c,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&l1===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,f&&(d+=dN(e,t)),!!cf(e,t+1,l,!0,f)&&(e.dump&&l1===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,i+=d));e.tag=a,e.dump=i||"{}"}function yne(e,t,r){var n,i,a,s,o,u;for(i=r?e.explicitTypes:e.implicitTypes,a=0,s=i.length;a<s;a+=1)if(o=i[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(u=e.styleMap[o.tag]||o.defaultStyle,ene.call(o.represent)==="[object Function]")n=o.represent(t,u);else if(tne.call(o.represent,u))n=o.represent[u](t,u);else throw new Ms("!<"+o.tag+'> tag resolver accepts not "'+u+'" style');e.dump=n}return!0}return!1}function cf(e,t,r,n,i,a,s){e.tag=null,e.dump=r,yne(e,r,!1)||yne(e,r,!0);var o=ene.call(e.dump),u=n,c;n&&(n=e.flowLevel<0||e.flowLevel>t);var l=o==="[object Object]"||o==="[object Array]",f,d;if(l&&(f=e.duplicates.indexOf(r),d=f!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(i=!1),d&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(l&&d&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),o==="[object Object]")n&&Object.keys(e.dump).length!==0?(OQe(e,t,e.dump,i),d&&(e.dump="&ref_"+f+e.dump)):(IQe(e,t,e.dump),d&&(e.dump="&ref_"+f+" "+e.dump));else if(o==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?vne(e,t-1,e.dump,i):vne(e,t,e.dump,i),d&&(e.dump="&ref_"+f+e.dump)):(FQe(e,t,e.dump),d&&(e.dump="&ref_"+f+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&PQe(e,e.dump,t,a,u);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Ms("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}function jQe(e,t){var r=[],n=[],i,a;for(hN(e,r,n),i=0,a=n.length;i<a;i+=1)t.duplicates.push(r[n[i]]);t.usedDuplicates=new Array(a)}function hN(e,t,r){var n,i,a;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)hN(e[i],t,r);else for(n=Object.keys(e),i=0,a=n.length;i<a;i+=1)hN(e[n[i]],t,r)}function qQe(e,t){t=t||{};var r=new CQe(t);r.noRefs||jQe(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),cf(r,0,n,!0,!0)?r.dump+`
625
- `:""}var LQe=qQe,NQe={dump:LQe};function mN(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var b2=Zre.load,tZt=Zre.loadAll,bne=NQe.dump;var rZt=mN("safeLoad","load"),nZt=mN("safeLoadAll","loadAll"),iZt=mN("safeDump","dump");var jje=wt(Zne()),qje=wt(pf());var Ko;(function(e){e.Auto="auto",e.Simple="simple",e.None="none"})(Ko||(Ko={}));var E1;(function(e){e.GitHub="github"})(E1||(E1={}));var dm;(function(e){e.GCS="gcs",e.GitHub="github",e.None="none"})(dm||(dm={}));var Fle=wt(A8());var Mst=new Set(["","undefined","null","0","false","no"]);function D8(e){let t=String(e).toLowerCase();return!Mst.has(t)}var y0={"dry-run":!1,"no-input":!1,"log-level":"Info"};function Ile(e){for(let t of Object.keys(y0))y0[t]=e[t];ke.trace("Global flags:",y0),See(Uo.LogLevel[y0["log-level"]]),ke.trace("Argv: ",e)}function zr(){return y0["dry-run"]}async function LA(){if(Ust()){let{isReady:e}=await(0,Fle.default)({message:'Is everything OK? Type "yes" to proceed:',name:"isReady",type:"text",validate:t=>t.length>=2||'Please type "yes" to proceed'});e.toLowerCase()!=="yes"&&(ke.error("Oh, okay. Aborting."),process.exit(1))}else ke.debug("Skipping the confirmation prompt.")}function Ust(){return!y0["no-input"]}var Ole=wt(MS()),Rt=class extends Error{constructor(t){let r=new.target.prototype;super(t);this.__proto__=r}};function hr(e,t=ke){if(zr()){let r=typeof e=="string"?e:String(e);t.error(`[dry-run] ${r}`)}else throw e instanceof Error?e:new Error(String(e))}function tp(e){e instanceof Rt||(0,Ole.captureException)(e),ke.error(e),process.exitCode=1}var Nle=()=>/\bv?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:-?([\da-z-]+(?:\.[\da-z-]+)*))?(?:\+([\da-z-]+(?:\.[\da-z-]+)*))?\b/gi;function NA(e){let t=Nle().exec(e),r=t&&t[0];return r&&r[0].toLowerCase()==="v"?r.substr(1):r}function j1(e){return!!e&&e===NA(e)}function rp(e){let t=Nle().exec(e);return t&&{build:t[5],major:parseInt(t[1],10),minor:parseInt(t[2],10),patch:parseInt(t[3],10),pre:t[4]}}function BA(e,t){if(e.major!==t.major)return e.major>t.major;if(e.minor!==t.minor)return e.minor>t.minor;if(e.patch!==t.patch)return e.patch>t.patch;if(!e.pre&&t.pre)return!0;if(e.pre&&!t.pre)return!1;if(e.build||t.build||e.pre||t.pre)throw new Error(`Cannot compare the two versions: "${JSON.stringify(e)}" and "${JSON.stringify(t)}"`);return!0}var zst=/(?:[^a-z])(preview|pre|rc|dev|alpha|beta|unstable|a|b)(?:[^a-z]|$)/i;function np(e){return j1(e)&&!!e.match(zst)}function Ble(e,t){return`${t===void 0?Lle():t}${e}`}function $st(){let e=qle()||{};if(Object.keys(e).length===0)throw new Error("Invalid package.json: the file is empty!");return e}function mm(){let{version:e}=$st(),t="a06e91def69cd849b7addd3efc8f75775d448110";return t?`${e} (${t})`:e}var dy=wt(require("fs")),kbe=wt(ym()),KE=wt(require("path"));var W0e=wt(require("child_process")),Y0e=wt(require("crypto")),Vm=wt(require("fs")),BE=wt(require("path")),q4=wt(efe()),bpt=wt(Lpe()),Q0e=wt(J0e());var Km;(function(e){e.SHA256="sha256",e.SHA384="sha384",e.SHA512="sha512"})(Km||(Km={}));var Bf;(function(e){e.Hex="hex",e.Base64="base64"})(Bf||(Bf={}));function wpt(e={}){let t=m({},e);return delete t.env,t}function Ept(e,t,r,n,i,a){let s=new Error(`Process "${t}" errored with code ${e}
625
+ `:""}var LQe=qQe,NQe={dump:LQe};function mN(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var b2=Zre.load,tZt=Zre.loadAll,bne=NQe.dump;var rZt=mN("safeLoad","load"),nZt=mN("safeLoadAll","loadAll"),iZt=mN("safeDump","dump");var jje=wt(Zne()),qje=wt(pf());var Ko;(function(e){e.Auto="auto",e.Simple="simple",e.None="none"})(Ko||(Ko={}));var E1;(function(e){e.GitHub="github"})(E1||(E1={}));var dm;(function(e){e.GCS="gcs",e.GitHub="github",e.None="none"})(dm||(dm={}));var Fle=wt(A8());var Mst=new Set(["","undefined","null","0","false","no"]);function D8(e){let t=String(e).toLowerCase();return!Mst.has(t)}var y0={"dry-run":!1,"no-input":!1,"log-level":"Info"};function Ile(e){for(let t of Object.keys(y0))y0[t]=e[t];ke.trace("Global flags:",y0),See(Uo.LogLevel[y0["log-level"]]),ke.trace("Argv: ",e)}function zr(){return y0["dry-run"]}async function LA(){if(Ust()){let{isReady:e}=await(0,Fle.default)({message:'Is everything OK? Type "yes" to proceed:',name:"isReady",type:"text",validate:t=>t.length>=2||'Please type "yes" to proceed'});e.toLowerCase()!=="yes"&&(ke.error("Oh, okay. Aborting."),process.exit(1))}else ke.debug("Skipping the confirmation prompt.")}function Ust(){return!y0["no-input"]}var Ole=wt(MS()),Rt=class extends Error{constructor(t){let r=new.target.prototype;super(t);this.__proto__=r}};function hr(e,t=ke){if(zr()){let r=typeof e=="string"?e:String(e);t.error(`[dry-run] ${r}`)}else throw e instanceof Error?e:new Error(String(e))}function tp(e){e instanceof Rt||(0,Ole.captureException)(e),ke.error(e),process.exitCode=1}var Nle=()=>/\bv?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:-?([\da-z-]+(?:\.[\da-z-]+)*))?(?:\+([\da-z-]+(?:\.[\da-z-]+)*))?\b/gi;function NA(e){let t=Nle().exec(e),r=t&&t[0];return r&&r[0].toLowerCase()==="v"?r.substr(1):r}function j1(e){return!!e&&e===NA(e)}function rp(e){let t=Nle().exec(e);return t&&{build:t[5],major:parseInt(t[1],10),minor:parseInt(t[2],10),patch:parseInt(t[3],10),pre:t[4]}}function BA(e,t){if(e.major!==t.major)return e.major>t.major;if(e.minor!==t.minor)return e.minor>t.minor;if(e.patch!==t.patch)return e.patch>t.patch;if(!e.pre&&t.pre)return!0;if(e.pre&&!t.pre)return!1;if(e.build||t.build||e.pre||t.pre)throw new Error(`Cannot compare the two versions: "${JSON.stringify(e)}" and "${JSON.stringify(t)}"`);return!0}var zst=/(?:[^a-z])(preview|pre|rc|dev|alpha|beta|unstable|a|b)(?:[^a-z]|$)/i;function np(e){return j1(e)&&!!e.match(zst)}function Ble(e,t){return`${t===void 0?Lle():t}${e}`}function $st(){let e=qle()||{};if(Object.keys(e).length===0)throw new Error("Invalid package.json: the file is empty!");return e}function mm(){let{version:e}=$st(),t="5986a890f9e2704125b54ef81e1291077e47cfcd";return t?`${e} (${t})`:e}var dy=wt(require("fs")),kbe=wt(ym()),KE=wt(require("path"));var W0e=wt(require("child_process")),Y0e=wt(require("crypto")),Vm=wt(require("fs")),BE=wt(require("path")),q4=wt(efe()),bpt=wt(Lpe()),Q0e=wt(J0e());var Km;(function(e){e.SHA256="sha256",e.SHA384="sha384",e.SHA512="sha512"})(Km||(Km={}));var Bf;(function(e){e.Hex="hex",e.Base64="base64"})(Bf||(Bf={}));function wpt(e={}){let t=m({},e);return delete t.env,t}function Ept(e,t,r,n,i,a){let s=new Error(`Process "${t}" errored with code ${e}
626
626
 
627
627
  STDOUT: ${i}
628
628
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/craft",
3
- "version": "0.30.1",
3
+ "version": "0.31.0",
4
4
  "description": "The universal sentry workflow CLI",
5
5
  "main": "dist/craft",
6
6
  "repository": "https://github.com/getsentry/craft",