create-next-app 13.4.13-canary.9 → 13.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -59,9 +59,11 @@ var s=r(9999);var n={"{":"}","(":")","[":"]"};var strictCheck=function(e){if(e[0
59
59
  * Released under the MIT License.
60
60
  */e.exports=function(e){if(typeof e==="number"){return e-e===0}if(typeof e==="string"&&e.trim()!==""){return Number.isFinite?Number.isFinite(+e):isFinite(+e)}return false}},8683:e=>{"use strict";e.exports=e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")}},7745:(e,t,r)=>{var s=r(7147);var n;if(process.platform==="win32"||global.TESTING_WINDOWS){n=r(4438)}else{n=r(7138)}e.exports=isexe;isexe.sync=sync;function isexe(e,t,r){if(typeof t==="function"){r=t;t={}}if(!r){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(r,s){isexe(e,t||{},(function(e,t){if(e){s(e)}else{r(t)}}))}))}n(e,t||{},(function(e,s){if(e){if(e.code==="EACCES"||t&&t.ignoreErrors){e=null;s=false}}r(e,s)}))}function sync(e,t){try{return n.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code==="EACCES"){return false}else{throw e}}}},7138:(e,t,r)=>{e.exports=isexe;isexe.sync=sync;var s=r(7147);function isexe(e,t,r){s.stat(e,(function(e,s){r(e,e?false:checkStat(s,t))}))}function sync(e,t){return checkStat(s.statSync(e),t)}function checkStat(e,t){return e.isFile()&&checkMode(e,t)}function checkMode(e,t){var r=e.mode;var s=e.uid;var n=e.gid;var i=t.uid!==undefined?t.uid:process.getuid&&process.getuid();var o=t.gid!==undefined?t.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var c=parseInt("010",8);var l=parseInt("001",8);var u=a|c;var h=r&l||r&c&&n===o||r&a&&s===i||r&u&&i===0;return h}},4438:(e,t,r)=>{e.exports=isexe;isexe.sync=sync;var s=r(7147);function checkPathExt(e,t){var r=t.pathExt!==undefined?t.pathExt:process.env.PATHEXT;if(!r){return true}r=r.split(";");if(r.indexOf("")!==-1){return true}for(var s=0;s<r.length;s++){var n=r[s].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n){return true}}return false}function checkStat(e,t,r){if(!e.isSymbolicLink()&&!e.isFile()){return false}return checkPathExt(t,r)}function isexe(e,t,r){s.stat(e,(function(s,n){r(s,s?false:checkStat(n,e,t))}))}function sync(e,t){return checkStat(s.statSync(e),e,t)}},9604:(e,t)=>{t.stringify=function stringify(e){if("undefined"==typeof e)return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON)e=e.toJSON();if(e&&"object"===typeof e){var t="";var r=Array.isArray(e);t=r?"[":"{";var s=true;for(var n in e){var i="function"==typeof e[n]||!r&&"undefined"===typeof e[n];if(Object.hasOwnProperty.call(e,n)&&!i){if(!s)t+=",";s=false;if(r){if(e[n]==undefined)t+="null";else t+=stringify(e[n])}else if(e[n]!==void 0){t+=stringify(n)+":"+stringify(e[n])}}}t+=r?"]":"}";return t}else if("string"===typeof e){return JSON.stringify(/^:/.test(e)?":"+e:e)}else if("undefined"===typeof e){return"null"}else return JSON.stringify(e)};t.parse=function(e){return JSON.parse(e,(function(e,t){if("string"===typeof t){if(/^:base64:/.test(t))return Buffer.from(t.substring(8),"base64");else return/^:/.test(t)?t.substring(1):t}return t}))}},9122:e=>{"use strict";var t=e.exports=function(e,t,r){if(typeof t=="function"){r=t;t={}}r=t.cb||r;var s=typeof r=="function"?r:r.pre||function(){};var n=r.post||function(){};_traverse(t,s,n,e,"",e)};t.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true,if:true,then:true,else:true};t.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};t.propsKeywords={$defs:true,definitions:true,properties:true,patternProperties:true,dependencies:true};t.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function _traverse(e,r,s,n,i,o,a,c,l,u){if(n&&typeof n=="object"&&!Array.isArray(n)){r(n,i,o,a,c,l,u);for(var h in n){var d=n[h];if(Array.isArray(d)){if(h in t.arrayKeywords){for(var p=0;p<d.length;p++)_traverse(e,r,s,d[p],i+"/"+h+"/"+p,o,i,h,n,p)}}else if(h in t.propsKeywords){if(d&&typeof d=="object"){for(var m in d)_traverse(e,r,s,d[m],i+"/"+h+"/"+escapeJsonPtr(m),o,i,h,n,m)}}else if(h in t.keywords||e.allKeys&&!(h in t.skipKeywords)){_traverse(e,r,s,d,i+"/"+h,o,i,h,n)}}s(n,i,o,a,c,l,u)}}function escapeJsonPtr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}},55:(e,t,r)=>{"use strict";const s=r(2361);const n=r(9604);const loadStore=e=>{const t={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(e.adapter||e.uri){const r=e.adapter||/^[^:]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};class Keyv extends s{constructor(e,t){super();this.opts=Object.assign({namespace:"keyv",serialize:n.stringify,deserialize:n.parse},typeof e==="string"?{uri:e}:e,t);if(!this.opts.store){const e=Object.assign({},this.opts);this.opts.store=loadStore(e)}if(typeof this.opts.store.on==="function"){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e,t){e=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((()=>r.get(e))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined){return undefined}if(typeof r.expires==="number"&&Date.now()>r.expires){this.delete(e);return undefined}return t&&t.raw?r:r.value}))}set(e,t,r){e=this._getKeyPrefix(e);if(typeof r==="undefined"){r=this.opts.ttl}if(r===0){r=undefined}const{store:s}=this.opts;return Promise.resolve().then((()=>{const e=typeof r==="number"?Date.now()+r:null;t={value:t,expires:e};return this.opts.serialize(t)})).then((t=>s.set(e,t,r))).then((()=>true))}delete(e){e=this._getKeyPrefix(e);const{store:t}=this.opts;return Promise.resolve().then((()=>t.delete(e)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}}e.exports=Keyv},7836:e=>{"use strict";const{FORCE_COLOR:t,NODE_DISABLE_COLORS:r,TERM:s}=process.env;const n={enabled:!r&&s!=="dumb"&&t!=="0",reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(e,t){let r=0,s,n="",i="";for(;r<e.length;r++){s=e[r];n+=s.open;i+=s.close;if(t.includes(s.close)){t=t.replace(s.rgx,s.close+s.open)}}return n+t+i}function chain(e,t){let r={has:e,keys:t};r.reset=n.reset.bind(r);r.bold=n.bold.bind(r);r.dim=n.dim.bind(r);r.italic=n.italic.bind(r);r.underline=n.underline.bind(r);r.inverse=n.inverse.bind(r);r.hidden=n.hidden.bind(r);r.strikethrough=n.strikethrough.bind(r);r.black=n.black.bind(r);r.red=n.red.bind(r);r.green=n.green.bind(r);r.yellow=n.yellow.bind(r);r.blue=n.blue.bind(r);r.magenta=n.magenta.bind(r);r.cyan=n.cyan.bind(r);r.white=n.white.bind(r);r.gray=n.gray.bind(r);r.grey=n.grey.bind(r);r.bgBlack=n.bgBlack.bind(r);r.bgRed=n.bgRed.bind(r);r.bgGreen=n.bgGreen.bind(r);r.bgYellow=n.bgYellow.bind(r);r.bgBlue=n.bgBlue.bind(r);r.bgMagenta=n.bgMagenta.bind(r);r.bgCyan=n.bgCyan.bind(r);r.bgWhite=n.bgWhite.bind(r);return r}function init(e,t){let r={open:`[${e}m`,close:`[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(t){if(this!==void 0&&this.has!==void 0){this.has.includes(e)||(this.has.push(e),this.keys.push(r));return t===void 0?this:n.enabled?run(this.keys,t+""):t+""}return t===void 0?chain([e],[r]):n.enabled?run([r],t+""):t+""}}e.exports=n},3722:(e,t,r)=>{"use strict";const s=r(1017);const n=r(3883);const i=r(4604);e.exports=(e,t)=>{t=Object.assign({cwd:process.cwd()},t);return i(e,(e=>n(s.resolve(t.cwd,e))),t)};e.exports.sync=(e,t)=>{t=Object.assign({cwd:process.cwd()},t);for(const r of e){if(n.sync(s.resolve(t.cwd,r))){return r}}}},4162:e=>{"use strict";e.exports=e=>{const t={};for(const[r,s]of Object.entries(e)){t[r.toLowerCase()]=s}return t}},8443:(e,t,r)=>{"use strict";const s=r(3401);const n=Symbol("max");const i=Symbol("length");const o=Symbol("lengthCalculator");const a=Symbol("allowStale");const c=Symbol("maxAge");const l=Symbol("dispose");const u=Symbol("noDisposeOnSet");const h=Symbol("lruList");const d=Symbol("cache");const p=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[n]=e.max||Infinity;const r=e.length||naiveLength;this[o]=typeof r!=="function"?naiveLength:r;this[a]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0;this[l]=e.dispose;this[u]=e.noDisposeOnSet||false;this[p]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[n]=e||Infinity;trim(this)}get max(){return this[n]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[c]=e;trim(this)}get maxAge(){return this[c]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[o]){this[o]=e;this[i]=0;this[h].forEach((e=>{e.length=this[o](e.value,e.key);this[i]+=e.length}))}trim(this)}get lengthCalculator(){return this[o]}get length(){return this[i]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let r=this[h].tail;r!==null;){const s=r.prev;forEachStep(this,e,r,t);r=s}}forEach(e,t){t=t||this;for(let r=this[h].head;r!==null;){const s=r.next;forEachStep(this,e,r,t);r=s}}keys(){return this[h].toArray().map((e=>e.key))}values(){return this[h].toArray().map((e=>e.value))}reset(){if(this[l]&&this[h]&&this[h].length){this[h].forEach((e=>this[l](e.key,e.value)))}this[d]=new Map;this[h]=new s;this[i]=0}dump(){return this[h].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[h]}set(e,t,r){r=r||this[c];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0;const a=this[o](t,e);if(this[d].has(e)){if(a>this[n]){del(this,this[d].get(e));return false}const o=this[d].get(e);const c=o.value;if(this[l]){if(!this[u])this[l](e,c.value)}c.now=s;c.maxAge=r;c.value=t;this[i]+=a-c.length;c.length=a;this.get(e);trim(this);return true}const p=new Entry(e,t,a,s,r);if(p.length>this[n]){if(this[l])this[l](e,t);return false}this[i]+=p.length;this[h].unshift(p);this[d].set(e,this[h].head);trim(this);return true}has(e){if(!this[d].has(e))return false;const t=this[d].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[h].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r];const n=s.e||0;if(n===0)this.set(s.k,s.v);else{const e=n-t;if(e>0){this.set(s.k,s.v,e)}}}}prune(){this[d].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,r)=>{const s=e[d].get(t);if(s){const t=s.value;if(isStale(e,t)){del(e,s);if(!e[a])return undefined}else{if(r){if(e[p])s.value.now=Date.now();e[h].unshiftNode(s)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[c])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]};const trim=e=>{if(e[i]>e[n]){for(let t=e[h].tail;e[i]>e[n]&&t!==null;){const r=t.prev;del(e,t);t=r}}};const del=(e,t)=>{if(t){const r=t.value;if(e[l])e[l](r.key,r.value);e[i]-=r.length;e[d].delete(r.key);e[h].removeNode(t)}};class Entry{constructor(e,t,r,s,n){this.key=e;this.value=t;this.length=r;this.now=s;this.maxAge=n||0}}const forEachStep=(e,t,r,s)=>{let n=r.value;if(isStale(e,n)){del(e,r);if(!e[a])n=undefined}if(n)t.call(s,n.value,n.key,e)};e.exports=LRUCache},9117:(e,t,r)=>{"use strict";const s=r(2781);const n=s.PassThrough;const i=Array.prototype.slice;e.exports=merge2;function merge2(){const e=[];const t=i.call(arguments);let r=false;let s=t[t.length-1];if(s&&!Array.isArray(s)&&s.pipe==null){t.pop()}else{s={}}const o=s.end!==false;const a=s.pipeError===true;if(s.objectMode==null){s.objectMode=true}if(s.highWaterMark==null){s.highWaterMark=64*1024}const c=n(s);function addStream(){for(let t=0,r=arguments.length;t<r;t++){e.push(pauseStreams(arguments[t],s))}mergeStream();return this}function mergeStream(){if(r){return}r=true;let t=e.shift();if(!t){process.nextTick(endStream);return}if(!Array.isArray(t)){t=[t]}let s=t.length+1;function next(){if(--s>0){return}r=false;mergeStream()}function pipe(e){function onend(){e.removeListener("merge2UnpipeEnd",onend);e.removeListener("end",onend);if(a){e.removeListener("error",onerror)}next()}function onerror(e){c.emit("error",e)}if(e._readableState.endEmitted){return next()}e.on("merge2UnpipeEnd",onend);e.on("end",onend);if(a){e.on("error",onerror)}e.pipe(c,{end:false});e.resume()}for(let e=0;e<t.length;e++){pipe(t[e])}next()}function endStream(){r=false;c.emit("queueDrain");if(o){c.end()}}c.setMaxListeners(0);c.add=addStream;c.on("unpipe",(function(e){e.emit("merge2UnpipeEnd")}));if(t.length){addStream.apply(null,t)}return c}function pauseStreams(e,t){if(!Array.isArray(e)){if(!e._readableState&&e.pipe){e=e.pipe(n(t))}if(!e._readableState||!e.pause||!e.pipe){throw new Error("Only readable stream can be merged.")}e.pause()}else{for(let r=0,s=e.length;r<s;r++){e[r]=pauseStreams(e[r],t)}}return e}},1065:(e,t,r)=>{"use strict";const s=r(3837);const n=r(8333);const i=r(3846);const o=r(5502);const isEmptyString=e=>e===""||e==="./";const micromatch=(e,t,r)=>{t=[].concat(t);e=[].concat(e);let s=new Set;let n=new Set;let o=new Set;let a=0;let onResult=e=>{o.add(e.output);if(r&&r.onResult){r.onResult(e)}};for(let o=0;o<t.length;o++){let c=i(String(t[o]),{...r,onResult:onResult},true);let l=c.state.negated||c.state.negatedExtglob;if(l)a++;for(let t of e){let e=c(t,true);let r=l?!e.isMatch:e.isMatch;if(!r)continue;if(l){s.add(e.output)}else{s.delete(e.output);n.add(e.output)}}}let c=a===t.length?[...o]:[...n];let l=c.filter((e=>!s.has(e)));if(r&&l.length===0){if(r.failglob===true){throw new Error(`No matches found for "${t.join(", ")}"`)}if(r.nonull===true||r.nullglob===true){return r.unescape?t.map((e=>e.replace(/\\/g,""))):t}}return l};micromatch.match=micromatch;micromatch.matcher=(e,t)=>i(e,t);micromatch.isMatch=(e,t,r)=>i(t,r)(e);micromatch.any=micromatch.isMatch;micromatch.not=(e,t,r={})=>{t=[].concat(t).map(String);let s=new Set;let n=[];let onResult=e=>{if(r.onResult)r.onResult(e);n.push(e.output)};let i=new Set(micromatch(e,t,{...r,onResult:onResult}));for(let e of n){if(!i.has(e)){s.add(e)}}return[...s]};micromatch.contains=(e,t,r)=>{if(typeof e!=="string"){throw new TypeError(`Expected a string: "${s.inspect(e)}"`)}if(Array.isArray(t)){return t.some((t=>micromatch.contains(e,t,r)))}if(typeof t==="string"){if(isEmptyString(e)||isEmptyString(t)){return false}if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t)){return true}}return micromatch.isMatch(e,t,{...r,contains:true})};micromatch.matchKeys=(e,t,r)=>{if(!o.isObject(e)){throw new TypeError("Expected the first argument to be an object")}let s=micromatch(Object.keys(e),t,r);let n={};for(let t of s)n[t]=e[t];return n};micromatch.some=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),r);if(s.some((e=>t(e)))){return true}}return false};micromatch.every=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),r);if(!s.every((e=>t(e)))){return false}}return true};micromatch.all=(e,t,r)=>{if(typeof e!=="string"){throw new TypeError(`Expected a string: "${s.inspect(e)}"`)}return[].concat(t).every((t=>i(t,r)(e)))};micromatch.capture=(e,t,r)=>{let s=o.isWindows(r);let n=i.makeRe(String(e),{...r,capture:true});let a=n.exec(s?o.toPosixSlashes(t):t);if(a){return a.slice(1).map((e=>e===void 0?"":e))}};micromatch.makeRe=(...e)=>i.makeRe(...e);micromatch.scan=(...e)=>i.scan(...e);micromatch.parse=(e,t)=>{let r=[];for(let s of[].concat(e||[])){for(let e of n(String(s),t)){r.push(i.parse(e,t))}}return r};micromatch.braces=(e,t)=>{if(typeof e!=="string")throw new TypeError("Expected a string");if(t&&t.nobrace===true||!/\{.*\}/.test(e)){return[e]}return n(e,t)};micromatch.braceExpand=(e,t)=>{if(typeof e!=="string")throw new TypeError("Expected a string");return micromatch.braces(e,{...t,expand:true})};e.exports=micromatch},5469:e=>{"use strict";const mimicFn=(e,t)=>{for(const r of Reflect.ownKeys(t)){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}return e};e.exports=mimicFn;e.exports["default"]=mimicFn},1867:e=>{"use strict";const copyProperty=(e,t,r,s)=>{if(r==="length"||r==="prototype"){return}if(r==="arguments"||r==="caller"){return}const n=Object.getOwnPropertyDescriptor(e,r);const i=Object.getOwnPropertyDescriptor(t,r);if(!canCopyProperty(n,i)&&s){return}Object.defineProperty(e,r,i)};const canCopyProperty=function(e,t){return e===undefined||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)};const changePrototype=(e,t)=>{const r=Object.getPrototypeOf(t);if(r===Object.getPrototypeOf(e)){return}Object.setPrototypeOf(e,r)};const wrappedToString=(e,t)=>`/* Wrapped ${e}*/\n${t}`;const t=Object.getOwnPropertyDescriptor(Function.prototype,"toString");const r=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");const changeToString=(e,s,n)=>{const i=n===""?"":`with ${n.trim()}() `;const o=wrappedToString.bind(null,i,s.toString());Object.defineProperty(o,"name",r);Object.defineProperty(e,"toString",{...t,value:o})};const mimicFn=(e,t,{ignoreNonConfigurable:r=false}={})=>{const{name:s}=e;for(const s of Reflect.ownKeys(t)){copyProperty(e,t,s,r)}changePrototype(e,t);changeToString(e,t,s);return e};e.exports=mimicFn},4240:e=>{"use strict";const t=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];e.exports=(e,r)=>{const s=new Set(Object.keys(e).concat(t));for(const t of s){if(t in r){continue}r[t]=typeof e[t]==="function"?e[t].bind(e):e[t]}}},5479:e=>{"use strict";const t=["aborted","complete","destroy","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];e.exports=(e,r)=>{const s=new Set(Object.keys(e).concat(t));for(const t of s){if(t in r){continue}r[t]=typeof e[t]==="function"?e[t].bind(e):e[t]}return r}},1254:e=>{e.exports=function(e,t){if(!t)t={};var r={bools:{},strings:{},unknownFn:null};if(typeof t["unknown"]==="function"){r.unknownFn=t["unknown"]}if(typeof t["boolean"]==="boolean"&&t["boolean"]){r.allBools=true}else{[].concat(t["boolean"]).filter(Boolean).forEach((function(e){r.bools[e]=true}))}var s={};Object.keys(t.alias||{}).forEach((function(e){s[e]=[].concat(t.alias[e]);s[e].forEach((function(t){s[t]=[e].concat(s[e].filter((function(e){return t!==e})))}))}));[].concat(t.string).filter(Boolean).forEach((function(e){r.strings[e]=true;if(s[e]){r.strings[s[e]]=true}}));var n=t["default"]||{};var i={_:[]};Object.keys(r.bools).forEach((function(e){setArg(e,n[e]===undefined?false:n[e])}));var o=[];if(e.indexOf("--")!==-1){o=e.slice(e.indexOf("--")+1);e=e.slice(0,e.indexOf("--"))}function argDefined(e,t){return r.allBools&&/^--[^=]+$/.test(t)||r.strings[e]||r.bools[e]||s[e]}function setArg(e,t,n){if(n&&r.unknownFn&&!argDefined(e,n)){if(r.unknownFn(n)===false)return}var o=!r.strings[e]&&isNumber(t)?Number(t):t;setKey(i,e.split("."),o);(s[e]||[]).forEach((function(e){setKey(i,e.split("."),o)}))}function setKey(e,t,s){var n=e;for(var i=0;i<t.length-1;i++){var o=t[i];if(isConstructorOrProto(n,o))return;if(n[o]===undefined)n[o]={};if(n[o]===Object.prototype||n[o]===Number.prototype||n[o]===String.prototype)n[o]={};if(n[o]===Array.prototype)n[o]=[];n=n[o]}var o=t[t.length-1];if(isConstructorOrProto(n,o))return;if(n===Object.prototype||n===Number.prototype||n===String.prototype)n={};if(n===Array.prototype)n=[];if(n[o]===undefined||r.bools[o]||typeof n[o]==="boolean"){n[o]=s}else if(Array.isArray(n[o])){n[o].push(s)}else{n[o]=[n[o],s]}}function aliasIsBoolean(e){return s[e].some((function(e){return r.bools[e]}))}for(var a=0;a<e.length;a++){var c=e[a];if(/^--.+=/.test(c)){var l=c.match(/^--([^=]+)=([\s\S]*)$/);var u=l[1];var h=l[2];if(r.bools[u]){h=h!=="false"}setArg(u,h,c)}else if(/^--no-.+/.test(c)){var u=c.match(/^--no-(.+)/)[1];setArg(u,false,c)}else if(/^--.+/.test(c)){var u=c.match(/^--(.+)/)[1];var d=e[a+1];if(d!==undefined&&!/^-/.test(d)&&!r.bools[u]&&!r.allBools&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,d,c);a++}else if(/^(true|false)$/.test(d)){setArg(u,d==="true",c);a++}else{setArg(u,r.strings[u]?"":true,c)}}else if(/^-[^-]+/.test(c)){var p=c.slice(1,-1).split("");var m=false;for(var y=0;y<p.length;y++){var d=c.slice(y+2);if(d==="-"){setArg(p[y],d,c);continue}if(/[A-Za-z]/.test(p[y])&&/=/.test(d)){setArg(p[y],d.split("=")[1],c);m=true;break}if(/[A-Za-z]/.test(p[y])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(d)){setArg(p[y],d,c);m=true;break}if(p[y+1]&&p[y+1].match(/\W/)){setArg(p[y],c.slice(y+2),c);m=true;break}else{setArg(p[y],r.strings[p[y]]?"":true,c)}}var u=c.slice(-1)[0];if(!m&&u!=="-"){if(e[a+1]&&!/^(-|--)[^-]/.test(e[a+1])&&!r.bools[u]&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,e[a+1],c);a++}else if(e[a+1]&&/^(true|false)$/.test(e[a+1])){setArg(u,e[a+1]==="true",c);a++}else{setArg(u,r.strings[u]?"":true,c)}}}else{if(!r.unknownFn||r.unknownFn(c)!==false){i._.push(r.strings["_"]||!isNumber(c)?c:Number(c))}if(t.stopEarly){i._.push.apply(i._,e.slice(a+1));break}}}Object.keys(n).forEach((function(e){if(!hasKey(i,e.split("."))){setKey(i,e.split("."),n[e]);(s[e]||[]).forEach((function(t){setKey(i,t.split("."),n[e])}))}}));if(t["--"]){i["--"]=new Array;o.forEach((function(e){i["--"].push(e)}))}else{o.forEach((function(e){i._.push(e)}))}return i};function hasKey(e,t){var r=e;t.slice(0,-1).forEach((function(e){r=r[e]||{}}));var s=t[t.length-1];return s in r}function isNumber(e){if(typeof e==="number")return true;if(/^0x[0-9a-f]+$/i.test(e))return true;return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function isConstructorOrProto(e,t){return t==="constructor"&&typeof e[t]==="function"||t==="__proto__"}},7413:(e,t,r)=>{"use strict";const s=r(2361);const n=r(2781);const i=r(3401);const o=r(1576).StringDecoder;const a=Symbol("EOF");const c=Symbol("maybeEmitEnd");const l=Symbol("emittedEnd");const u=Symbol("emittingEnd");const h=Symbol("closed");const d=Symbol("read");const p=Symbol("flush");const m=Symbol("flushChunk");const y=Symbol("encoding");const g=Symbol("decoder");const v=Symbol("flowing");const b=Symbol("paused");const w=Symbol("resume");const E=Symbol("bufferLength");const S=Symbol("bufferPush");const x=Symbol("bufferShift");const R=Symbol("objectMode");const P=Symbol("destroyed");const O=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const $=O&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const T=O&&Symbol.iterator||Symbol("iterator not implemented");const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBuffer=e=>e instanceof ArrayBuffer||typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);e.exports=class Minipass extends n{constructor(e){super();this[v]=false;this[b]=false;this.pipes=new i;this.buffer=new i;this[R]=e&&e.objectMode||false;if(this[R])this[y]=null;else this[y]=e&&e.encoding||null;if(this[y]==="buffer")this[y]=null;this[g]=this[y]?new o(this[y]):null;this[a]=false;this[l]=false;this[u]=false;this[h]=false;this.writable=true;this.readable=true;this[E]=0;this[P]=false}get bufferLength(){return this[E]}get encoding(){return this[y]}set encoding(e){if(this[R])throw new Error("cannot set encoding in objectMode");if(this[y]&&e!==this[y]&&(this[g]&&this[g].lastNeed||this[E]))throw new Error("cannot change encoding");if(this[y]!==e){this[g]=e?new o(e):null;if(this.buffer.length)this.buffer=this.buffer.map((e=>this[g].write(e)))}this[y]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[R]}set objectMode(e){this[R]=this[R]||!!e}write(e,t,r){if(this[a])throw new Error("write after end");if(this[P]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function")r=t,t="utf8";if(!t)t="utf8";if(!this[R]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(isArrayBuffer(e))e=Buffer.from(e);else if(typeof e!=="string")this.objectMode=true}if(!this.objectMode&&!e.length){if(this[E]!==0)this.emit("readable");if(r)r();return this.flowing}if(typeof e==="string"&&!this[R]&&!(t===this[y]&&!this[g].lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[y])e=this[g].write(e);if(this.flowing){if(this[E]!==0)this[p](true);this.emit("data",e)}else this[S](e);if(this[E]!==0)this.emit("readable");if(r)r();return this.flowing}read(e){if(this[P])return null;try{if(this[E]===0||e===0||e>this[E])return null;if(this[R])e=null;if(this.buffer.length>1&&!this[R]){if(this.encoding)this.buffer=new i([Array.from(this.buffer).join("")]);else this.buffer=new i([Buffer.concat(Array.from(this.buffer),this[E])])}return this[d](e||null,this.buffer.head.value)}finally{this[c]()}}[d](e,t){if(e===t.length||e===null)this[x]();else{this.buffer.head.value=t.slice(e);t=t.slice(0,e);this[E]-=e}this.emit("data",t);if(!this.buffer.length&&!this[a])this.emit("drain");return t}end(e,t,r){if(typeof e==="function")r=e,e=null;if(typeof t==="function")r=t,t="utf8";if(e)this.write(e,t);if(r)this.once("end",r);this[a]=true;this.writable=false;if(this.flowing||!this[b])this[c]();return this}[w](){if(this[P])return;this[b]=false;this[v]=true;this.emit("resume");if(this.buffer.length)this[p]();else if(this[a])this[c]();else this.emit("drain")}resume(){return this[w]()}pause(){this[v]=false;this[b]=true}get destroyed(){return this[P]}get flowing(){return this[v]}get paused(){return this[b]}[S](e){if(this[R])this[E]+=1;else this[E]+=e.length;return this.buffer.push(e)}[x](){if(this.buffer.length){if(this[R])this[E]-=1;else this[E]-=this.buffer.head.value.length}return this.buffer.shift()}[p](e){do{}while(this[m](this[x]()));if(!e&&!this.buffer.length&&!this[a])this.emit("drain")}[m](e){return e?(this.emit("data",e),this.flowing):false}pipe(e,t){if(this[P])return;const r=this[l];t=t||{};if(e===process.stdout||e===process.stderr)t.end=false;else t.end=t.end!==false;const s={dest:e,opts:t,ondrain:e=>this[w]()};this.pipes.push(s);e.on("drain",s.ondrain);this[w]();if(r&&s.opts.end)s.dest.end();return e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{if(e==="data"&&!this.pipes.length&&!this.flowing)this[w]();else if(isEndish(e)&&this[l]){super.emit(e);this.removeAllListeners(e)}}}get emittedEnd(){return this[l]}[c](){if(!this[u]&&!this[l]&&!this[P]&&this.buffer.length===0&&this[a]){this[u]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[h])this.emit("close");this[u]=false}}emit(e,t){if(e!=="error"&&e!=="close"&&e!==P&&this[P])return;else if(e==="data"){if(!t)return;if(this.pipes.length)this.pipes.forEach((e=>e.dest.write(t)===false&&this.pause()))}else if(e==="end"){if(this[l]===true)return;this[l]=true;this.readable=false;if(this[g]){t=this[g].end();if(t){this.pipes.forEach((e=>e.dest.write(t)));super.emit("data",t)}}this.pipes.forEach((e=>{e.dest.removeListener("drain",e.ondrain);if(e.opts.end)e.dest.end()}))}else if(e==="close"){this[h]=true;if(!this[l]&&!this[P])return}const r=new Array(arguments.length);r[0]=e;r[1]=t;if(arguments.length>2){for(let e=2;e<arguments.length;e++){r[e]=arguments[e]}}try{return super.emit.apply(this,r)}finally{if(!isEndish(e))this[c]();else this.removeAllListeners(e)}}collect(){const e=[];if(!this[R])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[R])e.dataLength+=t.length}));return t.then((()=>e))}concat(){return this[R]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((e=>this[R]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?e.join(""):Buffer.concat(e,e.dataLength)))}promise(){return new Promise(((e,t)=>{this.on(P,(()=>t(new Error("stream destroyed"))));this.on("end",(()=>e()));this.on("error",(e=>t(e)))}))}[$](){const next=()=>{const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[a])return Promise.resolve({done:true});let t=null;let r=null;const onerr=e=>{this.removeListener("data",ondata);this.removeListener("end",onend);r(e)};const ondata=e=>{this.removeListener("error",onerr);this.removeListener("end",onend);this.pause();t({value:e,done:!!this[a]})};const onend=()=>{this.removeListener("error",onerr);this.removeListener("data",ondata);t({done:true})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,s)=>{r=s;t=e;this.once(P,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next}}[T](){const next=()=>{const e=this.read();const t=e===null;return{value:e,done:t}};return{next:next}}destroy(e){if(this[P]){if(e)this.emit("error",e);else this.emit(P);return this}this[P]=true;this.buffer=new i;this[E]=0;if(typeof this.close==="function"&&!this[h])this.close();if(e)this.emit("error",e);else this.emit(P);return this}static isStream(e){return!!e&&(e instanceof Minipass||e instanceof n||e instanceof s&&(typeof e.pipe==="function"||typeof e.write==="function"&&typeof e.end==="function"))}}},5540:(e,t,r)=>{"use strict";const s=typeof process==="object"&&process?process:{stdout:null,stderr:null};const n=r(2361);const i=r(2781);const o=r(1576);const a=o.StringDecoder;const c=Symbol("EOF");const l=Symbol("maybeEmitEnd");const u=Symbol("emittedEnd");const h=Symbol("emittingEnd");const d=Symbol("emittedError");const p=Symbol("closed");const m=Symbol("read");const y=Symbol("flush");const g=Symbol("flushChunk");const v=Symbol("encoding");const b=Symbol("decoder");const w=Symbol("flowing");const E=Symbol("paused");const S=Symbol("resume");const x=Symbol("buffer");const R=Symbol("pipes");const P=Symbol("bufferLength");const O=Symbol("bufferPush");const $=Symbol("bufferShift");const T=Symbol("objectMode");const A=Symbol("destroyed");const C=Symbol("error");const k=Symbol("emitData");const I=Symbol("emitEnd");const N=Symbol("emitEnd2");const D=Symbol("async");const L=Symbol("abort");const M=Symbol("aborted");const j=Symbol("signal");const defer=e=>Promise.resolve().then(e);const F=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const U=F&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const B=F&&Symbol.iterator||Symbol("iterator not implemented");const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBuffer=e=>e instanceof ArrayBuffer||typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);class Pipe{constructor(e,t,r){this.src=e;this.dest=t;this.opts=r;this.ondrain=()=>e[S]();t.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(e,t,r){super(e,t,r);this.proxyErrors=e=>t.emit("error",e);e.on("error",this.proxyErrors)}}class Minipass extends i{constructor(e){super();this[w]=false;this[E]=false;this[R]=[];this[x]=[];this[T]=e&&e.objectMode||false;if(this[T])this[v]=null;else this[v]=e&&e.encoding||null;if(this[v]==="buffer")this[v]=null;this[D]=e&&!!e.async||false;this[b]=this[v]?new a(this[v]):null;this[c]=false;this[u]=false;this[h]=false;this[p]=false;this[d]=null;this.writable=true;this.readable=true;this[P]=0;this[A]=false;if(e&&e.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[x]})}if(e&&e.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[R]})}this[j]=e&&e.signal;this[M]=false;if(this[j]){this[j].addEventListener("abort",(()=>this[L]()));if(this[j].aborted){this[L]()}}}get bufferLength(){return this[P]}get encoding(){return this[v]}set encoding(e){if(this[T])throw new Error("cannot set encoding in objectMode");if(this[v]&&e!==this[v]&&(this[b]&&this[b].lastNeed||this[P]))throw new Error("cannot change encoding");if(this[v]!==e){this[b]=e?new a(e):null;if(this[x].length)this[x]=this[x].map((e=>this[b].write(e)))}this[v]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[T]}set objectMode(e){this[T]=this[T]||!!e}get["async"](){return this[D]}set["async"](e){this[D]=this[D]||!!e}[L](){this[M]=true;this.emit("abort",this[j].reason);this.destroy(this[j].reason)}get aborted(){return this[M]}set aborted(e){}write(e,t,r){if(this[M])return false;if(this[c])throw new Error("write after end");if(this[A]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function")r=t,t="utf8";if(!t)t="utf8";const s=this[D]?defer:e=>e();if(!this[T]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(isArrayBuffer(e))e=Buffer.from(e);else if(typeof e!=="string")this.objectMode=true}if(this[T]){if(this.flowing&&this[P]!==0)this[y](true);if(this.flowing)this.emit("data",e);else this[O](e);if(this[P]!==0)this.emit("readable");if(r)s(r);return this.flowing}if(!e.length){if(this[P]!==0)this.emit("readable");if(r)s(r);return this.flowing}if(typeof e==="string"&&!(t===this[v]&&!this[b].lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[v])e=this[b].write(e);if(this.flowing&&this[P]!==0)this[y](true);if(this.flowing)this.emit("data",e);else this[O](e);if(this[P]!==0)this.emit("readable");if(r)s(r);return this.flowing}read(e){if(this[A])return null;if(this[P]===0||e===0||e>this[P]){this[l]();return null}if(this[T])e=null;if(this[x].length>1&&!this[T]){if(this.encoding)this[x]=[this[x].join("")];else this[x]=[Buffer.concat(this[x],this[P])]}const t=this[m](e||null,this[x][0]);this[l]();return t}[m](e,t){if(e===t.length||e===null)this[$]();else{this[x][0]=t.slice(e);t=t.slice(0,e);this[P]-=e}this.emit("data",t);if(!this[x].length&&!this[c])this.emit("drain");return t}end(e,t,r){if(typeof e==="function")r=e,e=null;if(typeof t==="function")r=t,t="utf8";if(e)this.write(e,t);if(r)this.once("end",r);this[c]=true;this.writable=false;if(this.flowing||!this[E])this[l]();return this}[S](){if(this[A])return;this[E]=false;this[w]=true;this.emit("resume");if(this[x].length)this[y]();else if(this[c])this[l]();else this.emit("drain")}resume(){return this[S]()}pause(){this[w]=false;this[E]=true}get destroyed(){return this[A]}get flowing(){return this[w]}get paused(){return this[E]}[O](e){if(this[T])this[P]+=1;else this[P]+=e.length;this[x].push(e)}[$](){if(this[T])this[P]-=1;else this[P]-=this[x][0].length;return this[x].shift()}[y](e){do{}while(this[g](this[$]())&&this[x].length);if(!e&&!this[x].length&&!this[c])this.emit("drain")}[g](e){this.emit("data",e);return this.flowing}pipe(e,t){if(this[A])return;const r=this[u];t=t||{};if(e===s.stdout||e===s.stderr)t.end=false;else t.end=t.end!==false;t.proxyErrors=!!t.proxyErrors;if(r){if(t.end)e.end()}else{this[R].push(!t.proxyErrors?new Pipe(this,e,t):new PipeProxyErrors(this,e,t));if(this[D])defer((()=>this[S]()));else this[S]()}return e}unpipe(e){const t=this[R].find((t=>t.dest===e));if(t){this[R].splice(this[R].indexOf(t),1);t.unpipe()}}addListener(e,t){return this.on(e,t)}on(e,t){const r=super.on(e,t);if(e==="data"&&!this[R].length&&!this.flowing)this[S]();else if(e==="readable"&&this[P]!==0)super.emit("readable");else if(isEndish(e)&&this[u]){super.emit(e);this.removeAllListeners(e)}else if(e==="error"&&this[d]){if(this[D])defer((()=>t.call(this,this[d])));else t.call(this,this[d])}return r}get emittedEnd(){return this[u]}[l](){if(!this[h]&&!this[u]&&!this[A]&&this[x].length===0&&this[c]){this[h]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[p])this.emit("close");this[h]=false}}emit(e,t,...r){if(e!=="error"&&e!=="close"&&e!==A&&this[A])return;else if(e==="data"){return!this[T]&&!t?false:this[D]?defer((()=>this[k](t))):this[k](t)}else if(e==="end"){return this[I]()}else if(e==="close"){this[p]=true;if(!this[u]&&!this[A])return;const e=super.emit("close");this.removeAllListeners("close");return e}else if(e==="error"){this[d]=t;super.emit(C,t);const e=!this[j]||this.listeners("error").length?super.emit("error",t):false;this[l]();return e}else if(e==="resume"){const e=super.emit("resume");this[l]();return e}else if(e==="finish"||e==="prefinish"){const t=super.emit(e);this.removeAllListeners(e);return t}const s=super.emit(e,t,...r);this[l]();return s}[k](e){for(const t of this[R]){if(t.dest.write(e)===false)this.pause()}const t=super.emit("data",e);this[l]();return t}[I](){if(this[u])return;this[u]=true;this.readable=false;if(this[D])defer((()=>this[N]()));else this[N]()}[N](){if(this[b]){const e=this[b].end();if(e){for(const t of this[R]){t.dest.write(e)}super.emit("data",e)}}for(const e of this[R]){e.end()}const e=super.emit("end");this.removeAllListeners("end");return e}collect(){const e=[];if(!this[T])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[T])e.dataLength+=t.length}));return t.then((()=>e))}concat(){return this[T]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((e=>this[T]?Promise.reject(new Error("cannot concat in objectMode")):this[v]?e.join(""):Buffer.concat(e,e.dataLength)))}promise(){return new Promise(((e,t)=>{this.on(A,(()=>t(new Error("stream destroyed"))));this.on("error",(e=>t(e)));this.on("end",(()=>e()))}))}[U](){let e=false;const stop=()=>{this.pause();e=true;return Promise.resolve({done:true})};const next=()=>{if(e)return stop();const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[c])return stop();let r=null;let s=null;const onerr=e=>{this.removeListener("data",ondata);this.removeListener("end",onend);this.removeListener(A,ondestroy);stop();s(e)};const ondata=e=>{this.removeListener("error",onerr);this.removeListener("end",onend);this.removeListener(A,ondestroy);this.pause();r({value:e,done:!!this[c]})};const onend=()=>{this.removeListener("error",onerr);this.removeListener("data",ondata);this.removeListener(A,ondestroy);stop();r({done:true})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,t)=>{s=t;r=e;this.once(A,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[U](){return this}}}[B](){let e=false;const stop=()=>{this.pause();this.removeListener(C,stop);this.removeListener(A,stop);this.removeListener("end",stop);e=true;return{done:true}};const next=()=>{if(e)return stop();const t=this.read();return t===null?stop():{value:t}};this.once("end",stop);this.once(C,stop);this.once(A,stop);return{next:next,throw:stop,return:stop,[B](){return this}}}destroy(e){if(this[A]){if(e)this.emit("error",e);else this.emit(A);return this}this[A]=true;this[x].length=0;this[P]=0;if(typeof this.close==="function"&&!this[p])this.close();if(e)this.emit("error",e);else this.emit(A);return this}static isStream(e){return!!e&&(e instanceof Minipass||e instanceof i||e instanceof n&&(typeof e.pipe==="function"||typeof e.write==="function"&&typeof e.end==="function"))}}t.Minipass=Minipass},5154:(e,t,r)=>{const s=r(9796).constants||{ZLIB_VERNUM:4736};e.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},s))},7750:(e,t,r)=>{"use strict";const s=r(9491);const n=r(4300).Buffer;const i=r(9796);const o=t.constants=r(5154);const a=r(7413);const c=n.concat;const l=Symbol("_superWrite");class ZlibError extends Error{constructor(e){super("zlib: "+e.message);this.code=e.code;this.errno=e.errno;if(!this.code)this.code="ZLIB_ERROR";this.message="zlib: "+e.message;Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const u=Symbol("opts");const h=Symbol("flushFlag");const d=Symbol("finishFlushFlag");const p=Symbol("fullFlushFlag");const m=Symbol("handle");const y=Symbol("onError");const g=Symbol("sawError");const v=Symbol("level");const b=Symbol("strategy");const w=Symbol("ended");const E=Symbol("_defaultFullFlush");class ZlibBase extends a{constructor(e,t){if(!e||typeof e!=="object")throw new TypeError("invalid options for ZlibBase constructor");super(e);this[g]=false;this[w]=false;this[u]=e;this[h]=e.flush;this[d]=e.finishFlush;try{this[m]=new i[t](e)}catch(e){throw new ZlibError(e)}this[y]=e=>{if(this[g])return;this[g]=true;this.close();this.emit("error",e)};this[m].on("error",(e=>this[y](new ZlibError(e))));this.once("end",(()=>this.close))}close(){if(this[m]){this[m].close();this[m]=null;this.emit("close")}}reset(){if(!this[g]){s(this[m],"zlib binding closed");return this[m].reset()}}flush(e){if(this.ended)return;if(typeof e!=="number")e=this[p];this.write(Object.assign(n.alloc(0),{[h]:e}))}end(e,t,r){if(e)this.write(e,t);this.flush(this[d]);this[w]=true;return super.end(null,null,r)}get ended(){return this[w]}write(e,t,r){if(typeof t==="function")r=t,t="utf8";if(typeof e==="string")e=n.from(e,t);if(this[g])return;s(this[m],"zlib binding closed");const i=this[m]._handle;const o=i.close;i.close=()=>{};const a=this[m].close;this[m].close=()=>{};n.concat=e=>e;let u;try{const t=typeof e[h]==="number"?e[h]:this[h];u=this[m]._processChunk(e,t);n.concat=c}catch(e){n.concat=c;this[y](new ZlibError(e))}finally{if(this[m]){this[m]._handle=i;i.close=o;this[m].close=a;this[m].removeAllListeners("error")}}if(this[m])this[m].on("error",(e=>this[y](new ZlibError(e))));let d;if(u){if(Array.isArray(u)&&u.length>0){d=this[l](n.from(u[0]));for(let e=1;e<u.length;e++){d=this[l](u[e])}}else{d=this[l](n.from(u))}}if(r)r();return d}[l](e){return super.write(e)}}class Zlib extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||o.Z_NO_FLUSH;e.finishFlush=e.finishFlush||o.Z_FINISH;super(e,t);this[p]=o.Z_FULL_FLUSH;this[v]=e.level;this[b]=e.strategy}params(e,t){if(this[g])return;if(!this[m])throw new Error("cannot switch params when binding is closed");if(!this[m].params)throw new Error("not supported in this implementation");if(this[v]!==e||this[b]!==t){this.flush(o.Z_SYNC_FLUSH);s(this[m],"zlib binding closed");const r=this[m].flush;this[m].flush=(e,t)=>{this.flush(e);t()};try{this[m].params(e,t)}finally{this[m].flush=r}if(this[m]){this[v]=e;this[b]=t}}}}class Deflate extends Zlib{constructor(e){super(e,"Deflate")}}class Inflate extends Zlib{constructor(e){super(e,"Inflate")}}const S=Symbol("_portable");class Gzip extends Zlib{constructor(e){super(e,"Gzip");this[S]=e&&!!e.portable}[l](e){if(!this[S])return super[l](e);this[S]=false;e[9]=255;return super[l](e)}}class Gunzip extends Zlib{constructor(e){super(e,"Gunzip")}}class DeflateRaw extends Zlib{constructor(e){super(e,"DeflateRaw")}}class InflateRaw extends Zlib{constructor(e){super(e,"InflateRaw")}}class Unzip extends Zlib{constructor(e){super(e,"Unzip")}}class Brotli extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||o.BROTLI_OPERATION_PROCESS;e.finishFlush=e.finishFlush||o.BROTLI_OPERATION_FINISH;super(e,t);this[p]=o.BROTLI_OPERATION_FLUSH}}class BrotliCompress extends Brotli{constructor(e){super(e,"BrotliCompress")}}class BrotliDecompress extends Brotli{constructor(e){super(e,"BrotliDecompress")}}t.Deflate=Deflate;t.Inflate=Inflate;t.Gzip=Gzip;t.Gunzip=Gunzip;t.DeflateRaw=DeflateRaw;t.InflateRaw=InflateRaw;t.Unzip=Unzip;if(typeof i.BrotliCompress==="function"){t.BrotliCompress=BrotliCompress;t.BrotliDecompress=BrotliDecompress}else{t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}},9806:(e,t,r)=>{const s=r(2288);const n=r(7637);const{mkdirpNative:i,mkdirpNativeSync:o}=r(3713);const{mkdirpManual:a,mkdirpManualSync:c}=r(2561);const{useNative:l,useNativeSync:u}=r(7449);const mkdirp=(e,t)=>{e=n(e);t=s(t);return l(t)?i(e,t):a(e,t)};const mkdirpSync=(e,t)=>{e=n(e);t=s(t);return u(t)?o(e,t):c(e,t)};mkdirp.sync=mkdirpSync;mkdirp.native=(e,t)=>i(n(e),s(t));mkdirp.manual=(e,t)=>a(n(e),s(t));mkdirp.nativeSync=(e,t)=>o(n(e),s(t));mkdirp.manualSync=(e,t)=>c(n(e),s(t));e.exports=mkdirp},5509:(e,t,r)=>{const{dirname:s}=r(1017);const findMade=(e,t,r=undefined)=>{if(r===t)return Promise.resolve();return e.statAsync(t).then((e=>e.isDirectory()?r:undefined),(r=>r.code==="ENOENT"?findMade(e,s(t),t):undefined))};const findMadeSync=(e,t,r=undefined)=>{if(r===t)return undefined;try{return e.statSync(t).isDirectory()?r:undefined}catch(r){return r.code==="ENOENT"?findMadeSync(e,s(t),t):undefined}};e.exports={findMade:findMade,findMadeSync:findMadeSync}},2561:(e,t,r)=>{const{dirname:s}=r(1017);const mkdirpManual=(e,t,r)=>{t.recursive=false;const n=s(e);if(n===e){return t.mkdirAsync(e,t).catch((e=>{if(e.code!=="EISDIR")throw e}))}return t.mkdirAsync(e,t).then((()=>r||e),(s=>{if(s.code==="ENOENT")return mkdirpManual(n,t).then((r=>mkdirpManual(e,t,r)));if(s.code!=="EEXIST"&&s.code!=="EROFS")throw s;return t.statAsync(e).then((e=>{if(e.isDirectory())return r;else throw s}),(()=>{throw s}))}))};const mkdirpManualSync=(e,t,r)=>{const n=s(e);t.recursive=false;if(n===e){try{return t.mkdirSync(e,t)}catch(e){if(e.code!=="EISDIR")throw e;else return}}try{t.mkdirSync(e,t);return r||e}catch(s){if(s.code==="ENOENT")return mkdirpManualSync(e,t,mkdirpManualSync(n,t,r));if(s.code!=="EEXIST"&&s.code!=="EROFS")throw s;try{if(!t.statSync(e).isDirectory())throw s}catch(e){throw s}}};e.exports={mkdirpManual:mkdirpManual,mkdirpManualSync:mkdirpManualSync}},3713:(e,t,r)=>{const{dirname:s}=r(1017);const{findMade:n,findMadeSync:i}=r(5509);const{mkdirpManual:o,mkdirpManualSync:a}=r(2561);const mkdirpNative=(e,t)=>{t.recursive=true;const r=s(e);if(r===e)return t.mkdirAsync(e,t);return n(t,e).then((r=>t.mkdirAsync(e,t).then((()=>r)).catch((r=>{if(r.code==="ENOENT")return o(e,t);else throw r}))))};const mkdirpNativeSync=(e,t)=>{t.recursive=true;const r=s(e);if(r===e)return t.mkdirSync(e,t);const n=i(t,e);try{t.mkdirSync(e,t);return n}catch(r){if(r.code==="ENOENT")return a(e,t);else throw r}};e.exports={mkdirpNative:mkdirpNative,mkdirpNativeSync:mkdirpNativeSync}},2288:(e,t,r)=>{const{promisify:s}=r(3837);const n=r(7147);const optsArg=e=>{if(!e)e={mode:511,fs:n};else if(typeof e==="object")e={mode:511,fs:n,...e};else if(typeof e==="number")e={mode:e,fs:n};else if(typeof e==="string")e={mode:parseInt(e,8),fs:n};else throw new TypeError("invalid options argument");e.mkdir=e.mkdir||e.fs.mkdir||n.mkdir;e.mkdirAsync=s(e.mkdir);e.stat=e.stat||e.fs.stat||n.stat;e.statAsync=s(e.stat);e.statSync=e.statSync||e.fs.statSync||n.statSync;e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||n.mkdirSync;return e};e.exports=optsArg},7637:(e,t,r)=>{const s=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:n,parse:i}=r(1017);const pathArg=e=>{if(/\0/.test(e)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"})}e=n(e);if(s==="win32"){const t=/[*|"<>?:]/;const{root:r}=i(e);if(t.test(e.substr(r.length))){throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}}return e};e.exports=pathArg},7449:(e,t,r)=>{const s=r(7147);const n=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const i=n.replace(/^v/,"").split(".");const o=+i[0]>10||+i[0]===10&&+i[1]>=12;const a=!o?()=>false:e=>e.mkdir===s.mkdir;const c=!o?()=>false:e=>e.mkdirSync===s.mkdirSync;e.exports={useNative:a,useNativeSync:c}},9718:(e,t,r)=>{"use strict";const s=typeof URL==="undefined"?r(7310).URL:URL;const n="text/plain";const i="us-ascii";const testParameter=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e));const normalizeDataURL=(e,{stripHash:t})=>{const r=e.match(/^data:(.*?),(.*?)(?:#(.*))?$/);if(!r){throw new Error(`Invalid URL: ${e}`)}const s=r[1].split(";");const o=r[2];const a=t?"":r[3];let c=false;if(s[s.length-1]==="base64"){s.pop();c=true}const l=(s.shift()||"").toLowerCase();const u=s.map((e=>{let[t,r=""]=e.split("=").map((e=>e.trim()));if(t==="charset"){r=r.toLowerCase();if(r===i){return""}}return`${t}${r?`=${r}`:""}`})).filter(Boolean);const h=[...u];if(c){h.push("base64")}if(h.length!==0||l&&l!==n){h.unshift(l)}return`data:${h.join(";")},${c?o.trim():o}${a?`#${a}`:""}`};const normalizeUrl=(e,t)=>{t={defaultProtocol:"http:",normalizeProtocol:true,forceHttp:false,forceHttps:false,stripAuthentication:true,stripHash:false,stripWWW:true,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:true,removeDirectoryIndex:false,sortQueryParameters:true,...t};if(Reflect.has(t,"normalizeHttps")){throw new Error("options.normalizeHttps is renamed to options.forceHttp")}if(Reflect.has(t,"normalizeHttp")){throw new Error("options.normalizeHttp is renamed to options.forceHttps")}if(Reflect.has(t,"stripFragment")){throw new Error("options.stripFragment is renamed to options.stripHash")}e=e.trim();if(/^data:/i.test(e)){return normalizeDataURL(e,t)}const r=e.startsWith("//");const n=!r&&/^\.*\//.test(e);if(!n){e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol)}const i=new s(e);if(t.forceHttp&&t.forceHttps){throw new Error("The `forceHttp` and `forceHttps` options cannot be used together")}if(t.forceHttp&&i.protocol==="https:"){i.protocol="http:"}if(t.forceHttps&&i.protocol==="http:"){i.protocol="https:"}if(t.stripAuthentication){i.username="";i.password=""}if(t.stripHash){i.hash=""}if(i.pathname){i.pathname=i.pathname.replace(/((?!:).|^)\/{2,}/g,((e,t)=>{if(/^(?!\/)/g.test(t)){return`${t}/`}return"/"}))}if(i.pathname){i.pathname=decodeURI(i.pathname)}if(t.removeDirectoryIndex===true){t.removeDirectoryIndex=[/^index\.[a-z]+$/]}if(Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=i.pathname.split("/");const r=e[e.length-1];if(testParameter(r,t.removeDirectoryIndex)){e=e.slice(0,e.length-1);i.pathname=e.slice(1).join("/")+"/"}}if(i.hostname){i.hostname=i.hostname.replace(/\.$/,"");if(t.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(i.hostname)){i.hostname=i.hostname.replace(/^www\./,"")}}if(Array.isArray(t.removeQueryParameters)){for(const e of[...i.searchParams.keys()]){if(testParameter(e,t.removeQueryParameters)){i.searchParams.delete(e)}}}if(t.sortQueryParameters){i.searchParams.sort()}if(t.removeTrailingSlash){i.pathname=i.pathname.replace(/\/$/,"")}e=i.toString();if((t.removeTrailingSlash||i.pathname==="/")&&i.hash===""){e=e.replace(/\/$/,"")}if(r&&!t.normalizeProtocol){e=e.replace(/^http:\/\//,"//")}if(t.stripProtocol){e=e.replace(/^(?:https?:)?\/\//,"")}return e};e.exports=normalizeUrl;e.exports["default"]=normalizeUrl},9852:(e,t,r)=>{var s=r(3270);e.exports=s(once);e.exports.strict=s(onceStrict);once.proto=once((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})}));function once(e){var f=function(){if(f.called)return f.value;f.called=true;return f.value=e.apply(this,arguments)};f.called=false;return f}function onceStrict(e){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";f.onceError=t+" shouldn't be called more than once";f.called=false;return f}},3430:(e,t,r)=>{"use strict";const s=r(5469);const n=new WeakMap;const onetime=(e,t={})=>{if(typeof e!=="function"){throw new TypeError("Expected a function")}let r;let i=0;const o=e.displayName||e.name||"<anonymous>";const onetime=function(...s){n.set(onetime,++i);if(i===1){r=e.apply(this,s);e=null}else if(t.throw===true){throw new Error(`Function \`${o}\` can only be called once`)}return r};s(onetime,e);n.set(onetime,i);return onetime};e.exports=onetime;e.exports["default"]=onetime;e.exports.callCount=e=>{if(!n.has(e)){throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`)}return n.get(e)}},3426:e=>{"use strict";class CancelError extends Error{constructor(e){super(e||"Promise was canceled");this.name="CancelError"}get isCanceled(){return true}}class PCancelable{static fn(e){return(...t)=>new PCancelable(((r,s,n)=>{t.push(n);e(...t).then(r,s)}))}constructor(e){this._cancelHandlers=[];this._isPending=true;this._isCanceled=false;this._rejectOnCancel=true;this._promise=new Promise(((t,r)=>{this._reject=r;const onResolve=e=>{this._isPending=false;t(e)};const onReject=e=>{this._isPending=false;r(e)};const onCancel=e=>{if(!this._isPending){throw new Error("The `onCancel` handler was attached after the promise settled.")}this._cancelHandlers.push(e)};Object.defineProperties(onCancel,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}});return e(onResolve,onReject,onCancel)}))}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!this._isPending||this._isCanceled){return}if(this._cancelHandlers.length>0){try{for(const e of this._cancelHandlers){e()}}catch(e){this._reject(e)}}this._isCanceled=true;if(this._rejectOnCancel){this._reject(new CancelError(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(PCancelable.prototype,Promise.prototype);e.exports=PCancelable;e.exports.CancelError=CancelError},6291:(e,t,r)=>{"use strict";const s=r(7033);const n=Symbol.asyncIterator||"@@asyncIterator";const normalizeEmitter=e=>{const t=e.on||e.addListener||e.addEventListener;const r=e.off||e.removeListener||e.removeEventListener;if(!t||!r){throw new TypeError("Emitter is not compatible")}return{addListener:t.bind(e),removeListener:r.bind(e)}};const normalizeEvents=e=>Array.isArray(e)?e:[e];const multiple=(e,t,r)=>{let n;const i=new Promise(((s,i)=>{r={rejectionEvents:["error"],multiArgs:false,resolveImmediately:false,...r};if(!(r.count>=0&&(r.count===Infinity||Number.isInteger(r.count)))){throw new TypeError("The `count` option should be at least 0 or more")}const o=normalizeEvents(t);const a=[];const{addListener:c,removeListener:l}=normalizeEmitter(e);const onItem=(...e)=>{const t=r.multiArgs?e:e[0];if(r.filter&&!r.filter(t)){return}a.push(t);if(r.count===a.length){n();s(a)}};const rejectHandler=e=>{n();i(e)};n=()=>{for(const e of o){l(e,onItem)}for(const e of r.rejectionEvents){l(e,rejectHandler)}};for(const e of o){c(e,onItem)}for(const e of r.rejectionEvents){c(e,rejectHandler)}if(r.resolveImmediately){s(a)}}));i.cancel=n;if(typeof r.timeout==="number"){const e=s(i,r.timeout);e.cancel=n;return e}return i};const pEvent=(e,t,r)=>{if(typeof r==="function"){r={filter:r}}r={...r,count:1,resolveImmediately:false};const s=multiple(e,t,r);const n=s.then((e=>e[0]));n.cancel=s.cancel;return n};e.exports=pEvent;e.exports["default"]=pEvent;e.exports.multiple=multiple;e.exports.iterator=(e,t,r)=>{if(typeof r==="function"){r={filter:r}}const s=normalizeEvents(t);r={rejectionEvents:["error"],resolutionEvents:[],limit:Infinity,multiArgs:false,...r};const{limit:i}=r;const o=i>=0&&(i===Infinity||Number.isInteger(i));if(!o){throw new TypeError("The `limit` option should be a non-negative integer or Infinity")}if(i===0){return{[Symbol.asyncIterator](){return this},async next(){return{done:true,value:undefined}}}}const{addListener:a,removeListener:c}=normalizeEmitter(e);let l=false;let u;let h=false;const d=[];const p=[];let m=0;let y=false;const valueHandler=(...e)=>{m++;y=m===i;const t=r.multiArgs?e:e[0];if(d.length>0){const{resolve:e}=d.shift();e({done:false,value:t});if(y){cancel()}return}p.push(t);if(y){cancel()}};const cancel=()=>{l=true;for(const e of s){c(e,valueHandler)}for(const e of r.rejectionEvents){c(e,rejectHandler)}for(const e of r.resolutionEvents){c(e,resolveHandler)}while(d.length>0){const{resolve:e}=d.shift();e({done:true,value:undefined})}};const rejectHandler=(...e)=>{u=r.multiArgs?e:e[0];if(d.length>0){const{reject:e}=d.shift();e(u)}else{h=true}cancel()};const resolveHandler=(...e)=>{const t=r.multiArgs?e:e[0];if(r.filter&&!r.filter(t)){return}if(d.length>0){const{resolve:e}=d.shift();e({done:true,value:t})}else{p.push(t)}cancel()};for(const e of s){a(e,valueHandler)}for(const e of r.rejectionEvents){a(e,rejectHandler)}for(const e of r.resolutionEvents){a(e,resolveHandler)}return{[n](){return this},async next(){if(p.length>0){const e=p.shift();return{done:l&&p.length===0&&!y,value:e}}if(h){h=false;throw u}if(l){return{done:true,value:undefined}}return new Promise(((e,t)=>d.push({resolve:e,reject:t})))},async return(e){cancel();return{done:l,value:e}}}}},8213:e=>{"use strict";e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},6742:(e,t,r)=>{"use strict";const s=r(1857);const pLimit=e=>{if(!((Number.isInteger(e)||e===Infinity)&&e>0)){return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"))}const t=[];let r=0;const next=()=>{r--;if(t.length>0){t.shift()()}};const run=(e,t,...n)=>{r++;const i=s(e,...n);t(i);i.then(next,next)};const enqueue=(s,n,...i)=>{if(r<e){run(s,n,...i)}else{t.push(run.bind(null,s,n,...i))}};const generator=(e,...t)=>new Promise((r=>enqueue(e,r,...t)));Object.defineProperties(generator,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}});return generator};e.exports=pLimit;e.exports["default"]=pLimit},4604:(e,t,r)=>{"use strict";const s=r(6742);class EndError extends Error{constructor(e){super();this.value=e}}const testElement=(e,t)=>Promise.resolve(e).then(t);const finder=e=>Promise.all(e).then((e=>e[1]===true&&Promise.reject(new EndError(e[0]))));e.exports=(e,t,r)=>{r=Object.assign({concurrency:Infinity,preserveOrder:true},r);const n=s(r.concurrency);const i=[...e].map((e=>[e,n(testElement,e,t)]));const o=s(r.preserveOrder?1:Infinity);return Promise.all(i.map((e=>o(finder,e)))).then((()=>{})).catch((e=>e instanceof EndError?e.value:Promise.reject(e)))}},7033:(e,t,r)=>{"use strict";const s=r(8213);class TimeoutError extends Error{constructor(e){super(e);this.name="TimeoutError"}}e.exports=(e,t,r)=>new Promise(((n,i)=>{if(typeof t!=="number"||t<0){throw new TypeError("Expected `ms` to be a positive number")}const o=setTimeout((()=>{if(typeof r==="function"){try{n(r())}catch(o){i(o)}return}const s=typeof r==="string"?r:`Promise timed out after ${t} milliseconds`;const o=r instanceof Error?r:new TimeoutError(s);if(typeof e.cancel==="function"){e.cancel()}i(o)}),t);s(e.then(n,i),(()=>{clearTimeout(o)}))}));e.exports.TimeoutError=TimeoutError},1857:e=>{"use strict";const pTry=(e,...t)=>new Promise((r=>{r(e(...t))}));e.exports=pTry;e.exports["default"]=pTry},3883:(e,t,r)=>{"use strict";const s=r(7147);e.exports=e=>new Promise((t=>{s.access(e,(e=>{t(!e)}))}));e.exports.sync=e=>{try{s.accessSync(e);return true}catch(e){return false}}},6516:e=>{"use strict";const pathKey=(e={})=>{const t=e.env||process.env;const r=e.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(t).reverse().find((e=>e.toUpperCase()==="PATH"))||"Path"};e.exports=pathKey;e.exports["default"]=pathKey},9306:(e,t,r)=>{let s=r(6224);let n=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||s.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env);let formatter=(e,t,r=e)=>s=>{let n=""+s;let i=n.indexOf(t,e.length);return~i?e+replaceClose(n,t,r,i)+t:e+n+t};let replaceClose=(e,t,r,s)=>{let n=e.substring(0,s)+r;let i=e.substring(s+t.length);let o=i.indexOf(t);return~o?n+replaceClose(i,t,r,o):n+i};let createColors=(e=n)=>({isColorSupported:e,reset:e?e=>`${e}`:String,bold:e?formatter("","",""):String,dim:e?formatter("","",""):String,italic:e?formatter("",""):String,underline:e?formatter("",""):String,inverse:e?formatter("",""):String,hidden:e?formatter("",""):String,strikethrough:e?formatter("",""):String,black:e?formatter("",""):String,red:e?formatter("",""):String,green:e?formatter("",""):String,yellow:e?formatter("",""):String,blue:e?formatter("",""):String,magenta:e?formatter("",""):String,cyan:e?formatter("",""):String,white:e?formatter("",""):String,gray:e?formatter("",""):String,bgBlack:e?formatter("",""):String,bgRed:e?formatter("",""):String,bgGreen:e?formatter("",""):String,bgYellow:e?formatter("",""):String,bgBlue:e?formatter("",""):String,bgMagenta:e?formatter("",""):String,bgCyan:e?formatter("",""):String,bgWhite:e?formatter("",""):String});e.exports=createColors();e.exports.createColors=createColors},3846:(e,t,r)=>{"use strict";e.exports=r(7250)},3380:(e,t,r)=>{"use strict";const s=r(1017);const n="\\\\/";const i=`[^${n}]`;const o="\\.";const a="\\+";const c="\\?";const l="\\/";const u="(?=.)";const h="[^/]";const d=`(?:${l}|$)`;const p=`(?:^|${l})`;const m=`${o}{1,2}${d}`;const y=`(?!${o})`;const g=`(?!${p}${m})`;const v=`(?!${o}{0,1}${d})`;const b=`(?!${m})`;const w=`[^.${l}]`;const E=`${h}*?`;const S={DOT_LITERAL:o,PLUS_LITERAL:a,QMARK_LITERAL:c,SLASH_LITERAL:l,ONE_CHAR:u,QMARK:h,END_ANCHOR:d,DOTS_SLASH:m,NO_DOT:y,NO_DOTS:g,NO_DOT_SLASH:v,NO_DOTS_SLASH:b,QMARK_NO_DOT:w,STAR:E,START_ANCHOR:p};const x={...S,SLASH_LITERAL:`[${n}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${o}{1,2}(?:[${n}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${n}])${o}{1,2}(?:[${n}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${n}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${n}]|$))`,QMARK_NO_DOT:`[^.${n}]`,START_ANCHOR:`(?:^|[${n}])`,END_ANCHOR:`(?:[${n}]|$)`};const R={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};e.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:R,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:s.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===true?x:S}}},3632:(e,t,r)=>{"use strict";const s=r(3380);const n=r(5502);const{MAX_LENGTH:i,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:l}=s;const expandRange=(e,t)=>{if(typeof t.expandRange==="function"){return t.expandRange(...e,t)}e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map((e=>n.escapeRegex(e))).join("..")}return r};const syntaxError=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`;const parse=(e,t)=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}e=l[e]||e;const r={...t};const u=typeof r.maxLength==="number"?Math.min(i,r.maxLength):i;let h=e.length;if(h>u){throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${u}`)}const d={type:"bos",value:"",output:r.prepend||""};const p=[d];const m=r.capture?"":"?:";const y=n.isWindows(t);const g=s.globChars(y);const v=s.extglobChars(g);const{DOT_LITERAL:b,PLUS_LITERAL:w,SLASH_LITERAL:E,ONE_CHAR:S,DOTS_SLASH:x,NO_DOT:R,NO_DOT_SLASH:P,NO_DOTS_SLASH:O,QMARK:$,QMARK_NO_DOT:T,STAR:A,START_ANCHOR:C}=g;const globstar=e=>`(${m}(?:(?!${C}${e.dot?x:b}).)*?)`;const k=r.dot?"":R;const I=r.dot?$:T;let N=r.bash===true?globstar(r):A;if(r.capture){N=`(${N})`}if(typeof r.noext==="boolean"){r.noextglob=r.noext}const D={input:e,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:p};e=n.removePrefix(e,D);h=e.length;const L=[];const M=[];const j=[];let F=d;let U;const eos=()=>D.index===h-1;const B=D.peek=(t=1)=>e[D.index+t];const H=D.advance=()=>e[++D.index]||"";const remaining=()=>e.slice(D.index+1);const consume=(e="",t=0)=>{D.consumed+=e;D.index+=t};const append=e=>{D.output+=e.output!=null?e.output:e.value;consume(e.value)};const negate=()=>{let e=1;while(B()==="!"&&(B(2)!=="("||B(3)==="?")){H();D.start++;e++}if(e%2===0){return false}D.negated=true;D.start++;return true};const increment=e=>{D[e]++;j.push(e)};const decrement=e=>{D[e]--;j.pop()};const push=e=>{if(F.type==="globstar"){const t=D.braces>0&&(e.type==="comma"||e.type==="brace");const r=e.extglob===true||L.length&&(e.type==="pipe"||e.type==="paren");if(e.type!=="slash"&&e.type!=="paren"&&!t&&!r){D.output=D.output.slice(0,-F.output.length);F.type="star";F.value="*";F.output=N;D.output+=F.output}}if(L.length&&e.type!=="paren"){L[L.length-1].inner+=e.value}if(e.value||e.output)append(e);if(F&&F.type==="text"&&e.type==="text"){F.value+=e.value;F.output=(F.output||"")+e.value;return}e.prev=F;p.push(e);F=e};const extglobOpen=(e,t)=>{const s={...v[t],conditions:1,inner:""};s.prev=F;s.parens=D.parens;s.output=D.output;const n=(r.capture?"(":"")+s.open;increment("parens");push({type:e,value:t,output:D.output?"":S});push({type:"paren",extglob:true,value:H(),output:n});L.push(s)};const extglobClose=e=>{let s=e.close+(r.capture?")":"");let n;if(e.type==="negate"){let i=N;if(e.inner&&e.inner.length>1&&e.inner.includes("/")){i=globstar(r)}if(i!==N||eos()||/^\)+$/.test(remaining())){s=e.close=`)$))${i}`}if(e.inner.includes("*")&&(n=remaining())&&/^\.[^\\/.]+$/.test(n)){const r=parse(n,{...t,fastpaths:false}).output;s=e.close=`)${r})${i})`}if(e.prev.type==="bos"){D.negatedExtglob=true}}push({type:"paren",extglob:true,value:U,output:s});decrement("parens")};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(e)){let s=false;let i=e.replace(c,((e,t,r,n,i,o)=>{if(n==="\\"){s=true;return e}if(n==="?"){if(t){return t+n+(i?$.repeat(i.length):"")}if(o===0){return I+(i?$.repeat(i.length):"")}return $.repeat(r.length)}if(n==="."){return b.repeat(r.length)}if(n==="*"){if(t){return t+n+(i?N:"")}return N}return t?e:`\\${e}`}));if(s===true){if(r.unescape===true){i=i.replace(/\\/g,"")}else{i=i.replace(/\\+/g,(e=>e.length%2===0?"\\\\":e?"\\":""))}}if(i===e&&r.contains===true){D.output=e;return D}D.output=n.wrapOutput(i,D,t);return D}while(!eos()){U=H();if(U==="\0"){continue}if(U==="\\"){const e=B();if(e==="/"&&r.bash!==true){continue}if(e==="."||e===";"){continue}if(!e){U+="\\";push({type:"text",value:U});continue}const t=/^\\+/.exec(remaining());let s=0;if(t&&t[0].length>2){s=t[0].length;D.index+=s;if(s%2!==0){U+="\\"}}if(r.unescape===true){U=H()}else{U+=H()}if(D.brackets===0){push({type:"text",value:U});continue}}if(D.brackets>0&&(U!=="]"||F.value==="["||F.value==="[^")){if(r.posix!==false&&U===":"){const e=F.value.slice(1);if(e.includes("[")){F.posix=true;if(e.includes(":")){const e=F.value.lastIndexOf("[");const t=F.value.slice(0,e);const r=F.value.slice(e+2);const s=o[r];if(s){F.value=t+s;D.backtrack=true;H();if(!d.output&&p.indexOf(F)===1){d.output=S}continue}}}}if(U==="["&&B()!==":"||U==="-"&&B()==="]"){U=`\\${U}`}if(U==="]"&&(F.value==="["||F.value==="[^")){U=`\\${U}`}if(r.posix===true&&U==="!"&&F.value==="["){U="^"}F.value+=U;append({value:U});continue}if(D.quotes===1&&U!=='"'){U=n.escapeRegex(U);F.value+=U;append({value:U});continue}if(U==='"'){D.quotes=D.quotes===1?0:1;if(r.keepQuotes===true){push({type:"text",value:U})}continue}if(U==="("){increment("parens");push({type:"paren",value:U});continue}if(U===")"){if(D.parens===0&&r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const e=L[L.length-1];if(e&&D.parens===e.parens+1){extglobClose(L.pop());continue}push({type:"paren",value:U,output:D.parens?")":"\\)"});decrement("parens");continue}if(U==="["){if(r.nobracket===true||!remaining().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}U=`\\${U}`}else{increment("brackets")}push({type:"bracket",value:U});continue}if(U==="]"){if(r.nobracket===true||F&&F.type==="bracket"&&F.value.length===1){push({type:"text",value:U,output:`\\${U}`});continue}if(D.brackets===0){if(r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:U,output:`\\${U}`});continue}decrement("brackets");const e=F.value.slice(1);if(F.posix!==true&&e[0]==="^"&&!e.includes("/")){U=`/${U}`}F.value+=U;append({value:U});if(r.literalBrackets===false||n.hasRegexChars(e)){continue}const t=n.escapeRegex(F.value);D.output=D.output.slice(0,-F.value.length);if(r.literalBrackets===true){D.output+=t;F.value=t;continue}F.value=`(${m}${t}|${F.value})`;D.output+=F.value;continue}if(U==="{"&&r.nobrace!==true){increment("braces");const e={type:"brace",value:U,output:"(",outputIndex:D.output.length,tokensIndex:D.tokens.length};M.push(e);push(e);continue}if(U==="}"){const e=M[M.length-1];if(r.nobrace===true||!e){push({type:"text",value:U,output:U});continue}let t=")";if(e.dots===true){const e=p.slice();const s=[];for(let t=e.length-1;t>=0;t--){p.pop();if(e[t].type==="brace"){break}if(e[t].type!=="dots"){s.unshift(e[t].value)}}t=expandRange(s,r);D.backtrack=true}if(e.comma!==true&&e.dots!==true){const r=D.output.slice(0,e.outputIndex);const s=D.tokens.slice(e.tokensIndex);e.value=e.output="\\{";U=t="\\}";D.output=r;for(const e of s){D.output+=e.output||e.value}}push({type:"brace",value:U,output:t});decrement("braces");M.pop();continue}if(U==="|"){if(L.length>0){L[L.length-1].conditions++}push({type:"text",value:U});continue}if(U===","){let e=U;const t=M[M.length-1];if(t&&j[j.length-1]==="braces"){t.comma=true;e="|"}push({type:"comma",value:U,output:e});continue}if(U==="/"){if(F.type==="dot"&&D.index===D.start+1){D.start=D.index+1;D.consumed="";D.output="";p.pop();F=d;continue}push({type:"slash",value:U,output:E});continue}if(U==="."){if(D.braces>0&&F.type==="dot"){if(F.value===".")F.output=b;const e=M[M.length-1];F.type="dots";F.output+=U;F.value+=U;e.dots=true;continue}if(D.braces+D.parens===0&&F.type!=="bos"&&F.type!=="slash"){push({type:"text",value:U,output:b});continue}push({type:"dot",value:U,output:b});continue}if(U==="?"){const e=F&&F.value==="(";if(!e&&r.noextglob!==true&&B()==="("&&B(2)!=="?"){extglobOpen("qmark",U);continue}if(F&&F.type==="paren"){const e=B();let t=U;if(e==="<"&&!n.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(F.value==="("&&!/[!=<:]/.test(e)||e==="<"&&!/<([!=]|\w+>)/.test(remaining())){t=`\\${U}`}push({type:"text",value:U,output:t});continue}if(r.dot!==true&&(F.type==="slash"||F.type==="bos")){push({type:"qmark",value:U,output:T});continue}push({type:"qmark",value:U,output:$});continue}if(U==="!"){if(r.noextglob!==true&&B()==="("){if(B(2)!=="?"||!/[!=<:]/.test(B(3))){extglobOpen("negate",U);continue}}if(r.nonegate!==true&&D.index===0){negate();continue}}if(U==="+"){if(r.noextglob!==true&&B()==="("&&B(2)!=="?"){extglobOpen("plus",U);continue}if(F&&F.value==="("||r.regex===false){push({type:"plus",value:U,output:w});continue}if(F&&(F.type==="bracket"||F.type==="paren"||F.type==="brace")||D.parens>0){push({type:"plus",value:U});continue}push({type:"plus",value:w});continue}if(U==="@"){if(r.noextglob!==true&&B()==="("&&B(2)!=="?"){push({type:"at",extglob:true,value:U,output:""});continue}push({type:"text",value:U});continue}if(U!=="*"){if(U==="$"||U==="^"){U=`\\${U}`}const e=a.exec(remaining());if(e){U+=e[0];D.index+=e[0].length}push({type:"text",value:U});continue}if(F&&(F.type==="globstar"||F.star===true)){F.type="star";F.star=true;F.value+=U;F.output=N;D.backtrack=true;D.globstar=true;consume(U);continue}let t=remaining();if(r.noextglob!==true&&/^\([^?]/.test(t)){extglobOpen("star",U);continue}if(F.type==="star"){if(r.noglobstar===true){consume(U);continue}const s=F.prev;const n=s.prev;const i=s.type==="slash"||s.type==="bos";const o=n&&(n.type==="star"||n.type==="globstar");if(r.bash===true&&(!i||t[0]&&t[0]!=="/")){push({type:"star",value:U,output:""});continue}const a=D.braces>0&&(s.type==="comma"||s.type==="brace");const c=L.length&&(s.type==="pipe"||s.type==="paren");if(!i&&s.type!=="paren"&&!a&&!c){push({type:"star",value:U,output:""});continue}while(t.slice(0,3)==="/**"){const r=e[D.index+4];if(r&&r!=="/"){break}t=t.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){F.type="globstar";F.value+=U;F.output=globstar(r);D.output=F.output;D.globstar=true;consume(U);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!o&&eos()){D.output=D.output.slice(0,-(s.output+F.output).length);s.output=`(?:${s.output}`;F.type="globstar";F.output=globstar(r)+(r.strictSlashes?")":"|$)");F.value+=U;D.globstar=true;D.output+=s.output+F.output;consume(U);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&t[0]==="/"){const e=t[1]!==void 0?"|$":"";D.output=D.output.slice(0,-(s.output+F.output).length);s.output=`(?:${s.output}`;F.type="globstar";F.output=`${globstar(r)}${E}|${E}${e})`;F.value+=U;D.output+=s.output+F.output;D.globstar=true;consume(U+H());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&t[0]==="/"){F.type="globstar";F.value+=U;F.output=`(?:^|${E}|${globstar(r)}${E})`;D.output=F.output;D.globstar=true;consume(U+H());push({type:"slash",value:"/",output:""});continue}D.output=D.output.slice(0,-F.output.length);F.type="globstar";F.output=globstar(r);F.value+=U;D.output+=F.output;D.globstar=true;consume(U);continue}const s={type:"star",value:U,output:N};if(r.bash===true){s.output=".*?";if(F.type==="bos"||F.type==="slash"){s.output=k+s.output}push(s);continue}if(F&&(F.type==="bracket"||F.type==="paren")&&r.regex===true){s.output=U;push(s);continue}if(D.index===D.start||F.type==="slash"||F.type==="dot"){if(F.type==="dot"){D.output+=P;F.output+=P}else if(r.dot===true){D.output+=O;F.output+=O}else{D.output+=k;F.output+=k}if(B()!=="*"){D.output+=S;F.output+=S}}push(s)}while(D.brackets>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));D.output=n.escapeLast(D.output,"[");decrement("brackets")}while(D.parens>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));D.output=n.escapeLast(D.output,"(");decrement("parens")}while(D.braces>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));D.output=n.escapeLast(D.output,"{");decrement("braces")}if(r.strictSlashes!==true&&(F.type==="star"||F.type==="bracket")){push({type:"maybe_slash",value:"",output:`${E}?`})}if(D.backtrack===true){D.output="";for(const e of D.tokens){D.output+=e.output!=null?e.output:e.value;if(e.suffix){D.output+=e.suffix}}}return D};parse.fastpaths=(e,t)=>{const r={...t};const o=typeof r.maxLength==="number"?Math.min(i,r.maxLength):i;const a=e.length;if(a>o){throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`)}e=l[e]||e;const c=n.isWindows(t);const{DOT_LITERAL:u,SLASH_LITERAL:h,ONE_CHAR:d,DOTS_SLASH:p,NO_DOT:m,NO_DOTS:y,NO_DOTS_SLASH:g,STAR:v,START_ANCHOR:b}=s.globChars(c);const w=r.dot?y:m;const E=r.dot?g:m;const S=r.capture?"":"?:";const x={negated:false,prefix:""};let R=r.bash===true?".*?":v;if(r.capture){R=`(${R})`}const globstar=e=>{if(e.noglobstar===true)return R;return`(${S}(?:(?!${b}${e.dot?p:u}).)*?)`};const create=e=>{switch(e){case"*":return`${w}${d}${R}`;case".*":return`${u}${d}${R}`;case"*.*":return`${w}${R}${u}${d}${R}`;case"*/*":return`${w}${R}${h}${d}${E}${R}`;case"**":return w+globstar(r);case"**/*":return`(?:${w}${globstar(r)}${h})?${E}${d}${R}`;case"**/*.*":return`(?:${w}${globstar(r)}${h})?${E}${R}${u}${d}${R}`;case"**/.*":return`(?:${w}${globstar(r)}${h})?${u}${d}${R}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=create(t[1]);if(!r)return;return r+u+t[2]}}};const P=n.removePrefix(e,x);let O=create(P);if(O&&r.strictSlashes!==true){O+=`${h}?`}return O};e.exports=parse},7250:(e,t,r)=>{"use strict";const s=r(1017);const n=r(2964);const i=r(3632);const o=r(5502);const a=r(3380);const isObject=e=>e&&typeof e==="object"&&!Array.isArray(e);const picomatch=(e,t,r=false)=>{if(Array.isArray(e)){const s=e.map((e=>picomatch(e,t,r)));const arrayMatcher=e=>{for(const t of s){const r=t(e);if(r)return r}return false};return arrayMatcher}const s=isObject(e)&&e.tokens&&e.input;if(e===""||typeof e!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const n=t||{};const i=o.isWindows(t);const a=s?picomatch.compileRe(e,t):picomatch.makeRe(e,t,false,true);const c=a.state;delete a.state;let isIgnored=()=>false;if(n.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(n.ignore,e,r)}const matcher=(r,s=false)=>{const{isMatch:o,match:l,output:u}=picomatch.test(r,a,t,{glob:e,posix:i});const h={glob:e,state:c,regex:a,posix:i,input:r,output:u,match:l,isMatch:o};if(typeof n.onResult==="function"){n.onResult(h)}if(o===false){h.isMatch=false;return s?h:false}if(isIgnored(r)){if(typeof n.onIgnore==="function"){n.onIgnore(h)}h.isMatch=false;return s?h:false}if(typeof n.onMatch==="function"){n.onMatch(h)}return s?h:true};if(r){matcher.state=c}return matcher};picomatch.test=(e,t,r,{glob:s,posix:n}={})=>{if(typeof e!=="string"){throw new TypeError("Expected input to be a string")}if(e===""){return{isMatch:false,output:""}}const i=r||{};const a=i.format||(n?o.toPosixSlashes:null);let c=e===s;let l=c&&a?a(e):e;if(c===false){l=a?a(e):e;c=l===s}if(c===false||i.capture===true){if(i.matchBase===true||i.basename===true){c=picomatch.matchBase(e,t,r,n)}else{c=t.exec(l)}}return{isMatch:Boolean(c),match:c,output:l}};picomatch.matchBase=(e,t,r,n=o.isWindows(r))=>{const i=t instanceof RegExp?t:picomatch.makeRe(t,r);return i.test(s.basename(e))};picomatch.isMatch=(e,t,r)=>picomatch(t,r)(e);picomatch.parse=(e,t)=>{if(Array.isArray(e))return e.map((e=>picomatch.parse(e,t)));return i(e,{...t,fastpaths:false})};picomatch.scan=(e,t)=>n(e,t);picomatch.compileRe=(e,t,r=false,s=false)=>{if(r===true){return e.output}const n=t||{};const i=n.contains?"":"^";const o=n.contains?"":"$";let a=`${i}(?:${e.output})${o}`;if(e&&e.negated===true){a=`^(?!${a}).*$`}const c=picomatch.toRegex(a,t);if(s===true){c.state=e}return c};picomatch.makeRe=(e,t={},r=false,s=false)=>{if(!e||typeof e!=="string"){throw new TypeError("Expected a non-empty string")}let n={negated:false,fastpaths:true};if(t.fastpaths!==false&&(e[0]==="."||e[0]==="*")){n.output=i.fastpaths(e,t)}if(!n.output){n=i(e,t)}return picomatch.compileRe(n,t,r,s)};picomatch.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&t.debug===true)throw e;return/$^/}};picomatch.constants=a;e.exports=picomatch},2964:(e,t,r)=>{"use strict";const s=r(5502);const{CHAR_ASTERISK:n,CHAR_AT:i,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:l,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:m,CHAR_QUESTION_MARK:y,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:v,CHAR_RIGHT_SQUARE_BRACKET:b}=r(3380);const isPathSeparator=e=>e===u||e===o;const depth=e=>{if(e.isPrefix!==true){e.depth=e.isGlobstar?Infinity:1}};const scan=(e,t)=>{const r=t||{};const w=e.length-1;const E=r.parts===true||r.scanToEnd===true;const S=[];const x=[];const R=[];let P=e;let O=-1;let $=0;let T=0;let A=false;let C=false;let k=false;let I=false;let N=false;let D=false;let L=false;let M=false;let j=false;let F=false;let U=0;let B;let H;let z={value:"",depth:0,isGlob:false};const eos=()=>O>=w;const peek=()=>P.charCodeAt(O+1);const advance=()=>{B=H;return P.charCodeAt(++O)};while(O<w){H=advance();let e;if(H===o){L=z.backslashes=true;H=advance();if(H===h){D=true}continue}if(D===true||H===h){U++;while(eos()!==true&&(H=advance())){if(H===o){L=z.backslashes=true;advance();continue}if(H===h){U++;continue}if(D!==true&&H===c&&(H=advance())===c){A=z.isBrace=true;k=z.isGlob=true;F=true;if(E===true){continue}break}if(D!==true&&H===a){A=z.isBrace=true;k=z.isGlob=true;F=true;if(E===true){continue}break}if(H===g){U--;if(U===0){D=false;A=z.isBrace=true;F=true;break}}}if(E===true){continue}break}if(H===u){S.push(O);x.push(z);z={value:"",depth:0,isGlob:false};if(F===true)continue;if(B===c&&O===$+1){$+=2;continue}T=O+1;continue}if(r.noext!==true){const e=H===m||H===i||H===n||H===y||H===l;if(e===true&&peek()===d){k=z.isGlob=true;I=z.isExtglob=true;F=true;if(H===l&&O===$){j=true}if(E===true){while(eos()!==true&&(H=advance())){if(H===o){L=z.backslashes=true;H=advance();continue}if(H===v){k=z.isGlob=true;F=true;break}}continue}break}}if(H===n){if(B===n)N=z.isGlobstar=true;k=z.isGlob=true;F=true;if(E===true){continue}break}if(H===y){k=z.isGlob=true;F=true;if(E===true){continue}break}if(H===p){while(eos()!==true&&(e=advance())){if(e===o){L=z.backslashes=true;advance();continue}if(e===b){C=z.isBracket=true;k=z.isGlob=true;F=true;break}}if(E===true){continue}break}if(r.nonegate!==true&&H===l&&O===$){M=z.negated=true;$++;continue}if(r.noparen!==true&&H===d){k=z.isGlob=true;if(E===true){while(eos()!==true&&(H=advance())){if(H===d){L=z.backslashes=true;H=advance();continue}if(H===v){F=true;break}}continue}break}if(k===true){F=true;if(E===true){continue}break}}if(r.noext===true){I=false;k=false}let G=P;let V="";let q="";if($>0){V=P.slice(0,$);P=P.slice($);T-=$}if(G&&k===true&&T>0){G=P.slice(0,T);q=P.slice(T)}else if(k===true){G="";q=P}else{G=P}if(G&&G!==""&&G!=="/"&&G!==P){if(isPathSeparator(G.charCodeAt(G.length-1))){G=G.slice(0,-1)}}if(r.unescape===true){if(q)q=s.removeBackslashes(q);if(G&&L===true){G=s.removeBackslashes(G)}}const W={prefix:V,input:e,start:$,base:G,glob:q,isBrace:A,isBracket:C,isGlob:k,isExtglob:I,isGlobstar:N,negated:M,negatedExtglob:j};if(r.tokens===true){W.maxDepth=0;if(!isPathSeparator(H)){x.push(z)}W.tokens=x}if(r.parts===true||r.tokens===true){let t;for(let s=0;s<S.length;s++){const n=t?t+1:$;const i=S[s];const o=e.slice(n,i);if(r.tokens){if(s===0&&$!==0){x[s].isPrefix=true;x[s].value=V}else{x[s].value=o}depth(x[s]);W.maxDepth+=x[s].depth}if(s!==0||o!==""){R.push(o)}t=i}if(t&&t+1<e.length){const s=e.slice(t+1);R.push(s);if(r.tokens){x[x.length-1].value=s;depth(x[x.length-1]);W.maxDepth+=x[x.length-1].depth}}W.slashes=S;W.parts=R}return W};e.exports=scan},5502:(e,t,r)=>{"use strict";const s=r(1017);const n=process.platform==="win32";const{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:c}=r(3380);t.isObject=e=>e!==null&&typeof e==="object"&&!Array.isArray(e);t.hasRegexChars=e=>a.test(e);t.isRegexChar=e=>e.length===1&&t.hasRegexChars(e);t.escapeRegex=e=>e.replace(c,"\\$1");t.toPosixSlashes=e=>e.replace(i,"/");t.removeBackslashes=e=>e.replace(o,(e=>e==="\\"?"":e));t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);if(e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10){return true}return false};t.isWindows=e=>{if(e&&typeof e.windows==="boolean"){return e.windows}return n===true||s.sep==="\\"};t.escapeLast=(e,r,s)=>{const n=e.lastIndexOf(r,s);if(n===-1)return e;if(e[n-1]==="\\")return t.escapeLast(e,r,n-1);return`${e.slice(0,n)}\\${e.slice(n)}`};t.removePrefix=(e,t={})=>{let r=e;if(r.startsWith("./")){r=r.slice(2);t.prefix="./"}return r};t.wrapOutput=(e,t={},r={})=>{const s=r.contains?"":"^";const n=r.contains?"":"$";let i=`${s}(?:${e})${n}`;if(t.negated===true){i=`(?:^(?!${i}).*$)`}return i}},990:(e,t,r)=>{"use strict";const s=r(7517);e.exports=async({cwd:e}={})=>s("package.json",{cwd:e});e.exports.sync=({cwd:e}={})=>s.sync("package.json",{cwd:e})},8272:e=>{"use strict";class DatePart{constructor({token:e,date:t,parts:r,locales:s}){this.token=e;this.date=t||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const e=this.parts.indexOf(this);return this.parts.find(((t,r)=>r>e&&t instanceof DatePart))}setTo(e){}prev(){let e=[].concat(this.parts).reverse();const t=e.indexOf(this);return e.find(((e,r)=>r>t&&e instanceof DatePart))}toString(){return String(this.date)}}e.exports=DatePart},5236:(e,t,r)=>{"use strict";const s=r(8272);const pos=e=>{e=e%10;return e===1?"st":e===2?"nd":e===3?"rd":"th"};class Day extends s{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate();let t=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+pos(e):this.token==="d"?t+1:this.token==="ddd"?this.locales.weekdaysShort[t]:this.token==="dddd"?this.locales.weekdays[t]:e}}e.exports=Day},8507:(e,t,r)=>{"use strict";const s=r(8272);class Hours extends s{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();if(/h/.test(this.token))e=e%12||12;return this.token.length>1?String(e).padStart(2,"0"):e}}e.exports=Hours},1442:(e,t,r)=>{"use strict";e.exports={DatePart:r(8272),Meridiem:r(3402),Day:r(5236),Hours:r(8507),Milliseconds:r(4055),Minutes:r(2859),Month:r(7436),Seconds:r(5847),Year:r(2751)}},3402:(e,t,r)=>{"use strict";const s=r(8272);class Meridiem extends s{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}}e.exports=Meridiem},4055:(e,t,r)=>{"use strict";const s=r(8272);class Milliseconds extends s{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}e.exports=Milliseconds},2859:(e,t,r)=>{"use strict";const s=r(8272);class Minutes extends s{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}}e.exports=Minutes},7436:(e,t,r)=>{"use strict";const s=r(8272);class Month extends s{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1;this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth();let t=this.token.length;return t===2?String(e+1).padStart(2,"0"):t===3?this.locales.monthsShort[e]:t===4?this.locales.months[e]:String(e+1)}}e.exports=Month},5847:(e,t,r)=>{"use strict";const s=r(8272);class Seconds extends s{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}}e.exports=Seconds},2751:(e,t,r)=>{"use strict";const s=r(8272);class Year extends s{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}}e.exports=Year},3475:(e,t,r)=>{"use strict";function asyncGeneratorStep(e,t,r,s,n,i,o){try{var a=e[i](o);var c=a.value}catch(e){r(e);return}if(a.done){t(c)}else{Promise.resolve(c).then(s,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(s,n){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,s,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,s,n,_next,_throw,"throw",e)}_next(undefined)}))}}const s=r(7836);const n=r(4632);const i=r(4577),o=i.cursor;const a=r(669),c=a.style,l=a.clear,u=a.figures,h=a.strip;const getVal=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]);const getTitle=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]);const getIndex=(e,t)=>{const r=e.findIndex((e=>e.value===t||e.title===t));return r>-1?r:undefined};class AutocompletePrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.suggest=e.suggest;this.choices=e.choices;this.initial=typeof e.initial==="number"?e.initial:getIndex(e.choices,e.initial);this.select=this.initial||e.cursor||0;this.fallback=e.fallback||(e.initial!==undefined?`${u.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${u.pointerSmall} ${e.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=e.limit||10;this.cursor=0;this.transform=c.render(e.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=l("");this.complete(this.render);this.render()}moveSelect(e){this.select=e;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],e)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}complete(e){var t=this;return _asyncToGenerator((function*(){const r=t.completing=t.suggest(t.input,t.choices);const s=yield r;if(t.completing!==r)return;t.suggestions=s.map(((e,t,r)=>({title:getTitle(r,t),value:getVal(r,t)}))).reduce(((e,r)=>{if(e[e.length-1].length<t.limit)e[e.length-1].push(r);else e.push([r]);return e}),[[]]);t.isFallback=false;t.completing=false;if(!t.suggestions[t.page])t.page=0;if(!t.suggestions.length&&t.fallback){const e=getIndex(t.choices,t.fallback);t.suggestions=[[]];if(e!==undefined)t.suggestions[0].push({title:getTitle(t.choices,e),value:getVal(t.choices,e)});t.isFallback=true}const n=Math.max(s.length-1,0);t.moveSelect(Math.min(n,t.select));e&&e()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(e,t){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${e}${s}`;this.cursor=r.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1);let t=this.input.slice(this.cursor);this.input=`${e}${t}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor);let t=this.input.slice(this.cursor+1);this.input=`${e}${t}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(0);this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(o.down(this.lineCount));let e=s.bold(`${c.symbol(this.done,this.aborted)} ${this.msg} `)+`${c.delimiter(this.completing)} `;let t=h(e).length;if(this.done&&this.suggestions[this.page][this.select]){e+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;t+=this.rendered.length;e+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let t=this.suggestions[this.page].reduce(((e,t,r)=>e+`\n${r===this.select?s.cyan(t.title):t.title}`),"");if(t&&!this.isFallback){e+=t;if(this.suggestions.length>1){this.lineCount++;e+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const t=getIndex(this.choices,this.fallback);const r=t!==undefined?getTitle(this.choices,t):this.fallback;e+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+e);this.clear=l(e);if(this.lineCount&&!this.done){let e=o.up(this.lineCount);e+=o.left+o.to(t);e+=o.move(-this.rendered.length+this.cursor*this.scale);this.out.write(e)}}}e.exports=AutocompletePrompt},8819:(e,t,r)=>{"use strict";const s=r(7836);const n=r(4577),i=n.cursor;const o=r(8056);const a=r(669),c=a.clear,l=a.style,u=a.figures;class AutocompleteMultiselectPrompt extends o{constructor(e={}){e.overrideRender=true;super(e);this.inputValue="";this.clear=c("");this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((e=>{if(this.inputValue){if(typeof e.title==="string"){if(e.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof e.value==="string"){if(e.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const t=this.filteredOptions.findIndex((t=>t===e));this.cursor=t<0?0:t;this.render()}handleSpaceToggle(){const e=this.filteredOptions[this.cursor];if(e.selected){e.selected=false;this.render()}else if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices){return this.bell()}else{e.selected=true;this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e;this.updateFilteredOptions()}_(e,t){if(e===" "){this.handleSpaceToggle()}else{this.handleInputChange(e)}}renderInstructions(){return`\nInstructions:\n ${u.arrowUp}/${u.arrowDown}: Highlight option\n ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(e,t,r){let n;if(t.disabled)n=e===r?s.gray().underline(t.title):s.strikethrough().gray(t.title);else n=e===r?s.cyan().underline(t.title):t.title;return(t.selected?s.green(u.radioOn):u.radioOff)+" "+n}renderDoneOrInstructions(){if(this.done){const e=this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");return e}const e=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){e.push(s.yellow(this.warn))}return e.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let e=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){e+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}e+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+e);this.clear=c(e)}}e.exports=AutocompleteMultiselectPrompt},5376:(e,t,r)=>{"use strict";const s=r(7836);const n=r(4632);const i=r(669),o=i.style;const a=r(4577),c=a.erase,l=a.cursor;class ConfirmPrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.value=e.initial;this.initialValue=!!e.initial;this.yesMsg=e.yes||"yes";this.yesOption=e.yesOption||"(Y/n)";this.noMsg=e.no||"no";this.noOption=e.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(e,t){if(e.toLowerCase()==="y"){this.value=true;return this.submit()}if(e.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);super.render();this.out.write(c.line+l.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}e.exports=ConfirmPrompt},1300:(e,t,r)=>{"use strict";function asyncGeneratorStep(e,t,r,s,n,i,o){try{var a=e[i](o);var c=a.value}catch(e){r(e);return}if(a.done){t(c)}else{Promise.resolve(c).then(s,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(s,n){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,s,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,s,n,_next,_throw,"throw",e)}_next(undefined)}))}}const s=r(7836);const n=r(4632);const i=r(669),o=i.style,a=i.clear,c=i.figures,l=i.strip;const u=r(4577),h=u.erase,d=u.cursor;const p=r(1442),m=p.DatePart,y=p.Meridiem,g=p.Day,v=p.Hours,b=p.Milliseconds,w=p.Minutes,E=p.Month,S=p.Seconds,x=p.Year;const R=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const P={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new g(e),3:e=>new E(e),4:e=>new x(e),5:e=>new y(e),6:e=>new v(e),7:e=>new w(e),8:e=>new S(e),9:e=>new b(e)};const O={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.cursor=0;this.typed="";this.locales=Object.assign(O,e.locales);this._date=e.initial||new Date;this.errorMsg=e.error||"Please Enter A Valid Value";this.validator=e.validate||(()=>true);this.mask=e.mask||"YYYY-MM-DD HH:mm:ss";this.clear=a("");this.render()}get value(){return this.date}get date(){return this._date}set date(e){if(e)this._date.setTime(e.getTime())}set mask(e){let t;this.parts=[];while(t=R.exec(e)){let e=t.shift();let r=t.findIndex((e=>e!=null));this.parts.push(r in P?P[r]({token:t[r]||e,date:this.date,parts:this.parts,locales:this.locales}):t[r]||e)}let r=this.parts.reduce(((e,t)=>{if(typeof t==="string"&&typeof e[e.length-1]==="string")e[e.length-1]+=t;else e.push(t);return e}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(e){this.typed="";this.cursor=e;this.fire()}reset(){this.moveCursor(this.parts.findIndex((e=>e instanceof m)));this.fire();this.render()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var e=this;return _asyncToGenerator((function*(){let t=yield e.validator(e.value);if(typeof t==="string"){e.errorMsg=t;t=false}e.error=!t}))()}submit(){var e=this;return _asyncToGenerator((function*(){yield e.validate();if(e.error){e.color="red";e.fire();e.render();return}e.done=true;e.aborted=false;e.fire();e.render();e.out.write("\n");e.close()}))()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e));this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e));this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex((e=>e instanceof m)));this.render()}_(e){if(/\d/.test(e)){this.typed+=e;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(h.lines(1));super.render();let e=h.line+(this.lines?h.down(this.lines):"")+d.to(0);this.lines=0;let t="";if(this.error){let e=this.errorMsg.split("\n");t=e.reduce(((e,t,r)=>e+`\n${r?` `:c.pointerSmall} ${s.red().italic(t)}`),``);this.lines=e.length}let r=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.parts.reduce(((e,t,r)=>e.concat(r===this.cursor&&!this.done?s.cyan().underline(t.toString()):t)),[]).join("")].join(" ");let n="";if(this.lines){n+=d.up(this.lines);n+=d.left+d.to(l(r).length)}this.out.write(e+r+t+n)}}e.exports=DatePrompt},5960:(e,t,r)=>{"use strict";e.exports={TextPrompt:r(4665),SelectPrompt:r(8744),TogglePrompt:r(3666),DatePrompt:r(1300),NumberPrompt:r(6544),MultiselectPrompt:r(8056),AutocompletePrompt:r(3475),AutocompleteMultiselectPrompt:r(8819),ConfirmPrompt:r(5376)}},8056:(e,t,r)=>{"use strict";const s=r(7836);const n=r(4577),i=n.cursor;const o=r(4632);const a=r(669),c=a.clear,l=a.figures,u=a.style;class MultiselectPrompt extends o{constructor(e={}){super(e);this.msg=e.message;this.cursor=e.cursor||0;this.scrollIndex=e.cursor||0;this.hint=e.hint||"";this.warn=e.warn||"- This option is disabled -";this.minSelected=e.min;this.showMinError=false;this.maxChoices=e.max;this.value=e.choices.map(((e,t)=>{if(typeof e==="string")e={title:e,value:t};return{title:e&&(e.title||e.value||e),value:e&&(e.value||t),selected:e&&e.selected,disabled:e&&e.disabled}}));this.clear=c("");if(!e.overrideRender){this.render()}}reset(){this.value.map((e=>!e.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((e=>e.selected))}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const e=this.value.filter((e=>e.selected));if(this.minSelected&&e.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const e=this.value[this.cursor];if(e.selected){e.selected=false;this.render()}else if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices){return this.bell()}else{e.selected=true;this.render()}}_(e,t){if(e===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${l.arrowUp}/${l.arrowDown}: Highlight option\n ${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(e,t,r){let n;if(t.disabled)n=e===r?s.gray().underline(t.title):s.strikethrough().gray(t.title);else n=e===r?s.cyan().underline(t.title):t.title;return(t.selected?s.green(l.radioOn):l.radioOff)+" "+n}paginateOptions(e){const t=this.cursor;let r=e.map(((e,r)=>this.renderOption(t,e,r)));const n=10;let i=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>n){let a=t-n/2;let c=t+n/2;if(a<0){a=0;c=n}else if(c>e.length){c=e.length;a=c-n}i=r.slice(a,c);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+i.join("\n")+"\n"+o}renderOptions(e){if(!this.done){return this.paginateOptions(e)}return""}renderDoneOrInstructions(){if(this.done){const e=this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");return e}const e=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){e.push(s.yellow(this.warn))}return e.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let e=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){e+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}e+=this.renderOptions(this.value);this.out.write(this.clear+e);this.clear=c(e)}}e.exports=MultiselectPrompt},6544:(e,t,r)=>{"use strict";function asyncGeneratorStep(e,t,r,s,n,i,o){try{var a=e[i](o);var c=a.value}catch(e){r(e);return}if(a.done){t(c)}else{Promise.resolve(c).then(s,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(s,n){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,s,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,s,n,_next,_throw,"throw",e)}_next(undefined)}))}}const s=r(7836);const n=r(4632);const i=r(4577),o=i.cursor,a=i.erase;const c=r(669),l=c.style,u=c.clear,h=c.figures,d=c.strip;const p=/[0-9]/;const isDef=e=>e!==undefined;const round=(e,t)=>{let r=Math.pow(10,t);return Math.round(e*r)/r};class NumberPrompt extends n{constructor(e={}){super(e);this.transform=l.render(e.style);this.msg=e.message;this.initial=isDef(e.initial)?e.initial:"";this.float=!!e.float;this.round=e.round||2;this.inc=e.increment||1;this.min=isDef(e.min)?e.min:-Infinity;this.max=isDef(e.max)?e.max:Infinity;this.errorMsg=e.error||`Please Enter A Valid Value`;this.validator=e.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(e){if(!e&&e!==0){this.placeholder=true;this.rendered=s.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(e,this.round)}`);this._value=round(e,this.round)}this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e===`-`||e===`.`&&this.float||p.test(e)}reset(){this.typed=``;this.value=``;this.fire();this.render()}abort(){let e=this.value;this.value=e!==``?e:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}validate(){var e=this;return _asyncToGenerator((function*(){let t=yield e.validator(e.value);if(typeof t===`string`){e.errorMsg=t;t=false}e.error=!t}))()}submit(){var e=this;return _asyncToGenerator((function*(){yield e.validate();if(e.error){e.color=`red`;e.fire();e.render();return}let t=e.value;e.value=t!==``?t:e.initial;e.done=true;e.aborted=false;e.error=false;e.fire();e.render();e.out.write(`\n`);e.close()}))()}up(){this.typed=``;if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(e,t){if(!this.valid(e))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=e;this.lastHit=r;this.color=`cyan`;if(e===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;super.render();let e=a.line+(this.lines?a.down(this.lines):``)+o.to(0);this.lines=0;let t=``;if(this.error){let e=this.errorMsg.split(`\n`);t+=e.reduce(((e,t,r)=>e+`\n${r?` `:h.pointerSmall} ${s.red().italic(t)}`),``);this.lines=e.length}let r=!this.done||!this.done&&!this.placeholder;let n=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let i=``;if(this.lines){i+=o.up(this.lines);i+=o.left+o.to(d(n).length)}this.out.write(e+n+t+i)}}e.exports=NumberPrompt},4632:(e,t,r)=>{"use strict";const s=r(4521);const n=r(669),i=n.action;const o=r(2361);const a=r(4577),c=a.beep,l=a.cursor;const u=r(7836);class Prompt extends o{constructor(e={}){super();this.firstRender=true;this.in=e.in||process.stdin;this.out=e.out||process.stdout;this.onRender=(e.onRender||(()=>void 0)).bind(this);const t=s.createInterface(this.in);s.emitKeypressEvents(this.in,t);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(e,t)=>{let r=i(t);if(r===false){this._&&this._(e,t)}else if(typeof this[r]==="function"){this[r](t)}else{this.bell()}};this.close=()=>{this.out.write(l.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);t.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(c)}render(){this.onRender(u);if(this.firstRender)this.firstRender=false}}e.exports=Prompt},8744:(e,t,r)=>{"use strict";const s=r(7836);const n=r(4632);const i=r(669),o=i.style,a=i.clear,c=i.figures;const l=r(4577),u=l.erase,h=l.cursor;class SelectPrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.hint=e.hint||"- Use arrow-keys. Return to submit.";this.warn=e.warn||"- This option is disabled";this.cursor=e.initial||0;this.choices=e.choices.map(((e,t)=>{if(typeof e==="string")e={title:e,value:t};return{title:e&&(e.title||e.value||e),value:e&&(e.value||t),selected:e&&e.selected,disabled:e&&e.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=a("");this.render()}moveCursor(e){this.cursor=e;this.value=this.choices[e].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(e,t){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(u.lines(this.choices.length+1));super.render();this.out.write([o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((e,t)=>{let r,n;if(e.disabled){r=this.cursor===t?s.gray().underline(e.title):s.strikethrough().gray(e.title);n=this.cursor===t?s.bold().gray(c.pointer)+" ":" "}else{r=this.cursor===t?s.cyan().underline(e.title):e.title;n=this.cursor===t?s.cyan(c.pointer)+" ":" "}return`${n} ${r}`})).join("\n"))}}}e.exports=SelectPrompt},4665:(e,t,r)=>{"use strict";function asyncGeneratorStep(e,t,r,s,n,i,o){try{var a=e[i](o);var c=a.value}catch(e){r(e);return}if(a.done){t(c)}else{Promise.resolve(c).then(s,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(s,n){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,s,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,s,n,_next,_throw,"throw",e)}_next(undefined)}))}}const s=r(7836);const n=r(4632);const i=r(4577),o=i.cursor;const a=r(669),c=a.style,l=a.clear,u=a.strip,h=a.figures;class TextPrompt extends n{constructor(e={}){super(e);this.transform=c.render(e.style);this.scale=this.transform.scale;this.msg=e.message;this.initial=e.initial||``;this.validator=e.validate||(()=>true);this.value=``;this.errorMsg=e.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.clear=l(``);this.render()}set value(e){if(!e&&this.initial){this.placeholder=true;this.rendered=s.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(e)}this._value=e;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.fire();this.render()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var e=this;return _asyncToGenerator((function*(){let t=yield e.validator(e.value);if(typeof t===`string`){e.errorMsg=t;t=false}e.error=!t}))()}submit(){var e=this;return _asyncToGenerator((function*(){e.value=e.value||e.initial;yield e.validate();if(e.error){e.red=true;e.fire();e.render();return}e.done=true;e.aborted=false;e.fire();e.render();e.out.write("\n");e.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(e){if(this.placeholder)return;this.cursor=this.cursor+e}_(e,t){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${e}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.value.slice(0,this.cursor-1);let t=this.value.slice(this.cursor);this.value=`${e}${t}`;this.red=false;this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor);let t=this.value.slice(this.cursor+1);this.value=`${e}${t}`;this.red=false;this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}render(){if(this.closed)return;super.render();let e=(this.lines?o.down(this.lines):``)+this.clear;this.lines=0;let t=[c.symbol(this.done,this.aborted),s.bold(this.msg),c.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let e=this.errorMsg.split(`\n`);r+=e.reduce(((e,t,r)=>e+=`\n${r?" ":h.pointerSmall} ${s.red().italic(t)}`),``);this.lines=e.length}let n=``;if(this.lines){n+=o.up(this.lines);n+=o.left+o.to(u(t).length)}n+=o.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(e+t+r+n);this.clear=l(t+r)}}e.exports=TextPrompt},3666:(e,t,r)=>{"use strict";const s=r(7836);const n=r(4632);const i=r(669),o=i.style,a=i.clear;const c=r(4577),l=c.cursor,u=c.erase;class TogglePrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.value=!!e.initial;this.active=e.active||"on";this.inactive=e.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(e,t){if(e===" "){this.value=!this.value}else if(e==="1"){this.value=true}else if(e==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);super.render();this.out.write(u.lines(this.first?1:this.msg.split(/\n/g).length)+l.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}e.exports=TogglePrompt},2102:(e,t,r)=>{"use strict";function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};var s=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){s=s.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))}s.forEach((function(t){_defineProperty(e,t,r[t])}))}return e}function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function asyncGeneratorStep(e,t,r,s,n,i,o){try{var a=e[i](o);var c=a.value}catch(e){r(e);return}if(a.done){t(c)}else{Promise.resolve(c).then(s,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(s,n){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,s,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,s,n,_next,_throw,"throw",e)}_next(undefined)}))}}const s=r(8469);const n=["suggest","format","onState","validate","onRender"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(e=[],{onSubmit:t=noop,onCancel:r=noop}={}){const i={};const o=prompt._override||{};e=[].concat(e);let a,c,l,u,h;const d=function(){var e=_asyncToGenerator((function*(e,t,r=false){if(!r&&e.validate&&e.validate(t)!==true){return}return e.format?yield e.format(t,i):t}));return function getFormattedAnswer(t,r){return e.apply(this,arguments)}}();var p=true;var m=false;var y=undefined;try{for(var g=e[Symbol.iterator](),v;!(p=(v=g.next()).done);p=true){c=v.value;var b=c;u=b.name;h=b.type;for(let e in c){if(n.includes(e))continue;let t=c[e];c[e]=typeof t==="function"?yield t(a,_objectSpread({},i),c):t}if(typeof c.message!=="string"){throw new Error("prompt message is required")}var w=c;u=w.name;h=w.type;if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[c.name]!==undefined){a=yield d(c,o[c.name]);if(a!==undefined){i[u]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):yield s[h](c);i[u]=a=yield d(c,a,true);l=yield t(c,a,i)}catch(e){l=!(yield r(c,i))}if(l)return i}}catch(e){m=true;y=e}finally{try{if(!p&&g.return!=null){g.return()}}finally{if(m){throw y}}}return i}));return _prompt.apply(this,arguments)}function getInjectedAnswer(e){const t=e.shift();if(t instanceof Error){throw t}return t}function inject(e){prompt._injected=(prompt._injected||[]).concat(e)}function override(e){prompt._override=Object.assign({},e)}e.exports=Object.assign(prompt,{prompt:prompt,prompts:s,inject:inject,override:override})},8469:(e,t,r)=>{"use strict";const s=t;const n=r(5960);const noop=e=>e;function toPrompt(e,t,r={}){return new Promise(((s,i)=>{const o=new n[e](t);const a=r.onAbort||noop;const c=r.onSubmit||noop;o.on("state",t.onState||noop);o.on("submit",(e=>s(c(e))));o.on("abort",(e=>i(a(e))))}))}s.text=e=>toPrompt("TextPrompt",e);s.password=e=>{e.style="password";return s.text(e)};s.invisible=e=>{e.style="invisible";return s.text(e)};s.number=e=>toPrompt("NumberPrompt",e);s.date=e=>toPrompt("DatePrompt",e);s.confirm=e=>toPrompt("ConfirmPrompt",e);s.list=e=>{const t=e.separator||",";return toPrompt("TextPrompt",e,{onSubmit:e=>e.split(t).map((e=>e.trim()))})};s.toggle=e=>toPrompt("TogglePrompt",e);s.select=e=>toPrompt("SelectPrompt",e);s.multiselect=e=>{e.choices=[].concat(e.choices||[]);const toSelected=e=>e.filter((e=>e.selected)).map((e=>e.value));return toPrompt("MultiselectPrompt",e,{onAbort:toSelected,onSubmit:toSelected})};s.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);const toSelected=e=>e.filter((e=>e.selected)).map((e=>e.value));return toPrompt("AutocompleteMultiselectPrompt",e,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(e,t)=>Promise.resolve(t.filter((t=>t.title.slice(0,e.length).toLowerCase()===e.toLowerCase())));s.autocomplete=e=>{e.suggest=e.suggest||byTitle;e.choices=[].concat(e.choices||[]);return toPrompt("AutocompletePrompt",e)}},5829:e=>{"use strict";e.exports=e=>{if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c")return"abort";if(e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(e.name==="return")return"submit";if(e.name==="enter")return"submit";if(e.name==="backspace")return"delete";if(e.name==="delete")return"deleteForward";if(e.name==="abort")return"abort";if(e.name==="escape")return"abort";if(e.name==="tab")return"next";if(e.name==="pagedown")return"nextPage";if(e.name==="pageup")return"prevPage";if(e.name==="up")return"up";if(e.name==="down")return"down";if(e.name==="right")return"right";if(e.name==="left")return"left";return false}},1155:(e,t,r)=>{"use strict";const s=r(1144);const n=r(4577),i=n.erase,o=n.cursor;const width=e=>[...s(e)].length;e.exports=function(e,t=process.stdout.columns){if(!t)return i.line+o.to(0);let r=0;const s=e.split(/\r?\n/);var n=true;var a=false;var c=undefined;try{for(var l=s[Symbol.iterator](),u;!(n=(u=l.next()).done);n=true){let e=u.value;r+=1+Math.floor(Math.max(width(e)-1,0)/t)}}catch(e){a=true;c=e}finally{try{if(!n&&l.return!=null){l.return()}}finally{if(a){throw c}}}return(i.line+o.prevLine()).repeat(r-1)+i.line+o.to(0)}},1920:e=>{"use strict";const t={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:t;e.exports=s},669:(e,t,r)=>{"use strict";e.exports={action:r(5829),clear:r(1155),style:r(2057),strip:r(1144),figures:r(1920)}},1144:e=>{"use strict";e.exports=e=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(t,"g");return typeof e==="string"?e.replace(r,""):e}},2057:(e,t,r)=>{"use strict";const s=r(7836);const n=r(1920);const i=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"😃".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}});const render=e=>i[e]||i.default;const o=Object.freeze({aborted:s.red(n.cross),done:s.green(n.tick),default:s.cyan("?")});const symbol=(e,t)=>t?o.aborted:e?o.done:o.default;const delimiter=e=>s.gray(e?n.ellipsis:n.pointerSmall);const item=(e,t)=>s.gray(e?t?n.pointerSmall:"+":n.line);e.exports={styles:i,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},9966:(e,t,r)=>{function isNodeLT(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 false;if(e[t]>r[t])return true}return false}e.exports=isNodeLT("8.6.0")?r(2102):r(6515)},8089:e=>{"use strict";class DatePart{constructor({token:e,date:t,parts:r,locales:s}){this.token=e;this.date=t||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const e=this.parts.indexOf(this);return this.parts.find(((t,r)=>r>e&&t instanceof DatePart))}setTo(e){}prev(){let e=[].concat(this.parts).reverse();const t=e.indexOf(this);return e.find(((e,r)=>r>t&&e instanceof DatePart))}toString(){return String(this.date)}}e.exports=DatePart},7164:(e,t,r)=>{"use strict";const s=r(8089);const pos=e=>{e=e%10;return e===1?"st":e===2?"nd":e===3?"rd":"th"};class Day extends s{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate();let t=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+pos(e):this.token==="d"?t+1:this.token==="ddd"?this.locales.weekdaysShort[t]:this.token==="dddd"?this.locales.weekdays[t]:e}}e.exports=Day},1825:(e,t,r)=>{"use strict";const s=r(8089);class Hours extends s{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();if(/h/.test(this.token))e=e%12||12;return this.token.length>1?String(e).padStart(2,"0"):e}}e.exports=Hours},902:(e,t,r)=>{"use strict";e.exports={DatePart:r(8089),Meridiem:r(9857),Day:r(7164),Hours:r(1825),Milliseconds:r(8569),Minutes:r(3409),Month:r(4082),Seconds:r(9521),Year:r(128)}},9857:(e,t,r)=>{"use strict";const s=r(8089);class Meridiem extends s{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}}e.exports=Meridiem},8569:(e,t,r)=>{"use strict";const s=r(8089);class Milliseconds extends s{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}e.exports=Milliseconds},3409:(e,t,r)=>{"use strict";const s=r(8089);class Minutes extends s{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}}e.exports=Minutes},4082:(e,t,r)=>{"use strict";const s=r(8089);class Month extends s{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1;this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth();let t=this.token.length;return t===2?String(e+1).padStart(2,"0"):t===3?this.locales.monthsShort[e]:t===4?this.locales.months[e]:String(e+1)}}e.exports=Month},9521:(e,t,r)=>{"use strict";const s=r(8089);class Seconds extends s{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}}e.exports=Seconds},128:(e,t,r)=>{"use strict";const s=r(8089);class Year extends s{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}}e.exports=Year},3226:(e,t,r)=>{"use strict";const s=r(7836);const n=r(7982);const{cursor:i}=r(4577);const{style:o,clear:a,figures:c,strip:l}=r(7588);const getVal=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]);const getTitle=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]);const getIndex=(e,t)=>{const r=e.findIndex((e=>e.value===t||e.title===t));return r>-1?r:undefined};class AutocompletePrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.suggest=e.suggest;this.choices=e.choices;this.initial=typeof e.initial==="number"?e.initial:getIndex(e.choices,e.initial);this.select=this.initial||e.cursor||0;this.fallback=e.fallback||(e.initial!==undefined?`${c.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${c.pointerSmall} ${e.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=e.limit||10;this.cursor=0;this.transform=o.render(e.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=a("");this.complete(this.render);this.render()}moveSelect(e){this.select=e;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],e)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}async complete(e){const t=this.completing=this.suggest(this.input,this.choices);const r=await t;if(this.completing!==t)return;this.suggestions=r.map(((e,t,r)=>({title:getTitle(r,t),value:getVal(r,t)}))).reduce(((e,t)=>{if(e[e.length-1].length<this.limit)e[e.length-1].push(t);else e.push([t]);return e}),[[]]);this.isFallback=false;this.completing=false;if(!this.suggestions[this.page])this.page=0;if(!this.suggestions.length&&this.fallback){const e=getIndex(this.choices,this.fallback);this.suggestions=[[]];if(e!==undefined)this.suggestions[0].push({title:getTitle(this.choices,e),value:getVal(this.choices,e)});this.isFallback=true}const s=Math.max(r.length-1,0);this.moveSelect(Math.min(s,this.select));e&&e()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(e,t){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${e}${s}`;this.cursor=r.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1);let t=this.input.slice(this.cursor);this.input=`${e}${t}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor);let t=this.input.slice(this.cursor+1);this.input=`${e}${t}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(0);this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(i.down(this.lineCount));let e=s.bold(`${o.symbol(this.done,this.aborted)} ${this.msg} `)+`${o.delimiter(this.completing)} `;let t=l(e).length;if(this.done&&this.suggestions[this.page][this.select]){e+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;t+=this.rendered.length;e+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let t=this.suggestions[this.page].reduce(((e,t,r)=>e+`\n${r===this.select?s.cyan(t.title):t.title}`),"");if(t&&!this.isFallback){e+=t;if(this.suggestions.length>1){this.lineCount++;e+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const t=getIndex(this.choices,this.fallback);const r=t!==undefined?getTitle(this.choices,t):this.fallback;e+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+e);this.clear=a(e);if(this.lineCount&&!this.done){let e=i.up(this.lineCount);e+=i.left+i.to(t);e+=i.move(-this.rendered.length+this.cursor*this.scale);this.out.write(e)}}}e.exports=AutocompletePrompt},9677:(e,t,r)=>{"use strict";const s=r(7836);const{cursor:n}=r(4577);const i=r(7954);const{clear:o,style:a,figures:c}=r(7588);class AutocompleteMultiselectPrompt extends i{constructor(e={}){e.overrideRender=true;super(e);this.inputValue="";this.clear=o("");this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((e=>{if(this.inputValue){if(typeof e.title==="string"){if(e.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof e.value==="string"){if(e.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const t=this.filteredOptions.findIndex((t=>t===e));this.cursor=t<0?0:t;this.render()}handleSpaceToggle(){const e=this.filteredOptions[this.cursor];if(e.selected){e.selected=false;this.render()}else if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices){return this.bell()}else{e.selected=true;this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e;this.updateFilteredOptions()}_(e,t){if(e===" "){this.handleSpaceToggle()}else{this.handleInputChange(e)}}renderInstructions(){return`\nInstructions:\n ${c.arrowUp}/${c.arrowDown}: Highlight option\n ${c.arrowLeft}/${c.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(e,t,r){let n;if(t.disabled)n=e===r?s.gray().underline(t.title):s.strikethrough().gray(t.title);else n=e===r?s.cyan().underline(t.title):t.title;return(t.selected?s.green(c.radioOn):c.radioOff)+" "+n}renderDoneOrInstructions(){if(this.done){const e=this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");return e}const e=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){e.push(s.yellow(this.warn))}return e.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let e=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){e+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}e+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+e);this.clear=o(e)}}e.exports=AutocompleteMultiselectPrompt},5729:(e,t,r)=>{const s=r(7836);const n=r(7982);const{style:i}=r(7588);const{erase:o,cursor:a}=r(4577);class ConfirmPrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.value=e.initial;this.initialValue=!!e.initial;this.yesMsg=e.yes||"yes";this.yesOption=e.yesOption||"(Y/n)";this.noMsg=e.no||"no";this.noOption=e.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(e,t){if(e.toLowerCase()==="y"){this.value=true;return this.submit()}if(e.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();this.out.write(o.line+a.to(0)+[i.symbol(this.done,this.aborted),s.bold(this.msg),i.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}e.exports=ConfirmPrompt},5969:(e,t,r)=>{"use strict";const s=r(7836);const n=r(7982);const{style:i,clear:o,figures:a,strip:c}=r(7588);const{erase:l,cursor:u}=r(4577);const{DatePart:h,Meridiem:d,Day:p,Hours:m,Milliseconds:y,Minutes:g,Month:v,Seconds:b,Year:w}=r(902);const E=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const S={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new p(e),3:e=>new v(e),4:e=>new w(e),5:e=>new d(e),6:e=>new m(e),7:e=>new g(e),8:e=>new b(e),9:e=>new y(e)};const x={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.cursor=0;this.typed="";this.locales=Object.assign(x,e.locales);this._date=e.initial||new Date;this.errorMsg=e.error||"Please Enter A Valid Value";this.validator=e.validate||(()=>true);this.mask=e.mask||"YYYY-MM-DD HH:mm:ss";this.clear=o("");this.render()}get value(){return this.date}get date(){return this._date}set date(e){if(e)this._date.setTime(e.getTime())}set mask(e){let t;this.parts=[];while(t=E.exec(e)){let e=t.shift();let r=t.findIndex((e=>e!=null));this.parts.push(r in S?S[r]({token:t[r]||e,date:this.date,parts:this.parts,locales:this.locales}):t[r]||e)}let r=this.parts.reduce(((e,t)=>{if(typeof t==="string"&&typeof e[e.length-1]==="string")e[e.length-1]+=t;else e.push(t);return e}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(e){this.typed="";this.cursor=e;this.fire()}reset(){this.moveCursor(this.parts.findIndex((e=>e instanceof h)));this.fire();this.render()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let e=await this.validator(this.value);if(typeof e==="string"){this.errorMsg=e;e=false}this.error=!e}async submit(){await this.validate();if(this.error){this.color="red";this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e));this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e));this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex((e=>e instanceof h)));this.render()}_(e){if(/\d/.test(e)){this.typed+=e;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(l.lines(1));super.render();let e=l.line+(this.lines?l.down(this.lines):"")+u.to(0);this.lines=0;let t="";if(this.error){let e=this.errorMsg.split("\n");t=e.reduce(((e,t,r)=>e+`\n${r?` `:a.pointerSmall} ${s.red().italic(t)}`),``);this.lines=e.length}let r=[i.symbol(this.done,this.aborted),s.bold(this.msg),i.delimiter(false),this.parts.reduce(((e,t,r)=>e.concat(r===this.cursor&&!this.done?s.cyan().underline(t.toString()):t)),[]).join("")].join(" ");let n="";if(this.lines){n+=u.up(this.lines);n+=u.left+u.to(c(r).length)}this.out.write(e+r+t+n)}}e.exports=DatePrompt},2392:(e,t,r)=>{"use strict";e.exports={TextPrompt:r(3195),SelectPrompt:r(539),TogglePrompt:r(2401),DatePrompt:r(5969),NumberPrompt:r(429),MultiselectPrompt:r(7954),AutocompletePrompt:r(3226),AutocompleteMultiselectPrompt:r(9677),ConfirmPrompt:r(5729)}},7954:(e,t,r)=>{"use strict";const s=r(7836);const{cursor:n}=r(4577);const i=r(7982);const{clear:o,figures:a,style:c}=r(7588);class MultiselectPrompt extends i{constructor(e={}){super(e);this.msg=e.message;this.cursor=e.cursor||0;this.scrollIndex=e.cursor||0;this.hint=e.hint||"";this.warn=e.warn||"- This option is disabled -";this.minSelected=e.min;this.showMinError=false;this.maxChoices=e.max;this.value=e.choices.map(((e,t)=>{if(typeof e==="string")e={title:e,value:t};return{title:e&&(e.title||e.value||e),value:e&&(e.value||t),selected:e&&e.selected,disabled:e&&e.disabled}}));this.clear=o("");if(!e.overrideRender){this.render()}}reset(){this.value.map((e=>!e.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((e=>e.selected))}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const e=this.value.filter((e=>e.selected));if(this.minSelected&&e.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((e=>e.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const e=this.value[this.cursor];if(e.selected){e.selected=false;this.render()}else if(e.disabled||this.value.filter((e=>e.selected)).length>=this.maxChoices){return this.bell()}else{e.selected=true;this.render()}}_(e,t){if(e===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${a.arrowUp}/${a.arrowDown}: Highlight option\n ${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(e,t,r){let n;if(t.disabled)n=e===r?s.gray().underline(t.title):s.strikethrough().gray(t.title);else n=e===r?s.cyan().underline(t.title):t.title;return(t.selected?s.green(a.radioOn):a.radioOff)+" "+n}paginateOptions(e){const t=this.cursor;let r=e.map(((e,r)=>this.renderOption(t,e,r)));const n=10;let i=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>n){let a=t-n/2;let c=t+n/2;if(a<0){a=0;c=n}else if(c>e.length){c=e.length;a=c-n}i=r.slice(a,c);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+i.join("\n")+"\n"+o}renderOptions(e){if(!this.done){return this.paginateOptions(e)}return""}renderDoneOrInstructions(){if(this.done){const e=this.value.filter((e=>e.selected)).map((e=>e.title)).join(", ");return e}const e=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){e.push(s.yellow(this.warn))}return e.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let e=[c.symbol(this.done,this.aborted),s.bold(this.msg),c.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){e+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}e+=this.renderOptions(this.value);this.out.write(this.clear+e);this.clear=o(e)}}e.exports=MultiselectPrompt},429:(e,t,r)=>{const s=r(7836);const n=r(7982);const{cursor:i,erase:o}=r(4577);const{style:a,clear:c,figures:l,strip:u}=r(7588);const h=/[0-9]/;const isDef=e=>e!==undefined;const round=(e,t)=>{let r=Math.pow(10,t);return Math.round(e*r)/r};class NumberPrompt extends n{constructor(e={}){super(e);this.transform=a.render(e.style);this.msg=e.message;this.initial=isDef(e.initial)?e.initial:"";this.float=!!e.float;this.round=e.round||2;this.inc=e.increment||1;this.min=isDef(e.min)?e.min:-Infinity;this.max=isDef(e.max)?e.max:Infinity;this.errorMsg=e.error||`Please Enter A Valid Value`;this.validator=e.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(e){if(!e&&e!==0){this.placeholder=true;this.rendered=s.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(e,this.round)}`);this._value=round(e,this.round)}this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e===`-`||e===`.`&&this.float||h.test(e)}reset(){this.typed=``;this.value=``;this.fire();this.render()}abort(){let e=this.value;this.value=e!==``?e:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}async validate(){let e=await this.validator(this.value);if(typeof e===`string`){this.errorMsg=e;e=false}this.error=!e}async submit(){await this.validate();if(this.error){this.color=`red`;this.fire();this.render();return}let e=this.value;this.value=e!==``?e:this.initial;this.done=true;this.aborted=false;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}up(){this.typed=``;if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(e,t){if(!this.valid(e))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=e;this.lastHit=r;this.color=`cyan`;if(e===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;super.render();let e=o.line+(this.lines?o.down(this.lines):``)+i.to(0);this.lines=0;let t=``;if(this.error){let e=this.errorMsg.split(`\n`);t+=e.reduce(((e,t,r)=>e+`\n${r?` `:l.pointerSmall} ${s.red().italic(t)}`),``);this.lines=e.length}let r=!this.done||!this.done&&!this.placeholder;let n=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let c=``;if(this.lines){c+=i.up(this.lines);c+=i.left+i.to(u(n).length)}this.out.write(e+n+t+c)}}e.exports=NumberPrompt},7982:(e,t,r)=>{"use strict";const s=r(4521);const{action:n}=r(7588);const i=r(2361);const{beep:o,cursor:a}=r(4577);const c=r(7836);class Prompt extends i{constructor(e={}){super();this.firstRender=true;this.in=e.in||process.stdin;this.out=e.out||process.stdout;this.onRender=(e.onRender||(()=>void 0)).bind(this);const t=s.createInterface(this.in);s.emitKeypressEvents(this.in,t);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(e,t)=>{let r=n(t);if(r===false){this._&&this._(e,t)}else if(typeof this[r]==="function"){this[r](t)}else{this.bell()}};this.close=()=>{this.out.write(a.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);t.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(o)}render(){this.onRender(c);if(this.firstRender)this.firstRender=false}}e.exports=Prompt},539:(e,t,r)=>{"use strict";const s=r(7836);const n=r(7982);const{style:i,clear:o,figures:a}=r(7588);const{erase:c,cursor:l}=r(4577);class SelectPrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.hint=e.hint||"- Use arrow-keys. Return to submit.";this.warn=e.warn||"- This option is disabled";this.cursor=e.initial||0;this.choices=e.choices.map(((e,t)=>{if(typeof e==="string")e={title:e,value:t};return{title:e&&(e.title||e.value||e),value:e&&(e.value||t),selected:e&&e.selected,disabled:e&&e.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=o("");this.render()}moveCursor(e){this.cursor=e;this.value=this.choices[e].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(e,t){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);else this.out.write(c.lines(this.choices.length+1));super.render();this.out.write([i.symbol(this.done,this.aborted),s.bold(this.msg),i.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((e,t)=>{let r,n;if(e.disabled){r=this.cursor===t?s.gray().underline(e.title):s.strikethrough().gray(e.title);n=this.cursor===t?s.bold().gray(a.pointer)+" ":" "}else{r=this.cursor===t?s.cyan().underline(e.title):e.title;n=this.cursor===t?s.cyan(a.pointer)+" ":" "}return`${n} ${r}`})).join("\n"))}}}e.exports=SelectPrompt},3195:(e,t,r)=>{const s=r(7836);const n=r(7982);const{cursor:i}=r(4577);const{style:o,clear:a,strip:c,figures:l}=r(7588);class TextPrompt extends n{constructor(e={}){super(e);this.transform=o.render(e.style);this.scale=this.transform.scale;this.msg=e.message;this.initial=e.initial||``;this.validator=e.validate||(()=>true);this.value=``;this.errorMsg=e.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.clear=a(``);this.render()}set value(e){if(!e&&this.initial){this.placeholder=true;this.rendered=s.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(e)}this._value=e;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.fire();this.render()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let e=await this.validator(this.value);if(typeof e===`string`){this.errorMsg=e;e=false}this.error=!e}async submit(){this.value=this.value||this.initial;await this.validate();if(this.error){this.red=true;this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(e){if(this.placeholder)return;this.cursor=this.cursor+e}_(e,t){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${e}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.value.slice(0,this.cursor-1);let t=this.value.slice(this.cursor);this.value=`${e}${t}`;this.red=false;this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor);let t=this.value.slice(this.cursor+1);this.value=`${e}${t}`;this.red=false;this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}render(){if(this.closed)return;super.render();let e=(this.lines?i.down(this.lines):``)+this.clear;this.lines=0;let t=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let e=this.errorMsg.split(`\n`);r+=e.reduce(((e,t,r)=>e+=`\n${r?" ":l.pointerSmall} ${s.red().italic(t)}`),``);this.lines=e.length}let n=``;if(this.lines){n+=i.up(this.lines);n+=i.left+i.to(c(t).length)}n+=i.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(e+t+r+n);this.clear=a(t+r)}}e.exports=TextPrompt},2401:(e,t,r)=>{const s=r(7836);const n=r(7982);const{style:i,clear:o}=r(7588);const{cursor:a,erase:c}=r(4577);class TogglePrompt extends n{constructor(e={}){super(e);this.msg=e.message;this.value=!!e.initial;this.active=e.active||"on";this.inactive=e.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(e,t){if(e===" "){this.value=!this.value}else if(e==="1"){this.value=true}else if(e==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();this.out.write(c.lines(this.first?1:this.msg.split(/\n/g).length)+a.to(0)+[i.symbol(this.done,this.aborted),s.bold(this.msg),i.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}e.exports=TogglePrompt},6515:(e,t,r)=>{"use strict";const s=r(2526);const n=["suggest","format","onState","validate","onRender"];const noop=()=>{};async function prompt(e=[],{onSubmit:t=noop,onCancel:r=noop}={}){const i={};const o=prompt._override||{};e=[].concat(e);let a,c,l,u,h;const getFormattedAnswer=async(e,t,r=false)=>{if(!r&&e.validate&&e.validate(t)!==true){return}return e.format?await e.format(t,i):t};for(c of e){({name:u,type:h}=c);for(let e in c){if(n.includes(e))continue;let t=c[e];c[e]=typeof t==="function"?await t(a,{...i},c):t}if(typeof c.message!=="string"){throw new Error("prompt message is required")}({name:u,type:h}=c);if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[c.name]!==undefined){a=await getFormattedAnswer(c,o[c.name]);if(a!==undefined){i[u]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):await s[h](c);i[u]=a=await getFormattedAnswer(c,a,true);l=await t(c,a,i)}catch(e){l=!await r(c,i)}if(l)return i}return i}function getInjectedAnswer(e){const t=e.shift();if(t instanceof Error){throw t}return t}function inject(e){prompt._injected=(prompt._injected||[]).concat(e)}function override(e){prompt._override=Object.assign({},e)}e.exports=Object.assign(prompt,{prompt:prompt,prompts:s,inject:inject,override:override})},2526:(e,t,r)=>{"use strict";const s=t;const n=r(2392);const noop=e=>e;function toPrompt(e,t,r={}){return new Promise(((s,i)=>{const o=new n[e](t);const a=r.onAbort||noop;const c=r.onSubmit||noop;o.on("state",t.onState||noop);o.on("submit",(e=>s(c(e))));o.on("abort",(e=>i(a(e))))}))}s.text=e=>toPrompt("TextPrompt",e);s.password=e=>{e.style="password";return s.text(e)};s.invisible=e=>{e.style="invisible";return s.text(e)};s.number=e=>toPrompt("NumberPrompt",e);s.date=e=>toPrompt("DatePrompt",e);s.confirm=e=>toPrompt("ConfirmPrompt",e);s.list=e=>{const t=e.separator||",";return toPrompt("TextPrompt",e,{onSubmit:e=>e.split(t).map((e=>e.trim()))})};s.toggle=e=>toPrompt("TogglePrompt",e);s.select=e=>toPrompt("SelectPrompt",e);s.multiselect=e=>{e.choices=[].concat(e.choices||[]);const toSelected=e=>e.filter((e=>e.selected)).map((e=>e.value));return toPrompt("MultiselectPrompt",e,{onAbort:toSelected,onSubmit:toSelected})};s.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);const toSelected=e=>e.filter((e=>e.selected)).map((e=>e.value));return toPrompt("AutocompleteMultiselectPrompt",e,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(e,t)=>Promise.resolve(t.filter((t=>t.title.slice(0,e.length).toLowerCase()===e.toLowerCase())));s.autocomplete=e=>{e.suggest=e.suggest||byTitle;e.choices=[].concat(e.choices||[]);return toPrompt("AutocompletePrompt",e)}},1608:e=>{"use strict";e.exports=e=>{if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c")return"abort";if(e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(e.name==="return")return"submit";if(e.name==="enter")return"submit";if(e.name==="backspace")return"delete";if(e.name==="delete")return"deleteForward";if(e.name==="abort")return"abort";if(e.name==="escape")return"abort";if(e.name==="tab")return"next";if(e.name==="pagedown")return"nextPage";if(e.name==="pageup")return"prevPage";if(e.name==="up")return"up";if(e.name==="down")return"down";if(e.name==="right")return"right";if(e.name==="left")return"left";return false}},1129:(e,t,r)=>{"use strict";const s=r(7398);const{erase:n,cursor:i}=r(4577);const width=e=>[...s(e)].length;e.exports=function(e,t=process.stdout.columns){if(!t)return n.line+i.to(0);let r=0;const s=e.split(/\r?\n/);for(let e of s){r+=1+Math.floor(Math.max(width(e)-1,0)/t)}return(n.line+i.prevLine()).repeat(r-1)+n.line+i.to(0)}},2536:e=>{"use strict";const t={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:t;e.exports=s},7588:(e,t,r)=>{"use strict";e.exports={action:r(1608),clear:r(1129),style:r(33),strip:r(7398),figures:r(2536)}},7398:e=>{"use strict";e.exports=e=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(t,"g");return typeof e==="string"?e.replace(r,""):e}},33:(e,t,r)=>{"use strict";const s=r(7836);const n=r(2536);const i=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"😃".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}});const render=e=>i[e]||i.default;const o=Object.freeze({aborted:s.red(n.cross),done:s.green(n.tick),default:s.cyan("?")});const symbol=(e,t)=>t?o.aborted:e?o.done:o.default;const delimiter=e=>s.gray(e?n.ellipsis:n.pointerSmall);const item=(e,t)=>s.gray(e?t?n.pointerSmall:"+":n.line);e.exports={styles:i,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},1619:(e,t,r)=>{var s=r(9852);var n=r(1014);var i=r(7147);var noop=function(){};var o=/^v?\.0/.test(process.version);var isFn=function(e){return typeof e==="function"};var isFS=function(e){if(!o)return false;if(!i)return false;return(e instanceof(i.ReadStream||noop)||e instanceof(i.WriteStream||noop))&&isFn(e.close)};var isRequest=function(e){return e.setHeader&&isFn(e.abort)};var destroyer=function(e,t,r,i){i=s(i);var o=false;e.on("close",(function(){o=true}));n(e,{readable:t,writable:r},(function(e){if(e)return i(e);o=true;i()}));var a=false;return function(t){if(o)return;if(a)return;a=true;if(isFS(e))return e.close(noop);if(isRequest(e))return e.abort();if(isFn(e.destroy))return e.destroy();i(t||new Error("stream was destroyed"))}};var call=function(e){e()};var pipe=function(e,t){return e.pipe(t)};var pump=function(){var e=Array.prototype.slice.call(arguments);var t=isFn(e[e.length-1]||noop)&&e.pop()||noop;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var r;var s=e.map((function(n,i){var o=i<e.length-1;var a=i>0;return destroyer(n,o,a,(function(e){if(!r)r=e;if(e)s.forEach(call);if(o)return;s.forEach(call);t(r)}))}));return e.reduce(pipe)};e.exports=pump},592:e=>{
61
61
  /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
62
- let t;e.exports=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:global):e=>(t||(t=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))},4446:(e,t,r)=>{var s=r(3574);var n=r(1017).join;var i=r(7360);var o="/etc";var a=process.platform==="win32";var c=a?process.env.USERPROFILE:process.env.HOME;e.exports=function(e,t,l,u){if("string"!==typeof e)throw new Error("rc(name): name *must* be string");if(!l)l=r(1254)(process.argv.slice(2));t=("string"===typeof t?s.json(t):t)||{};u=u||s.parse;var h=s.env(e+"_");var d=[t];var p=[];function addConfigFile(e){if(p.indexOf(e)>=0)return;var t=s.file(e);if(t){d.push(u(t));p.push(e)}}if(!a)[n(o,e,"config"),n(o,e+"rc")].forEach(addConfigFile);if(c)[n(c,".config",e,"config"),n(c,".config",e),n(c,"."+e,"config"),n(c,"."+e+"rc")].forEach(addConfigFile);addConfigFile(s.find("."+e+"rc"));if(h.config)addConfigFile(h.config);if(l.config)addConfigFile(l.config);return i.apply(null,d.concat([h,l,p.length?{configs:p,config:p[p.length-1]}:undefined]))}},3574:(e,t,r)=>{"use strict";var s=r(7147);var n=r(7036);var i=r(1017);var o=r(2251);var a=t.parse=function(e){if(/^\s*{/.test(e))return JSON.parse(o(e));return n.parse(e)};var c=t.file=function(){var e=[].slice.call(arguments).filter((function(e){return e!=null}));for(var t in e)if("string"!==typeof e[t])return;var r=i.join.apply(null,e);var n;try{return s.readFileSync(r,"utf-8")}catch(e){return}};var l=t.json=function(){var e=c.apply(null,arguments);return e?a(e):null};var u=t.env=function(e,t){t=t||process.env;var r={};var s=e.length;for(var n in t){if(n.toLowerCase().indexOf(e.toLowerCase())===0){var i=n.substring(s).split("__");var o;while((o=i.indexOf(""))>-1){i.splice(o,1)}var a=r;i.forEach((function _buildSubObj(e,r){if(!e||typeof a!=="object")return;if(r===i.length-1)a[e]=t[n];if(a[e]===undefined)a[e]={};a=a[e]}))}}return r};var h=t.find=function(){var e=i.join.apply(null,[].slice.call(arguments));function find(e,t){var r=i.join(e,t);try{s.statSync(r);return r}catch(r){if(i.dirname(e)!==e)return find(i.dirname(e),t)}}return find(process.cwd(),e)}},1913:(e,t,r)=>{const s=r(5055).Buffer;function decodeBase64(e){return s.from(e,"base64").toString("utf8")}function encodeBase64(e){return s.from(e,"utf8").toString("base64")}e.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},1281:(e,t,r)=>{var s=r(7310);var n=r(1913);var i=n.decodeBase64;var o=n.encodeBase64;var a=":_authToken";var c=":username";var l=":_password";e.exports=function(){var e;var t;if(arguments.length>=2){e=arguments[0];t=arguments[1]}else if(typeof arguments[0]==="string"){e=arguments[0]}else{t=arguments[0]}t=t||{};t.npmrc=t.npmrc||r(4446)("npm",{registry:"https://registry.npmjs.org/"});e=e||t.npmrc.registry;return getRegistryAuthInfo(e,t)||getLegacyAuthInfo(t.npmrc)};function getRegistryAuthInfo(e,t){var r=s.parse(e,false,true);var n;while(n!=="/"&&r.pathname!==n){n=r.pathname||"/";var i="//"+r.host+n.replace(/\/$/,"");var o=getAuthInfoForUrl(i,t.npmrc);if(o){return o}if(!t.recursive){return/\/$/.test(e)?undefined:getRegistryAuthInfo(s.resolve(e,"."),t)}r.pathname=s.resolve(normalizePath(n),"..")||"/"}return undefined}function getLegacyAuthInfo(e){if(e._auth){return{token:e._auth,type:"Basic"}}return undefined}function normalizePath(e){return e[e.length-1]==="/"?e:e+"/"}function getAuthInfoForUrl(e,t){var r=getBearerToken(t[e+a]||t[e+"/"+a]);if(r){return r}var s=t[e+c]||t[e+"/"+c];var n=t[e+l]||t[e+"/"+l];var i=getTokenForUsernameAndPassword(s,n);if(i){return i}return undefined}function getBearerToken(e){if(!e){return undefined}var t=e.replace(/^\$\{?([^}]*)\}?$/,(function(e,t){return process.env[t]}));return{token:t,type:"Bearer"}}function getTokenForUsernameAndPassword(e,t){if(!e||!t){return undefined}var r=i(t.replace(/^\$\{?([^}]*)\}?$/,(function(e,t){return process.env[t]})));var s=o(e+":"+r);return{token:s,type:"Basic",password:r,username:e}}},9074:(e,t,r)=>{"use strict";e.exports=function(e){var t=r(4446)("npm",{registry:"https://registry.npmjs.org/"});var s=t[e+":registry"]||t.registry;return s.slice(-1)==="/"?s:s+"/"}},5810:(e,t,r)=>{"use strict";const s=r(2781).Readable;const n=r(4162);class Response extends s{constructor(e,t,r,s){if(typeof e!=="number"){throw new TypeError("Argument `statusCode` should be a number")}if(typeof t!=="object"){throw new TypeError("Argument `headers` should be an object")}if(!(r instanceof Buffer)){throw new TypeError("Argument `body` should be a buffer")}if(typeof s!=="string"){throw new TypeError("Argument `url` should be a string")}super();this.statusCode=e;this.headers=n(t);this.body=r;this.url=s}_read(){this.push(this.body);this.push(null)}}e.exports=Response},6862:(e,t,r)=>{e.exports=r(6097)},6097:(e,t,r)=>{var s=r(6848);t.operation=function(e){var r=t.timeouts(e);return new s(r,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};t.timeouts=function(e){if(e instanceof Array){return[].concat(e)}var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false};for(var r in e){t[r]=e[r]}if(t.minTimeout>t.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var s=[];for(var n=0;n<t.retries;n++){s.push(this.createTimeout(n,t))}if(e&&e.forever&&!s.length){s.push(this.createTimeout(n,t))}s.sort((function(e,t){return e-t}));return s};t.createTimeout=function(e,t){var r=t.randomize?Math.random()+1:1;var s=Math.round(r*t.minTimeout*Math.pow(t.factor,e));s=Math.min(s,t.maxTimeout);return s};t.wrap=function(e,r,s){if(r instanceof Array){s=r;r=null}if(!s){s=[];for(var n in e){if(typeof e[n]==="function"){s.push(n)}}}for(var i=0;i<s.length;i++){var o=s[i];var a=e[o];e[o]=function retryWrapper(s){var n=t.operation(r);var i=Array.prototype.slice.call(arguments,1);var o=i.pop();i.push((function(e){if(n.retry(e)){return}if(e){arguments[0]=n.mainError()}o.apply(this,arguments)}));n.attempt((function(){s.apply(e,i)}))}.bind(e,a);e[o].options=r}}},6848:e=>{function RetryOperation(e,t){if(typeof t==="boolean"){t={forever:t}}this._originalTimeouts=JSON.parse(JSON.stringify(e));this._timeouts=e;this._options=t||{};this._maxRetryTime=t&&t.maxRetryTime||Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationTimeout=null;this._operationTimeoutCb=null;this._timeout=null;this._operationStart=null;if(this._options.forever){this._cachedTimeouts=this._timeouts.slice(0)}}e.exports=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1;this._timeouts=this._originalTimeouts};RetryOperation.prototype.stop=function(){if(this._timeout){clearTimeout(this._timeout)}this._timeouts=[];this._cachedTimeouts=null};RetryOperation.prototype.retry=function(e){if(this._timeout){clearTimeout(this._timeout)}if(!e){return false}var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(e);var r=this._timeouts.shift();if(r===undefined){if(this._cachedTimeouts){this._errors.splice(this._errors.length-1,this._errors.length);this._timeouts=this._cachedTimeouts.slice(0);r=this._timeouts.shift()}else{return false}}var s=this;var n=setTimeout((function(){s._attempts++;if(s._operationTimeoutCb){s._timeout=setTimeout((function(){s._operationTimeoutCb(s._attempts)}),s._operationTimeout);if(s._options.unref){s._timeout.unref()}}s._fn(s._attempts)}),r);if(this._options.unref){n.unref()}return true};RetryOperation.prototype.attempt=function(e,t){this._fn=e;if(t){if(t.timeout){this._operationTimeout=t.timeout}if(t.cb){this._operationTimeoutCb=t.cb}}var r=this;if(this._operationTimeoutCb){this._timeout=setTimeout((function(){r._operationTimeoutCb()}),r._operationTimeout)}this._operationStart=(new Date).getTime();this._fn(this._attempts)};RetryOperation.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated");this.attempt(e)};RetryOperation.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated");this.attempt(e)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0){return null}var e={};var t=null;var r=0;for(var s=0;s<this._errors.length;s++){var n=this._errors[s];var i=n.message;var o=(e[i]||0)+1;e[i]=o;if(o>=r){t=n;r=o}}return t}},7327:e=>{"use strict";function reusify(e){var t=new e;var r=t;function get(){var s=t;if(s.next){t=s.next}else{t=new e;r=t}s.next=null;return s}function release(e){r.next=e;r=e}return{get:get,release:release}}e.exports=reusify},4796:(e,t,r)=>{
62
+ let t;e.exports=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:global):e=>(t||(t=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))},4446:(e,t,r)=>{var s=r(3574);var n=r(1017).join;var i=r(7360);var o="/etc";var a=process.platform==="win32";var c=a?process.env.USERPROFILE:process.env.HOME;e.exports=function(e,t,l,u){if("string"!==typeof e)throw new Error("rc(name): name *must* be string");if(!l)l=r(1254)(process.argv.slice(2));t=("string"===typeof t?s.json(t):t)||{};u=u||s.parse;var h=s.env(e+"_");var d=[t];var p=[];function addConfigFile(e){if(p.indexOf(e)>=0)return;var t=s.file(e);if(t){d.push(u(t));p.push(e)}}if(!a)[n(o,e,"config"),n(o,e+"rc")].forEach(addConfigFile);if(c)[n(c,".config",e,"config"),n(c,".config",e),n(c,"."+e,"config"),n(c,"."+e+"rc")].forEach(addConfigFile);addConfigFile(s.find("."+e+"rc"));if(h.config)addConfigFile(h.config);if(l.config)addConfigFile(l.config);return i.apply(null,d.concat([h,l,p.length?{configs:p,config:p[p.length-1]}:undefined]))}},3574:(e,t,r)=>{"use strict";var s=r(7147);var n=r(7036);var i=r(1017);var o=r(2251);var a=t.parse=function(e){if(/^\s*{/.test(e))return JSON.parse(o(e));return n.parse(e)};var c=t.file=function(){var e=[].slice.call(arguments).filter((function(e){return e!=null}));for(var t in e)if("string"!==typeof e[t])return;var r=i.join.apply(null,e);var n;try{return s.readFileSync(r,"utf-8")}catch(e){return}};var l=t.json=function(){var e=c.apply(null,arguments);return e?a(e):null};var u=t.env=function(e,t){t=t||process.env;var r={};var s=e.length;for(var n in t){if(n.toLowerCase().indexOf(e.toLowerCase())===0){var i=n.substring(s).split("__");var o;while((o=i.indexOf(""))>-1){i.splice(o,1)}var a=r;i.forEach((function _buildSubObj(e,r){if(!e||typeof a!=="object")return;if(r===i.length-1)a[e]=t[n];if(a[e]===undefined)a[e]={};a=a[e]}))}}return r};var h=t.find=function(){var e=i.join.apply(null,[].slice.call(arguments));function find(e,t){var r=i.join(e,t);try{s.statSync(r);return r}catch(r){if(i.dirname(e)!==e)return find(i.dirname(e),t)}}return find(process.cwd(),e)}},1913:(e,t,r)=>{const s=r(6911).Buffer;function decodeBase64(e){return s.from(e,"base64").toString("utf8")}function encodeBase64(e){return s.from(e,"utf8").toString("base64")}e.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},1281:(e,t,r)=>{var s=r(7310);var n=r(1913);var i=n.decodeBase64;var o=n.encodeBase64;var a=":_authToken";var c=":username";var l=":_password";e.exports=function(){var e;var t;if(arguments.length>=2){e=arguments[0];t=arguments[1]}else if(typeof arguments[0]==="string"){e=arguments[0]}else{t=arguments[0]}t=t||{};t.npmrc=t.npmrc||r(4446)("npm",{registry:"https://registry.npmjs.org/"});e=e||t.npmrc.registry;return getRegistryAuthInfo(e,t)||getLegacyAuthInfo(t.npmrc)};function getRegistryAuthInfo(e,t){var r=s.parse(e,false,true);var n;while(n!=="/"&&r.pathname!==n){n=r.pathname||"/";var i="//"+r.host+n.replace(/\/$/,"");var o=getAuthInfoForUrl(i,t.npmrc);if(o){return o}if(!t.recursive){return/\/$/.test(e)?undefined:getRegistryAuthInfo(s.resolve(e,"."),t)}r.pathname=s.resolve(normalizePath(n),"..")||"/"}return undefined}function getLegacyAuthInfo(e){if(e._auth){return{token:e._auth,type:"Basic"}}return undefined}function normalizePath(e){return e[e.length-1]==="/"?e:e+"/"}function getAuthInfoForUrl(e,t){var r=getBearerToken(t[e+a]||t[e+"/"+a]);if(r){return r}var s=t[e+c]||t[e+"/"+c];var n=t[e+l]||t[e+"/"+l];var i=getTokenForUsernameAndPassword(s,n);if(i){return i}return undefined}function getBearerToken(e){if(!e){return undefined}var t=e.replace(/^\$\{?([^}]*)\}?$/,(function(e,t){return process.env[t]}));return{token:t,type:"Bearer"}}function getTokenForUsernameAndPassword(e,t){if(!e||!t){return undefined}var r=i(t.replace(/^\$\{?([^}]*)\}?$/,(function(e,t){return process.env[t]})));var s=o(e+":"+r);return{token:s,type:"Basic",password:r,username:e}}},9074:(e,t,r)=>{"use strict";e.exports=function(e){var t=r(4446)("npm",{registry:"https://registry.npmjs.org/"});var s=t[e+":registry"]||t.registry;return s.slice(-1)==="/"?s:s+"/"}},5810:(e,t,r)=>{"use strict";const s=r(2781).Readable;const n=r(4162);class Response extends s{constructor(e,t,r,s){if(typeof e!=="number"){throw new TypeError("Argument `statusCode` should be a number")}if(typeof t!=="object"){throw new TypeError("Argument `headers` should be an object")}if(!(r instanceof Buffer)){throw new TypeError("Argument `body` should be a buffer")}if(typeof s!=="string"){throw new TypeError("Argument `url` should be a string")}super();this.statusCode=e;this.headers=n(t);this.body=r;this.url=s}_read(){this.push(this.body);this.push(null)}}e.exports=Response},6862:(e,t,r)=>{e.exports=r(6097)},6097:(e,t,r)=>{var s=r(6848);t.operation=function(e){var r=t.timeouts(e);return new s(r,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};t.timeouts=function(e){if(e instanceof Array){return[].concat(e)}var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:Infinity,randomize:false};for(var r in e){t[r]=e[r]}if(t.minTimeout>t.maxTimeout){throw new Error("minTimeout is greater than maxTimeout")}var s=[];for(var n=0;n<t.retries;n++){s.push(this.createTimeout(n,t))}if(e&&e.forever&&!s.length){s.push(this.createTimeout(n,t))}s.sort((function(e,t){return e-t}));return s};t.createTimeout=function(e,t){var r=t.randomize?Math.random()+1:1;var s=Math.round(r*t.minTimeout*Math.pow(t.factor,e));s=Math.min(s,t.maxTimeout);return s};t.wrap=function(e,r,s){if(r instanceof Array){s=r;r=null}if(!s){s=[];for(var n in e){if(typeof e[n]==="function"){s.push(n)}}}for(var i=0;i<s.length;i++){var o=s[i];var a=e[o];e[o]=function retryWrapper(s){var n=t.operation(r);var i=Array.prototype.slice.call(arguments,1);var o=i.pop();i.push((function(e){if(n.retry(e)){return}if(e){arguments[0]=n.mainError()}o.apply(this,arguments)}));n.attempt((function(){s.apply(e,i)}))}.bind(e,a);e[o].options=r}}},6848:e=>{function RetryOperation(e,t){if(typeof t==="boolean"){t={forever:t}}this._originalTimeouts=JSON.parse(JSON.stringify(e));this._timeouts=e;this._options=t||{};this._maxRetryTime=t&&t.maxRetryTime||Infinity;this._fn=null;this._errors=[];this._attempts=1;this._operationTimeout=null;this._operationTimeoutCb=null;this._timeout=null;this._operationStart=null;if(this._options.forever){this._cachedTimeouts=this._timeouts.slice(0)}}e.exports=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1;this._timeouts=this._originalTimeouts};RetryOperation.prototype.stop=function(){if(this._timeout){clearTimeout(this._timeout)}this._timeouts=[];this._cachedTimeouts=null};RetryOperation.prototype.retry=function(e){if(this._timeout){clearTimeout(this._timeout)}if(!e){return false}var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime){this._errors.unshift(new Error("RetryOperation timeout occurred"));return false}this._errors.push(e);var r=this._timeouts.shift();if(r===undefined){if(this._cachedTimeouts){this._errors.splice(this._errors.length-1,this._errors.length);this._timeouts=this._cachedTimeouts.slice(0);r=this._timeouts.shift()}else{return false}}var s=this;var n=setTimeout((function(){s._attempts++;if(s._operationTimeoutCb){s._timeout=setTimeout((function(){s._operationTimeoutCb(s._attempts)}),s._operationTimeout);if(s._options.unref){s._timeout.unref()}}s._fn(s._attempts)}),r);if(this._options.unref){n.unref()}return true};RetryOperation.prototype.attempt=function(e,t){this._fn=e;if(t){if(t.timeout){this._operationTimeout=t.timeout}if(t.cb){this._operationTimeoutCb=t.cb}}var r=this;if(this._operationTimeoutCb){this._timeout=setTimeout((function(){r._operationTimeoutCb()}),r._operationTimeout)}this._operationStart=(new Date).getTime();this._fn(this._attempts)};RetryOperation.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated");this.attempt(e)};RetryOperation.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated");this.attempt(e)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0){return null}var e={};var t=null;var r=0;for(var s=0;s<this._errors.length;s++){var n=this._errors[s];var i=n.message;var o=(e[i]||0)+1;e[i]=o;if(o>=r){t=n;r=o}}return t}},7327:e=>{"use strict";function reusify(e){var t=new e;var r=t;function get(){var s=t;if(s.next){t=s.next}else{t=new e;r=t}s.next=null;return s}function release(e){r.next=e;r=e}return{get:get,release:release}}e.exports=reusify},4796:(e,t,r)=>{
63
63
  /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
64
- e.exports=runParallel;const s=r(592);function runParallel(e,t){let r,n,i;let o=true;if(Array.isArray(e)){r=[];n=e.length}else{i=Object.keys(e);r={};n=i.length}function done(e){function end(){if(t)t(e,r);t=null}if(o)s(end);else end()}function each(e,t,s){r[e]=s;if(--n===0||t){done(t)}}if(!n){done(null)}else if(i){i.forEach((function(t){e[t]((function(e,r){each(t,e,r)}))}))}else{e.forEach((function(e,t){e((function(e,r){each(t,e,r)}))}))}o=false}},5055:(e,t,r)=>{var s=r(4300);var n=s.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=s}else{copyProps(s,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return n(e,t,r)}SafeBuffer.prototype=Object.create(n.prototype);copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var s=n(e);if(t!==undefined){if(typeof r==="string"){s.fill(t,r)}else{s.fill(t)}}else{s.fill(0)}return s};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return s.SlowBuffer(e)}},2485:(e,t,r)=>{const s=Symbol("SemVer ANY");class Comparator{static get ANY(){return s}constructor(e,t){t=n(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}c("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===s){this.value=""}else{this.value=this.operator+this.semver.version}c("comp",this)}parse(e){const t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR];const r=e.match(t);if(!r){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=s}else{this.semver=new l(r[2],this.options.loose)}}toString(){return this.value}test(e){c("Comparator.test",e,this.options.loose);if(this.semver===s||e===s){return true}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}return a(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new u(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new u(this.value,t).test(e.semver)}const r=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");const s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");const n=this.semver.version===e.semver.version;const i=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");const o=a(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<");const c=a(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||s||n&&i||o||c}}e.exports=Comparator;const n=r(3789);const{re:i,t:o}=r(4351);const a=r(2674);const c=r(5747);const l=r(7825);const u=r(7058)},7058:(e,t,r)=>{class Range{constructor(e,t){t=i(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof o){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${e}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0){this.set=[e]}else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=Object.keys(this.options).join(",");const r=`parseRange:${t}:${e}`;const s=n.get(r);if(s){return s}const i=this.options.loose;const c=i?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(c,hyphenReplace(this.options.includePrerelease));a("hyphen replace",e);e=e.replace(l[u.COMPARATORTRIM],h);a("comparator trim",e);e=e.replace(l[u.TILDETRIM],d);e=e.replace(l[u.CARETTRIM],p);e=e.split(/\s+/).join(" ");let m=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));if(i){m=m.filter((e=>{a("loose invalid filter",e,this.options);return!!e.match(l[u.COMPARATORLOOSE])}))}a("range list",m);const y=new Map;const g=m.map((e=>new o(e,this.options)));for(const e of g){if(isNullSet(e)){return[e]}y.set(e.value,e)}if(y.size>1&&y.has("")){y.delete("")}const v=[...y.values()];n.set(r,v);return v}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new c(e,this.options)}catch(e){return false}}for(let t=0;t<this.set.length;t++){if(testSet(this.set[t],e,this.options)){return true}}return false}}e.exports=Range;const s=r(8443);const n=new s({max:1e3});const i=r(3789);const o=r(2485);const a=r(5747);const c=r(7825);const{re:l,t:u,comparatorTrimReplace:h,tildeTrimReplace:d,caretTrimReplace:p}=r(4351);const isNullSet=e=>e.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let r=true;const s=e.slice();let n=s.pop();while(r&&s.length){r=s.every((e=>n.intersects(e,t)));n=s.pop()}return r};const parseComparator=(e,t)=>{a("comp",e,t);e=replaceCarets(e,t);a("caret",e);e=replaceTildes(e,t);a("tildes",e);e=replaceXRanges(e,t);a("xrange",e);e=replaceStars(e,t);a("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const r=t.loose?l[u.TILDELOOSE]:l[u.TILDE];return e.replace(r,((t,r,s,n,i)=>{a("tilde",e,t,r,s,n,i);let o;if(isX(r)){o=""}else if(isX(s)){o=`>=${r}.0.0 <${+r+1}.0.0-0`}else if(isX(n)){o=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`}else if(i){a("replaceTilde pr",i);o=`>=${r}.${s}.${n}-${i} <${r}.${+s+1}.0-0`}else{o=`>=${r}.${s}.${n} <${r}.${+s+1}.0-0`}a("tilde return",o);return o}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{a("caret",e,t);const r=t.loose?l[u.CARETLOOSE]:l[u.CARET];const s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,n,i,o)=>{a("caret",e,t,r,n,i,o);let c;if(isX(r)){c=""}else if(isX(n)){c=`>=${r}.0.0${s} <${+r+1}.0.0-0`}else if(isX(i)){if(r==="0"){c=`>=${r}.${n}.0${s} <${r}.${+n+1}.0-0`}else{c=`>=${r}.${n}.0${s} <${+r+1}.0.0-0`}}else if(o){a("replaceCaret pr",o);if(r==="0"){if(n==="0"){c=`>=${r}.${n}.${i}-${o} <${r}.${n}.${+i+1}-0`}else{c=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`}}else{c=`>=${r}.${n}.${i}-${o} <${+r+1}.0.0-0`}}else{a("no pr");if(r==="0"){if(n==="0"){c=`>=${r}.${n}.${i}${s} <${r}.${n}.${+i+1}-0`}else{c=`>=${r}.${n}.${i}${s} <${r}.${+n+1}.0-0`}}else{c=`>=${r}.${n}.${i} <${+r+1}.0.0-0`}}a("caret return",c);return c}))};const replaceXRanges=(e,t)=>{a("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return e.replace(r,((r,s,n,i,o,c)=>{a("xRange",e,r,s,n,i,o,c);const l=isX(n);const u=l||isX(i);const h=u||isX(o);const d=h;if(s==="="&&d){s=""}c=t.includePrerelease?"-0":"";if(l){if(s===">"||s==="<"){r="<0.0.0-0"}else{r="*"}}else if(s&&d){if(u){i=0}o=0;if(s===">"){s=">=";if(u){n=+n+1;i=0;o=0}else{i=+i+1;o=0}}else if(s==="<="){s="<";if(u){n=+n+1}else{i=+i+1}}if(s==="<"){c="-0"}r=`${s+n}.${i}.${o}${c}`}else if(u){r=`>=${n}.0.0${c} <${+n+1}.0.0-0`}else if(h){r=`>=${n}.${i}.0${c} <${n}.${+i+1}.0-0`}a("xRange return",r);return r}))};const replaceStars=(e,t)=>{a("replaceStars",e,t);return e.trim().replace(l[u.STAR],"")};const replaceGTE0=(e,t)=>{a("replaceGTE0",e,t);return e.trim().replace(l[t.includePrerelease?u.GTE0PRE:u.GTE0],"")};const hyphenReplace=e=>(t,r,s,n,i,o,a,c,l,u,h,d,p)=>{if(isX(s)){r=""}else if(isX(n)){r=`>=${s}.0.0${e?"-0":""}`}else if(isX(i)){r=`>=${s}.${n}.0${e?"-0":""}`}else if(o){r=`>=${r}`}else{r=`>=${r}${e?"-0":""}`}if(isX(l)){c=""}else if(isX(u)){c=`<${+l+1}.0.0-0`}else if(isX(h)){c=`<${l}.${+u+1}.0-0`}else if(d){c=`<=${l}.${u}.${h}-${d}`}else if(e){c=`<${l}.${u}.${+h+1}-0`}else{c=`<=${c}`}return`${r} ${c}`.trim()};const testSet=(e,t,r)=>{for(let r=0;r<e.length;r++){if(!e[r].test(t)){return false}}if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++){a(e[r].semver);if(e[r].semver===o.ANY){continue}if(e[r].semver.prerelease.length>0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch){return true}}}return false}return true}},7825:(e,t,r)=>{const s=r(5747);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:i}=r(8147);const{re:o,t:a}=r(4351);const c=r(3789);const{compareIdentifiers:l}=r(8307);class SemVer{constructor(e,t){t=c(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid Version: ${e}`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}s("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i){return t}}return e}))}this.build=r[5]?r[5].split("."):[];this.format()}format(){this.version=`${this.major}.${this.minor}.${this.patch}`;if(this.prerelease.length){this.version+=`-${this.prerelease.join(".")}`}return this.version}toString(){return this.version}compare(e){s("SemVer.compare",this.version,this.options,e);if(!(e instanceof SemVer)){if(typeof e==="string"&&e===this.version){return 0}e=new SemVer(e,this.options)}if(e.version===this.version){return 0}return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}return l(this.major,e.major)||l(this.minor,e.minor)||l(this.patch,e.patch)}comparePre(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}if(this.prerelease.length&&!e.prerelease.length){return-1}else if(!this.prerelease.length&&e.prerelease.length){return 1}else if(!this.prerelease.length&&!e.prerelease.length){return 0}let t=0;do{const r=this.prerelease[t];const n=e.prerelease[t];s("prerelease compare",t,r,n);if(r===undefined&&n===undefined){return 0}else if(n===undefined){return 1}else if(r===undefined){return-1}else if(r===n){continue}else{return l(r,n)}}while(++t)}compareBuild(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}let t=0;do{const r=this.build[t];const n=e.build[t];s("prerelease compare",t,r,n);if(r===undefined&&n===undefined){return 0}else if(n===undefined){return 1}else if(r===undefined){return-1}else if(r===n){continue}else{return l(r,n)}}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",t);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",t);break;case"prepatch":this.prerelease.length=0;this.inc("patch",t);this.inc("pre",t);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",t)}this.inc("pre",t);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":if(this.prerelease.length===0){this.prerelease=[0]}else{let e=this.prerelease.length;while(--e>=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(t){if(l(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},6869:(e,t,r)=>{const s=r(4770);const clean=(e,t)=>{const r=s(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=clean},2674:(e,t,r)=>{const s=r(112);const n=r(4182);const i=r(2062);const o=r(6503);const a=r(1004);const c=r(3285);const cmp=(e,t,r,l)=>{switch(t){case"===":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e===r;case"!==":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e!==r;case"":case"=":case"==":return s(e,r,l);case"!=":return n(e,r,l);case">":return i(e,r,l);case">=":return o(e,r,l);case"<":return a(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},9608:(e,t,r)=>{const s=r(7825);const n=r(4770);const{re:i,t:o}=r(4351);const coerce=(e,t)=>{if(e instanceof s){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(i[o.COERCE])}else{let t;while((t=i[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}i[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}i[o.COERCERTL].lastIndex=-1}if(r===null){return null}return n(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=coerce},9874:(e,t,r)=>{const s=r(7825);const compareBuild=(e,t,r)=>{const n=new s(e,r);const i=new s(t,r);return n.compare(i)||n.compareBuild(i)};e.exports=compareBuild},8325:(e,t,r)=>{const s=r(1878);const compareLoose=(e,t)=>s(e,t,true);e.exports=compareLoose},1878:(e,t,r)=>{const s=r(7825);const compare=(e,t,r)=>new s(e,r).compare(new s(t,r));e.exports=compare},2464:(e,t,r)=>{const s=r(4770);const n=r(112);const diff=(e,t)=>{if(n(e,t)){return null}else{const r=s(e);const n=s(t);const i=r.prerelease.length||n.prerelease.length;const o=i?"pre":"";const a=i?"prerelease":"";for(const e in r){if(e==="major"||e==="minor"||e==="patch"){if(r[e]!==n[e]){return o+e}}}return a}};e.exports=diff},112:(e,t,r)=>{const s=r(1878);const eq=(e,t,r)=>s(e,t,r)===0;e.exports=eq},2062:(e,t,r)=>{const s=r(1878);const gt=(e,t,r)=>s(e,t,r)>0;e.exports=gt},6503:(e,t,r)=>{const s=r(1878);const gte=(e,t,r)=>s(e,t,r)>=0;e.exports=gte},6223:(e,t,r)=>{const s=r(7825);const inc=(e,t,r,n)=>{if(typeof r==="string"){n=r;r=undefined}try{return new s(e instanceof s?e.version:e,r).inc(t,n).version}catch(e){return null}};e.exports=inc},1004:(e,t,r)=>{const s=r(1878);const lt=(e,t,r)=>s(e,t,r)<0;e.exports=lt},3285:(e,t,r)=>{const s=r(1878);const lte=(e,t,r)=>s(e,t,r)<=0;e.exports=lte},6851:(e,t,r)=>{const s=r(7825);const major=(e,t)=>new s(e,t).major;e.exports=major},7443:(e,t,r)=>{const s=r(7825);const minor=(e,t)=>new s(e,t).minor;e.exports=minor},4182:(e,t,r)=>{const s=r(1878);const neq=(e,t,r)=>s(e,t,r)!==0;e.exports=neq},4770:(e,t,r)=>{const{MAX_LENGTH:s}=r(8147);const{re:n,t:i}=r(4351);const o=r(7825);const a=r(3789);const parse=(e,t)=>{t=a(t);if(e instanceof o){return e}if(typeof e!=="string"){return null}if(e.length>s){return null}const r=t.loose?n[i.LOOSE]:n[i.FULL];if(!r.test(e)){return null}try{return new o(e,t)}catch(e){return null}};e.exports=parse},1550:(e,t,r)=>{const s=r(7825);const patch=(e,t)=>new s(e,t).patch;e.exports=patch},3340:(e,t,r)=>{const s=r(4770);const prerelease=(e,t)=>{const r=s(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=prerelease},3119:(e,t,r)=>{const s=r(1878);const rcompare=(e,t,r)=>s(t,e,r);e.exports=rcompare},3379:(e,t,r)=>{const s=r(9874);const rsort=(e,t)=>e.sort(((e,r)=>s(r,e,t)));e.exports=rsort},4140:(e,t,r)=>{const s=r(7058);const satisfies=(e,t,r)=>{try{t=new s(t,r)}catch(e){return false}return t.test(e)};e.exports=satisfies},7408:(e,t,r)=>{const s=r(9874);const sort=(e,t)=>e.sort(((e,r)=>s(e,r,t)));e.exports=sort},8994:(e,t,r)=>{const s=r(4770);const valid=(e,t)=>{const r=s(e,t);return r?r.version:null};e.exports=valid},1452:(e,t,r)=>{const s=r(4351);const n=r(8147);const i=r(7825);const o=r(8307);const a=r(4770);const c=r(8994);const l=r(6869);const u=r(6223);const h=r(2464);const d=r(6851);const p=r(7443);const m=r(1550);const y=r(3340);const g=r(1878);const v=r(3119);const b=r(8325);const w=r(9874);const E=r(7408);const S=r(3379);const x=r(2062);const R=r(1004);const P=r(112);const O=r(4182);const $=r(6503);const T=r(3285);const A=r(2674);const C=r(9608);const k=r(2485);const I=r(7058);const N=r(4140);const D=r(8478);const L=r(4430);const M=r(4510);const j=r(2582);const F=r(4499);const U=r(3766);const B=r(3773);const H=r(8626);const z=r(4298);const G=r(6023);const V=r(5701);e.exports={parse:a,valid:c,clean:l,inc:u,diff:h,major:d,minor:p,patch:m,prerelease:y,compare:g,rcompare:v,compareLoose:b,compareBuild:w,sort:E,rsort:S,gt:x,lt:R,eq:P,neq:O,gte:$,lte:T,cmp:A,coerce:C,Comparator:k,Range:I,satisfies:N,toComparators:D,maxSatisfying:L,minSatisfying:M,minVersion:j,validRange:F,outside:U,gtr:B,ltr:H,intersects:z,simplifyRange:G,subset:V,SemVer:i,re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:n.SEMVER_SPEC_VERSION,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}},8147:e=>{const t="2.0.0";const r=256;const s=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;e.exports={SEMVER_SPEC_VERSION:t,MAX_LENGTH:r,MAX_SAFE_INTEGER:s,MAX_SAFE_COMPONENT_LENGTH:n}},5747:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},8307:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,r)=>{const s=t.test(e);const n=t.test(r);if(s&&n){e=+e;r=+r}return e===r?0:s&&!n?-1:n&&!s?1:e<r?-1:1};const rcompareIdentifiers=(e,t)=>compareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},3789:e=>{const t=["includePrerelease","loose","rtl"];const parseOptions=e=>!e?{}:typeof e!=="object"?{loose:true}:t.filter((t=>e[t])).reduce(((e,t)=>{e[t]=true;return e}),{});e.exports=parseOptions},4351:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:s}=r(8147);const n=r(5747);t=e.exports={};const i=t.re=[];const o=t.src=[];const a=t.t={};let c=0;const createToken=(e,t,r)=>{const s=c++;n(e,s,t);a[e]=s;o[s]=t;i[s]=new RegExp(t,r?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","[0-9]+");createToken("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");createToken("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER","[0-9A-Za-z-]+");createToken("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`);createToken("FULL",`^${o[a.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`);createToken("LOOSE",`^${o[a.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${o[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${o[a.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${s}})`+`(?:\\.(\\d{1,${s}}))?`+`(?:\\.(\\d{1,${s}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",o[a.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},3773:(e,t,r)=>{const s=r(3766);const gtr=(e,t,r)=>s(e,t,">",r);e.exports=gtr},4298:(e,t,r)=>{const s=r(7058);const intersects=(e,t,r)=>{e=new s(e,r);t=new s(t,r);return e.intersects(t)};e.exports=intersects},8626:(e,t,r)=>{const s=r(3766);const ltr=(e,t,r)=>s(e,t,"<",r);e.exports=ltr},4430:(e,t,r)=>{const s=r(7825);const n=r(7058);const maxSatisfying=(e,t,r)=>{let i=null;let o=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!i||o.compare(e)===-1){i=e;o=new s(i,r)}}}));return i};e.exports=maxSatisfying},4510:(e,t,r)=>{const s=r(7825);const n=r(7058);const minSatisfying=(e,t,r)=>{let i=null;let o=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!i||o.compare(e)===1){i=e;o=new s(i,r)}}}));return i};e.exports=minSatisfying},2582:(e,t,r)=>{const s=r(7825);const n=r(7058);const i=r(2062);const minVersion=(e,t)=>{e=new n(e,t);let r=new s("0.0.0");if(e.test(r)){return r}r=new s("0.0.0-0");if(e.test(r)){return r}r=null;for(let t=0;t<e.set.length;++t){const n=e.set[t];let o=null;n.forEach((e=>{const t=new s(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!o||i(t,o)){o=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(o&&(!r||i(r,o))){r=o}}if(r&&e.test(r)){return r}return null};e.exports=minVersion},3766:(e,t,r)=>{const s=r(7825);const n=r(2485);const{ANY:i}=n;const o=r(7058);const a=r(4140);const c=r(2062);const l=r(1004);const u=r(3285);const h=r(6503);const outside=(e,t,r,d)=>{e=new s(e,d);t=new o(t,d);let p,m,y,g,v;switch(r){case">":p=c;m=u;y=l;g=">";v=">=";break;case"<":p=l;m=h;y=c;g="<";v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d)){return false}for(let r=0;r<t.set.length;++r){const s=t.set[r];let o=null;let a=null;s.forEach((e=>{if(e.semver===i){e=new n(">=0.0.0")}o=o||e;a=a||e;if(p(e.semver,o.semver,d)){o=e}else if(y(e.semver,a.semver,d)){a=e}}));if(o.operator===g||o.operator===v){return false}if((!a.operator||a.operator===g)&&m(e,a.semver)){return false}else if(a.operator===v&&y(e,a.semver)){return false}}return true};e.exports=outside},6023:(e,t,r)=>{const s=r(4140);const n=r(1878);e.exports=(e,t,r)=>{const i=[];let o=null;let a=null;const c=e.sort(((e,t)=>n(e,t,r)));for(const e of c){const n=s(e,t,r);if(n){a=e;if(!o){o=e}}else{if(a){i.push([o,a])}a=null;o=null}}if(o){i.push([o,null])}const l=[];for(const[e,t]of i){if(e===t){l.push(e)}else if(!t&&e===c[0]){l.push("*")}else if(!t){l.push(`>=${e}`)}else if(e===c[0]){l.push(`<=${t}`)}else{l.push(`${e} - ${t}`)}}const u=l.join(" || ");const h=typeof t.raw==="string"?t.raw:String(t);return u.length<h.length?u:t}},5701:(e,t,r)=>{const s=r(7058);const n=r(2485);const{ANY:i}=n;const o=r(4140);const a=r(1878);const subset=(e,t,r={})=>{if(e===t){return true}e=new s(e,r);t=new s(t,r);let n=false;e:for(const s of e.set){for(const e of t.set){const t=simpleSubset(s,e,r);n=n||t!==null;if(t){continue e}}if(n){return false}}return true};const simpleSubset=(e,t,r)=>{if(e===t){return true}if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i){return true}else if(r.includePrerelease){e=[new n(">=0.0.0-0")]}else{e=[new n(">=0.0.0")]}}if(t.length===1&&t[0].semver===i){if(r.includePrerelease){return true}else{t=[new n(">=0.0.0")]}}const s=new Set;let c,l;for(const t of e){if(t.operator===">"||t.operator===">="){c=higherGT(c,t,r)}else if(t.operator==="<"||t.operator==="<="){l=lowerLT(l,t,r)}else{s.add(t.semver)}}if(s.size>1){return null}let u;if(c&&l){u=a(c.semver,l.semver,r);if(u>0){return null}else if(u===0&&(c.operator!==">="||l.operator!=="<=")){return null}}for(const e of s){if(c&&!o(e,String(c),r)){return null}if(l&&!o(e,String(l),r)){return null}for(const s of t){if(!o(e,String(s),r)){return false}}return true}let h,d;let p,m;let y=l&&!r.includePrerelease&&l.semver.prerelease.length?l.semver:false;let g=c&&!r.includePrerelease&&c.semver.prerelease.length?c.semver:false;if(y&&y.prerelease.length===1&&l.operator==="<"&&y.prerelease[0]===0){y=false}for(const e of t){m=m||e.operator===">"||e.operator===">=";p=p||e.operator==="<"||e.operator==="<=";if(c){if(g){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch){g=false}}if(e.operator===">"||e.operator===">="){h=higherGT(c,e,r);if(h===e&&h!==c){return false}}else if(c.operator===">="&&!o(c.semver,String(e),r)){return false}}if(l){if(y){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch){y=false}}if(e.operator==="<"||e.operator==="<="){d=lowerLT(l,e,r);if(d===e&&d!==l){return false}}else if(l.operator==="<="&&!o(l.semver,String(e),r)){return false}}if(!e.operator&&(l||c)&&u!==0){return false}}if(c&&p&&!l&&u!==0){return false}if(l&&m&&!c&&u!==0){return false}if(g||y){return false}return true};const higherGT=(e,t,r)=>{if(!e){return t}const s=a(e.semver,t.semver,r);return s>0?e:s<0?t:t.operator===">"&&e.operator===">="?t:e};const lowerLT=(e,t,r)=>{if(!e){return t}const s=a(e.semver,t.semver,r);return s<0?e:s>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=subset},8478:(e,t,r)=>{const s=r(7058);const toComparators=(e,t)=>new s(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));e.exports=toComparators},4499:(e,t,r)=>{const s=r(7058);const validRange=(e,t)=>{try{return new s(e,t).range||"*"}catch(e){return null}};e.exports=validRange},530:(e,t,r)=>{"use strict";const s=r(4401);e.exports=(e="")=>{const t=e.match(s);if(!t){return null}const[r,n]=t[0].replace(/#! ?/,"").split(" ");const i=r.split("/").pop();if(i==="env"){return n}return n?`${i} ${n}`:i}},4401:e=>{"use strict";e.exports=/^#!(.*)/},4577:e=>{"use strict";const t="";const r=`${t}[`;const s="";const n={to(e,t){if(!t)return`${r}${e+1}G`;return`${r}${t+1};${e+1}H`},move(e,t){let s="";if(e<0)s+=`${r}${-e}D`;else if(e>0)s+=`${r}${e}C`;if(t<0)s+=`${r}${-t}A`;else if(t>0)s+=`${r}${t}B`;return s},up:(e=1)=>`${r}${e}A`,down:(e=1)=>`${r}${e}B`,forward:(e=1)=>`${r}${e}C`,backward:(e=1)=>`${r}${e}D`,nextLine:(e=1)=>`${r}E`.repeat(e),prevLine:(e=1)=>`${r}F`.repeat(e),left:`${r}G`,hide:`${r}?25l`,show:`${r}?25h`,save:`${t}7`,restore:`${t}8`};const i={up:(e=1)=>`${r}S`.repeat(e),down:(e=1)=>`${r}T`.repeat(e)};const o={screen:`${r}2J`,up:(e=1)=>`${r}1J`.repeat(e),down:(e=1)=>`${r}J`.repeat(e),line:`${r}2K`,lineEnd:`${r}K`,lineStart:`${r}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?n.up():"");if(e)t+=n.left;return t}};e.exports={cursor:n,scroll:i,erase:o,beep:s}},2251:e=>{"use strict";var t=1;var r=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(e,t,r){return e.slice(t,r).replace(/\S/g," ")}e.exports=function(e,s){s=s||{};var n;var i;var o=false;var a=false;var c=0;var l="";var u=s.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var h=0;h<e.length;h++){n=e[h];i=e[h+1];if(!a&&n==='"'){var d=e[h-1]==="\\"&&e[h-2]!=="\\";if(!d){o=!o}}if(o){continue}if(!a&&n+i==="//"){l+=e.slice(c,h);c=h;a=t;h++}else if(a===t&&n+i==="\r\n"){h++;a=false;l+=u(e,c,h);c=h;continue}else if(a===t&&n==="\n"){a=false;l+=u(e,c,h);c=h}else if(!a&&n+i==="/*"){l+=e.slice(c,h);c=h;a=r;h++;continue}else if(a===r&&n+i==="*/"){h++;a=false;l+=u(e,c,h+1);c=h+1;continue}}return l+(a?u(e.substr(c)):e.substr(c))}},5255:(e,t,r)=>{"use strict";t.c=t.create=r(7585);t.r=t.replace=r(1138);t.t=t.list=r(4975);t.u=t.update=r(9472);t.x=t.extract=r(9985);t.Pack=r(7301);t.Unpack=r(5951);t.Parse=r(5222);t.ReadEntry=r(5917);t.WriteEntry=r(1944);t.Header=r(1703);t.Pax=r(9037);t.types=r(1046)},7585:(e,t,r)=>{"use strict";const s=r(3831);const n=r(7301);const i=r(644);const o=r(4975);const a=r(1017);e.exports=(e,t,r)=>{if(typeof t==="function"){r=t}if(Array.isArray(e)){t=e,e={}}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);const n=s(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?createFileSync(n,t):n.file?createFile(n,t,r):n.sync?createSync(n,t):create(n,t)};const createFileSync=(e,t)=>{const r=new n.Sync(e);const s=new i.WriteStreamSync(e.file,{mode:e.mode||438});r.pipe(s);addFilesSync(r,t)};const createFile=(e,t,r)=>{const s=new n(e);const o=new i.WriteStream(e.file,{mode:e.mode||438});s.pipe(o);const a=new Promise(((e,t)=>{o.on("error",t);o.on("close",e);s.on("error",t)}));addFilesAsync(s,t);return r?a.then(r,r):a};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@"){o({file:a.resolve(e.cwd,t.slice(1)),sync:true,noResume:true,onentry:t=>e.add(t)})}else{e.add(t)}}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const r=t.shift();if(r.charAt(0)==="@"){return o({file:a.resolve(e.cwd,r.slice(1)),noResume:true,onentry:t=>e.add(t)}).then((r=>addFilesAsync(e,t)))}else{e.add(r)}}e.end()};const createSync=(e,t)=>{const r=new n.Sync(e);addFilesSync(r,t);return r};const create=(e,t)=>{const r=new n(e);addFilesAsync(r,t);return r}},9985:(e,t,r)=>{"use strict";const s=r(3831);const n=r(5951);const i=r(7147);const o=r(644);const a=r(1017);const c=r(2517);e.exports=(e,t,r)=>{if(typeof e==="function"){r=e,t=null,e={}}else if(Array.isArray(e)){t=e,e={}}if(typeof t==="function"){r=t,t=null}if(!t){t=[]}else{t=Array.from(t)}const n=s(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")}if(t.length){filesFilter(n,t)}return n.file&&n.sync?extractFileSync(n):n.file?extractFile(n,r):n.sync?extractSync(n):extract(n)};const filesFilter=(e,t)=>{const r=new Map(t.map((e=>[c(e),true])));const s=e.filter;const mapHas=(e,t)=>{const s=t||a.parse(e).root||".";const n=e===s?false:r.has(e)?r.get(e):mapHas(a.dirname(e),s);r.set(e,n);return n};e.filter=s?(e,t)=>s(e,t)&&mapHas(c(e)):e=>mapHas(c(e))};const extractFileSync=e=>{const t=new n.Sync(e);const r=e.file;const s=i.statSync(r);const a=e.maxReadSize||16*1024*1024;const c=new o.ReadStreamSync(r,{readSize:a,size:s.size});c.pipe(t)};const extractFile=(e,t)=>{const r=new n(e);const s=e.maxReadSize||16*1024*1024;const a=e.file;const c=new Promise(((e,t)=>{r.on("error",t);r.on("close",e);i.stat(a,((e,n)=>{if(e){t(e)}else{const e=new o.ReadStream(a,{readSize:s,size:n.size});e.on("error",t);e.pipe(r)}}))}));return t?c.then(t,t):c};const extractSync=e=>new n.Sync(e);const extract=e=>new n(e)},9262:(e,t,r)=>{const s=process.env.__FAKE_PLATFORM__||process.platform;const n=s==="win32";const i=global.__FAKE_TESTING_FS__||r(7147);const{O_CREAT:o,O_TRUNC:a,O_WRONLY:c,UV_FS_O_FILEMAP:l=0}=i.constants;const u=n&&!!l;const h=512*1024;const d=l|a|o|c;e.exports=!u?()=>"w":e=>e<h?d:"w"},1703:(e,t,r)=>{"use strict";const s=r(1046);const n=r(1017).posix;const i=r(2933);const o=Symbol("slurp");const a=Symbol("type");class Header{constructor(e,t,r,s){this.cksumValid=false;this.needPax=false;this.nullBlock=false;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[a]="0";this.linkpath=null;this.uname=null;this.gname=null;this.devmaj=0;this.devmin=0;this.atime=null;this.ctime=null;if(Buffer.isBuffer(e)){this.decode(e,t||0,r,s)}else if(e){this.set(e)}}decode(e,t,r,s){if(!t){t=0}if(!e||!(e.length>=t+512)){throw new Error("need 512 bytes for header")}this.path=decString(e,t,100);this.mode=decNumber(e,t+100,8);this.uid=decNumber(e,t+108,8);this.gid=decNumber(e,t+116,8);this.size=decNumber(e,t+124,12);this.mtime=decDate(e,t+136,12);this.cksum=decNumber(e,t+148,12);this[o](r);this[o](s,true);this[a]=decString(e,t+156,1);if(this[a]===""){this[a]="0"}if(this[a]==="0"&&this.path.slice(-1)==="/"){this[a]="5"}if(this[a]==="5"){this.size=0}this.linkpath=decString(e,t+157,100);if(e.slice(t+257,t+265).toString()==="ustar\x0000"){this.uname=decString(e,t+265,32);this.gname=decString(e,t+297,32);this.devmaj=decNumber(e,t+329,8);this.devmin=decNumber(e,t+337,8);if(e[t+475]!==0){const r=decString(e,t+345,155);this.path=r+"/"+this.path}else{const r=decString(e,t+345,130);if(r){this.path=r+"/"+this.path}this.atime=decDate(e,t+476,12);this.ctime=decDate(e,t+488,12)}}let n=8*32;for(let r=t;r<t+148;r++){n+=e[r]}for(let r=t+156;r<t+512;r++){n+=e[r]}this.cksumValid=n===this.cksum;if(this.cksum===null&&n===8*32){this.nullBlock=true}}[o](e,t){for(const r in e){if(e[r]!==null&&e[r]!==undefined&&!(t&&r==="path")){this[r]=e[r]}}}encode(e,t){if(!e){e=this.block=Buffer.alloc(512);t=0}if(!t){t=0}if(!(e.length>=t+512)){throw new Error("need 512 bytes for header")}const r=this.ctime||this.atime?130:155;const s=splitPrefix(this.path||"",r);const n=s[0];const i=s[1];this.needPax=s[2];this.needPax=encString(e,t,100,n)||this.needPax;this.needPax=encNumber(e,t+100,8,this.mode)||this.needPax;this.needPax=encNumber(e,t+108,8,this.uid)||this.needPax;this.needPax=encNumber(e,t+116,8,this.gid)||this.needPax;this.needPax=encNumber(e,t+124,12,this.size)||this.needPax;this.needPax=encDate(e,t+136,12,this.mtime)||this.needPax;e[t+156]=this[a].charCodeAt(0);this.needPax=encString(e,t+157,100,this.linkpath)||this.needPax;e.write("ustar\x0000",t+257,8);this.needPax=encString(e,t+265,32,this.uname)||this.needPax;this.needPax=encString(e,t+297,32,this.gname)||this.needPax;this.needPax=encNumber(e,t+329,8,this.devmaj)||this.needPax;this.needPax=encNumber(e,t+337,8,this.devmin)||this.needPax;this.needPax=encString(e,t+345,r,i)||this.needPax;if(e[t+475]!==0){this.needPax=encString(e,t+345,155,i)||this.needPax}else{this.needPax=encString(e,t+345,130,i)||this.needPax;this.needPax=encDate(e,t+476,12,this.atime)||this.needPax;this.needPax=encDate(e,t+488,12,this.ctime)||this.needPax}let o=8*32;for(let r=t;r<t+148;r++){o+=e[r]}for(let r=t+156;r<t+512;r++){o+=e[r]}this.cksum=o;encNumber(e,t+148,8,this.cksum);this.cksumValid=true;return this.needPax}set(e){for(const t in e){if(e[t]!==null&&e[t]!==undefined){this[t]=e[t]}}}get type(){return s.name.get(this[a])||this[a]}get typeKey(){return this[a]}set type(e){if(s.code.has(e)){this[a]=s.code.get(e)}else{this[a]=e}}}const splitPrefix=(e,t)=>{const r=100;let s=e;let i="";let o;const a=n.parse(e).root||".";if(Buffer.byteLength(s)<r){o=[s,i,false]}else{i=n.dirname(s);s=n.basename(s);do{if(Buffer.byteLength(s)<=r&&Buffer.byteLength(i)<=t){o=[s,i,false]}else if(Buffer.byteLength(s)>r&&Buffer.byteLength(i)<=t){o=[s.slice(0,r-1),i,true]}else{s=n.join(n.basename(i),s);i=n.dirname(i)}}while(i!==a&&!o);if(!o){o=[e.slice(0,r-1),"",true]}}return o};const decString=(e,t,r)=>e.slice(t,t+r).toString("utf8").replace(/\0.*/,"");const decDate=(e,t,r)=>numToDate(decNumber(e,t,r));const numToDate=e=>e===null?null:new Date(e*1e3);const decNumber=(e,t,r)=>e[t]&128?i.parse(e.slice(t,t+r)):decSmallNumber(e,t,r);const nanNull=e=>isNaN(e)?null:e;const decSmallNumber=(e,t,r)=>nanNull(parseInt(e.slice(t,t+r).toString("utf8").replace(/\0.*$/,"").trim(),8));const c={12:8589934591,8:2097151};const encNumber=(e,t,r,s)=>s===null?false:s>c[r]||s<0?(i.encode(s,e.slice(t,t+r)),true):(encSmallNumber(e,t,r,s),false);const encSmallNumber=(e,t,r,s)=>e.write(octalString(s,r),t,r,"ascii");const octalString=(e,t)=>padOctal(Math.floor(e).toString(8),t);const padOctal=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0";const encDate=(e,t,r,s)=>s===null?false:encNumber(e,t,r,s.getTime()/1e3);const l=new Array(156).join("\0");const encString=(e,t,r,s)=>s===null?false:(e.write(s+l,t,r,"utf8"),s.length!==Buffer.byteLength(s)||s.length>r);e.exports=Header},3831:e=>{"use strict";const t=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"]]);e.exports=e=>e?Object.keys(e).map((r=>[t.has(r)?t.get(r):r,e[r]])).reduce(((e,t)=>(e[t[0]]=t[1],e)),Object.create(null)):{}},2933:e=>{"use strict";const encode=(e,t)=>{if(!Number.isSafeInteger(e)){throw Error("cannot encode number outside of javascript safe integer range")}else if(e<0){encodeNegative(e,t)}else{encodePositive(e,t)}return t};const encodePositive=(e,t)=>{t[0]=128;for(var r=t.length;r>1;r--){t[r-1]=e&255;e=Math.floor(e/256)}};const encodeNegative=(e,t)=>{t[0]=255;var r=false;e=e*-1;for(var s=t.length;s>1;s--){var n=e&255;e=Math.floor(e/256);if(r){t[s-1]=onesComp(n)}else if(n===0){t[s-1]=0}else{r=true;t[s-1]=twosComp(n)}}};const parse=e=>{const t=e[0];const r=t===128?pos(e.slice(1,e.length)):t===255?twos(e):null;if(r===null){throw Error("invalid base256 encoding")}if(!Number.isSafeInteger(r)){throw Error("parsed number outside of javascript safe integer range")}return r};const twos=e=>{var t=e.length;var r=0;var s=false;for(var n=t-1;n>-1;n--){var i=e[n];var o;if(s){o=onesComp(i)}else if(i===0){o=i}else{s=true;o=twosComp(i)}if(o!==0){r-=o*Math.pow(256,t-n-1)}}return r};const pos=e=>{var t=e.length;var r=0;for(var s=t-1;s>-1;s--){var n=e[s];if(n!==0){r+=n*Math.pow(256,t-s-1)}}return r};const onesComp=e=>(255^e)&255;const twosComp=e=>(255^e)+1&255;e.exports={encode:encode,parse:parse}},4975:(e,t,r)=>{"use strict";const s=r(3831);const n=r(5222);const i=r(7147);const o=r(644);const a=r(1017);const c=r(2517);e.exports=(e,t,r)=>{if(typeof e==="function"){r=e,t=null,e={}}else if(Array.isArray(e)){t=e,e={}}if(typeof t==="function"){r=t,t=null}if(!t){t=[]}else{t=Array.from(t)}const n=s(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")}if(t.length){filesFilter(n,t)}if(!n.noResume){onentryFunction(n)}return n.file&&n.sync?listFileSync(n):n.file?listFile(n,r):list(n)};const onentryFunction=e=>{const t=e.onentry;e.onentry=t?e=>{t(e);e.resume()}:e=>e.resume()};const filesFilter=(e,t)=>{const r=new Map(t.map((e=>[c(e),true])));const s=e.filter;const mapHas=(e,t)=>{const s=t||a.parse(e).root||".";const n=e===s?false:r.has(e)?r.get(e):mapHas(a.dirname(e),s);r.set(e,n);return n};e.filter=s?(e,t)=>s(e,t)&&mapHas(c(e)):e=>mapHas(c(e))};const listFileSync=e=>{const t=list(e);const r=e.file;let s=true;let n;try{const o=i.statSync(r);const a=e.maxReadSize||16*1024*1024;if(o.size<a){t.end(i.readFileSync(r))}else{let e=0;const s=Buffer.allocUnsafe(a);n=i.openSync(r,"r");while(e<o.size){const r=i.readSync(n,s,0,a,e);e+=r;t.write(s.slice(0,r))}t.end()}s=false}finally{if(s&&n){try{i.closeSync(n)}catch(e){}}}};const listFile=(e,t)=>{const r=new n(e);const s=e.maxReadSize||16*1024*1024;const a=e.file;const c=new Promise(((e,t)=>{r.on("error",t);r.on("end",e);i.stat(a,((e,n)=>{if(e){t(e)}else{const e=new o.ReadStream(a,{readSize:s,size:n.size});e.on("error",t);e.pipe(r)}}))}));return t?c.then(t,t):c};const list=e=>new n(e)},6209:(e,t,r)=>{"use strict";const s=r(9806);const n=r(7147);const i=r(1017);const o=r(2975);const a=r(9740);class SymlinkError extends Error{constructor(e,t){super("Cannot extract through symbolic link");this.path=t;this.symlink=e}get name(){return"SylinkError"}}class CwdError extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'");this.path=e;this.code=t}get name(){return"CwdError"}}const cGet=(e,t)=>e.get(a(t));const cSet=(e,t,r)=>e.set(a(t),r);const checkCwd=(e,t)=>{n.stat(e,((r,s)=>{if(r||!s.isDirectory()){r=new CwdError(e,r&&r.code||"ENOTDIR")}t(r)}))};e.exports=(e,t,r)=>{e=a(e);const c=t.umask;const l=t.mode|448;const u=(l&c)!==0;const h=t.uid;const d=t.gid;const p=typeof h==="number"&&typeof d==="number"&&(h!==t.processUid||d!==t.processGid);const m=t.preserve;const y=t.unlink;const g=t.cache;const v=a(t.cwd);const done=(t,s)=>{if(t){r(t)}else{cSet(g,e,true);if(s&&p){o(s,h,d,(e=>done(e)))}else if(u){n.chmod(e,l,r)}else{r()}}};if(g&&cGet(g,e)===true){return done()}if(e===v){return checkCwd(e,done)}if(m){return s(e,{mode:l}).then((e=>done(null,e)),done)}const b=a(i.relative(v,e));const w=b.split("/");mkdir_(v,w,l,g,y,v,null,done)};const mkdir_=(e,t,r,s,o,c,l,u)=>{if(!t.length){return u(null,l)}const h=t.shift();const d=a(i.resolve(e+"/"+h));if(cGet(s,d)){return mkdir_(d,t,r,s,o,c,l,u)}n.mkdir(d,r,onmkdir(d,t,r,s,o,c,l,u))};const onmkdir=(e,t,r,s,i,o,c,l)=>u=>{if(u){n.lstat(e,((h,d)=>{if(h){h.path=h.path&&a(h.path);l(h)}else if(d.isDirectory()){mkdir_(e,t,r,s,i,o,c,l)}else if(i){n.unlink(e,(a=>{if(a){return l(a)}n.mkdir(e,r,onmkdir(e,t,r,s,i,o,c,l))}))}else if(d.isSymbolicLink()){return l(new SymlinkError(e,e+"/"+t.join("/")))}else{l(u)}}))}else{c=c||e;mkdir_(e,t,r,s,i,o,c,l)}};const checkCwdSync=e=>{let t=false;let r="ENOTDIR";try{t=n.statSync(e).isDirectory()}catch(e){r=e.code}finally{if(!t){throw new CwdError(e,r)}}};e.exports.sync=(e,t)=>{e=a(e);const r=t.umask;const c=t.mode|448;const l=(c&r)!==0;const u=t.uid;const h=t.gid;const d=typeof u==="number"&&typeof h==="number"&&(u!==t.processUid||h!==t.processGid);const p=t.preserve;const m=t.unlink;const y=t.cache;const g=a(t.cwd);const done=t=>{cSet(y,e,true);if(t&&d){o.sync(t,u,h)}if(l){n.chmodSync(e,c)}};if(y&&cGet(y,e)===true){return done()}if(e===g){checkCwdSync(g);return done()}if(p){return done(s.sync(e,c))}const v=a(i.relative(g,e));const b=v.split("/");let w=null;for(let e=b.shift(),t=g;e&&(t+="/"+e);e=b.shift()){t=a(i.resolve(t));if(cGet(y,t)){continue}try{n.mkdirSync(t,c);w=w||t;cSet(y,t,true)}catch(e){const r=n.lstatSync(t);if(r.isDirectory()){cSet(y,t,true);continue}else if(m){n.unlinkSync(t);n.mkdirSync(t,c);w=w||t;cSet(y,t,true);continue}else if(r.isSymbolicLink()){return new SymlinkError(t,t+"/"+b.join("/"))}}}return done(w)}},6601:e=>{"use strict";e.exports=(e,t,r)=>{e&=4095;if(r){e=(e|384)&~18}if(t){if(e&256){e|=64}if(e&32){e|=8}if(e&4){e|=1}}return e}},4711:e=>{const t=Object.create(null);const{hasOwnProperty:r}=Object.prototype;e.exports=e=>{if(!r.call(t,e)){t[e]=e.normalize("NFD")}return t[e]}},9740:e=>{const t=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=t!=="win32"?e=>e:e=>e&&e.replace(/\\/g,"/")},7301:(e,t,r)=>{"use strict";class PackJob{constructor(e,t){this.path=e||"./";this.absolute=t;this.entry=null;this.stat=null;this.readdir=null;this.pending=false;this.ignore=false;this.piped=false}}const{Minipass:s}=r(5540);const n=r(7750);const i=r(5917);const o=r(1944);const a=o.Sync;const c=o.Tar;const l=r(3401);const u=Buffer.alloc(1024);const h=Symbol("onStat");const d=Symbol("ended");const p=Symbol("queue");const m=Symbol("current");const y=Symbol("process");const g=Symbol("processing");const v=Symbol("processJob");const b=Symbol("jobs");const w=Symbol("jobDone");const E=Symbol("addFSEntry");const S=Symbol("addTarEntry");const x=Symbol("stat");const R=Symbol("readdir");const P=Symbol("onreaddir");const O=Symbol("pipe");const $=Symbol("entry");const T=Symbol("entryOpt");const A=Symbol("writeEntryClass");const C=Symbol("write");const k=Symbol("ondrain");const I=r(7147);const N=r(1017);const D=r(8920);const L=r(9740);const M=D(class Pack extends s{constructor(e){super(e);e=e||Object.create(null);this.opt=e;this.file=e.file||"";this.cwd=e.cwd||process.cwd();this.maxReadSize=e.maxReadSize;this.preservePaths=!!e.preservePaths;this.strict=!!e.strict;this.noPax=!!e.noPax;this.prefix=L(e.prefix||"");this.linkCache=e.linkCache||new Map;this.statCache=e.statCache||new Map;this.readdirCache=e.readdirCache||new Map;this[A]=o;if(typeof e.onwarn==="function"){this.on("warn",e.onwarn)}this.portable=!!e.portable;this.zip=null;if(e.gzip){if(typeof e.gzip!=="object"){e.gzip={}}if(this.portable){e.gzip.portable=true}this.zip=new n.Gzip(e.gzip);this.zip.on("data",(e=>super.write(e)));this.zip.on("end",(e=>super.end()));this.zip.on("drain",(e=>this[k]()));this.on("resume",(e=>this.zip.resume()))}else{this.on("drain",this[k])}this.noDirRecurse=!!e.noDirRecurse;this.follow=!!e.follow;this.noMtime=!!e.noMtime;this.mtime=e.mtime||null;this.filter=typeof e.filter==="function"?e.filter:e=>true;this[p]=new l;this[b]=0;this.jobs=+e.jobs||4;this[g]=false;this[d]=false}[C](e){return super.write(e)}add(e){this.write(e);return this}end(e){if(e){this.write(e)}this[d]=true;this[y]();return this}write(e){if(this[d]){throw new Error("write after end")}if(e instanceof i){this[S](e)}else{this[E](e)}return this.flowing}[S](e){const t=L(N.resolve(this.cwd,e.path));if(!this.filter(e.path,e)){e.resume()}else{const r=new PackJob(e.path,t,false);r.entry=new c(e,this[T](r));r.entry.on("end",(e=>this[w](r)));this[b]+=1;this[p].push(r)}this[y]()}[E](e){const t=L(N.resolve(this.cwd,e));this[p].push(new PackJob(e,t));this[y]()}[x](e){e.pending=true;this[b]+=1;const t=this.follow?"stat":"lstat";I[t](e.absolute,((t,r)=>{e.pending=false;this[b]-=1;if(t){this.emit("error",t)}else{this[h](e,r)}}))}[h](e,t){this.statCache.set(e.absolute,t);e.stat=t;if(!this.filter(e.path,t)){e.ignore=true}this[y]()}[R](e){e.pending=true;this[b]+=1;I.readdir(e.absolute,((t,r)=>{e.pending=false;this[b]-=1;if(t){return this.emit("error",t)}this[P](e,r)}))}[P](e,t){this.readdirCache.set(e.absolute,t);e.readdir=t;this[y]()}[y](){if(this[g]){return}this[g]=true;for(let e=this[p].head;e!==null&&this[b]<this.jobs;e=e.next){this[v](e.value);if(e.value.ignore){const t=e.next;this[p].removeNode(e);e.next=t}}this[g]=false;if(this[d]&&!this[p].length&&this[b]===0){if(this.zip){this.zip.end(u)}else{super.write(u);super.end()}}}get[m](){return this[p]&&this[p].head&&this[p].head.value}[w](e){this[p].shift();this[b]-=1;this[y]()}[v](e){if(e.pending){return}if(e.entry){if(e===this[m]&&!e.piped){this[O](e)}return}if(!e.stat){if(this.statCache.has(e.absolute)){this[h](e,this.statCache.get(e.absolute))}else{this[x](e)}}if(!e.stat){return}if(e.ignore){return}if(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir){if(this.readdirCache.has(e.absolute)){this[P](e,this.readdirCache.get(e.absolute))}else{this[R](e)}if(!e.readdir){return}}e.entry=this[$](e);if(!e.entry){e.ignore=true;return}if(e===this[m]&&!e.piped){this[O](e)}}[T](e){return{onwarn:(e,t,r)=>this.warn(e,t,r),noPax:this.noPax,cwd:this.cwd,absolute:e.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}}[$](e){this[b]+=1;try{return new this[A](e.path,this[T](e)).on("end",(()=>this[w](e))).on("error",(e=>this.emit("error",e)))}catch(e){this.emit("error",e)}}[k](){if(this[m]&&this[m].entry){this[m].entry.resume()}}[O](e){e.piped=true;if(e.readdir){e.readdir.forEach((t=>{const r=e.path;const s=r==="./"?"":r.replace(/\/*$/,"/");this[E](s+t)}))}const t=e.entry;const r=this.zip;if(r){t.on("data",(e=>{if(!r.write(e)){t.pause()}}))}else{t.on("data",(e=>{if(!super.write(e)){t.pause()}}))}}pause(){if(this.zip){this.zip.pause()}return super.pause()}});class PackSync extends M{constructor(e){super(e);this[A]=a}pause(){}resume(){}[x](e){const t=this.follow?"statSync":"lstatSync";this[h](e,I[t](e.absolute))}[R](e,t){this[P](e,I.readdirSync(e.absolute))}[O](e){const t=e.entry;const r=this.zip;if(e.readdir){e.readdir.forEach((t=>{const r=e.path;const s=r==="./"?"":r.replace(/\/*$/,"/");this[E](s+t)}))}if(r){t.on("data",(e=>{r.write(e)}))}else{t.on("data",(e=>{super[C](e)}))}}}M.Sync=PackSync;e.exports=M},5222:(e,t,r)=>{"use strict";const s=r(8920);const n=r(1703);const i=r(2361);const o=r(3401);const a=1024*1024;const c=r(5917);const l=r(9037);const u=r(7750);const{nextTick:h}=r(7282);const d=Buffer.from([31,139]);const p=Symbol("state");const m=Symbol("writeEntry");const y=Symbol("readEntry");const g=Symbol("nextEntry");const v=Symbol("processEntry");const b=Symbol("extendedHeader");const w=Symbol("globalExtendedHeader");const E=Symbol("meta");const S=Symbol("emitMeta");const x=Symbol("buffer");const R=Symbol("queue");const P=Symbol("ended");const O=Symbol("emittedEnd");const $=Symbol("emit");const T=Symbol("unzip");const A=Symbol("consumeChunk");const C=Symbol("consumeChunkSub");const k=Symbol("consumeBody");const I=Symbol("consumeMeta");const N=Symbol("consumeHeader");const D=Symbol("consuming");const L=Symbol("bufferConcat");const M=Symbol("maybeEnd");const j=Symbol("writing");const F=Symbol("aborted");const U=Symbol("onDone");const B=Symbol("sawValidEntry");const H=Symbol("sawNullBlock");const z=Symbol("sawEOF");const G=Symbol("closeStream");const noop=e=>true;e.exports=s(class Parser extends i{constructor(e){e=e||{};super(e);this.file=e.file||"";this[B]=null;this.on(U,(e=>{if(this[p]==="begin"||this[B]===false){this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}}));if(e.ondone){this.on(U,e.ondone)}else{this.on(U,(e=>{this.emit("prefinish");this.emit("finish");this.emit("end")}))}this.strict=!!e.strict;this.maxMetaEntrySize=e.maxMetaEntrySize||a;this.filter=typeof e.filter==="function"?e.filter:noop;this.writable=true;this.readable=false;this[R]=new o;this[x]=null;this[y]=null;this[m]=null;this[p]="begin";this[E]="";this[b]=null;this[w]=null;this[P]=false;this[T]=null;this[F]=false;this[H]=false;this[z]=false;this.on("end",(()=>this[G]()));if(typeof e.onwarn==="function"){this.on("warn",e.onwarn)}if(typeof e.onentry==="function"){this.on("entry",e.onentry)}}[N](e,t){if(this[B]===null){this[B]=false}let r;try{r=new n(e,t,this[b],this[w])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(r.nullBlock){if(this[H]){this[z]=true;if(this[p]==="begin"){this[p]="header"}this[$]("eof")}else{this[H]=true;this[$]("nullBlock")}}else{this[H]=false;if(!r.cksumValid){this.warn("TAR_ENTRY_INVALID","checksum failure",{header:r})}else if(!r.path){this.warn("TAR_ENTRY_INVALID","path is required",{header:r})}else{const e=r.type;if(/^(Symbolic)?Link$/.test(e)&&!r.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath required",{header:r})}else if(!/^(Symbolic)?Link$/.test(e)&&r.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:r})}else{const e=this[m]=new c(r,this[b],this[w]);if(!this[B]){if(e.remain){const onend=()=>{if(!e.invalid){this[B]=true}};e.on("end",onend)}else{this[B]=true}}if(e.meta){if(e.size>this.maxMetaEntrySize){e.ignore=true;this[$]("ignoredEntry",e);this[p]="ignore";e.resume()}else if(e.size>0){this[E]="";e.on("data",(e=>this[E]+=e));this[p]="meta"}}else{this[b]=null;e.ignore=e.ignore||!this.filter(e.path,e);if(e.ignore){this[$]("ignoredEntry",e);this[p]=e.remain?"ignore":"header";e.resume()}else{if(e.remain){this[p]="body"}else{this[p]="header";e.end()}if(!this[y]){this[R].push(e);this[g]()}else{this[R].push(e)}}}}}}}[G](){h((()=>this.emit("close")))}[v](e){let t=true;if(!e){this[y]=null;t=false}else if(Array.isArray(e)){this.emit.apply(this,e)}else{this[y]=e;this.emit("entry",e);if(!e.emittedEnd){e.on("end",(e=>this[g]()));t=false}}return t}[g](){do{}while(this[v](this[R].shift()));if(!this[R].length){const e=this[y];const t=!e||e.flowing||e.size===e.remain;if(t){if(!this[j]){this.emit("drain")}}else{e.once("drain",(e=>this.emit("drain")))}}}[k](e,t){const r=this[m];const s=r.blockRemain;const n=s>=e.length&&t===0?e:e.slice(t,t+s);r.write(n);if(!r.blockRemain){this[p]="header";this[m]=null;r.end()}return n.length}[I](e,t){const r=this[m];const s=this[k](e,t);if(!this[m]){this[S](r)}return s}[$](e,t,r){if(!this[R].length&&!this[y]){this.emit(e,t,r)}else{this[R].push([e,t,r])}}[S](e){this[$]("meta",this[E]);switch(e.type){case"ExtendedHeader":case"OldExtendedHeader":this[b]=l.parse(this[E],this[b],false);break;case"GlobalExtendedHeader":this[w]=l.parse(this[E],this[w],true);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[b]=this[b]||Object.create(null);this[b].path=this[E].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[b]=this[b]||Object.create(null);this[b].linkpath=this[E].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[F]=true;this.emit("abort",e);this.warn("TAR_ABORT",e,{recoverable:false})}write(e){if(this[F]){return}if(this[T]===null&&e){if(this[x]){e=Buffer.concat([this[x],e]);this[x]=null}if(e.length<d.length){this[x]=e;return true}for(let t=0;this[T]===null&&t<d.length;t++){if(e[t]!==d[t]){this[T]=false}}if(this[T]===null){const t=this[P];this[P]=false;this[T]=new u.Unzip;this[T].on("data",(e=>this[A](e)));this[T].on("error",(e=>this.abort(e)));this[T].on("end",(e=>{this[P]=true;this[A]()}));this[j]=true;const r=this[T][t?"end":"write"](e);this[j]=false;return r}}this[j]=true;if(this[T]){this[T].write(e)}else{this[A](e)}this[j]=false;const t=this[R].length?false:this[y]?this[y].flowing:true;if(!t&&!this[R].length){this[y].once("drain",(e=>this.emit("drain")))}return t}[L](e){if(e&&!this[F]){this[x]=this[x]?Buffer.concat([this[x],e]):e}}[M](){if(this[P]&&!this[O]&&!this[F]&&!this[D]){this[O]=true;const e=this[m];if(e&&e.blockRemain){const t=this[x]?this[x].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e});if(this[x]){e.write(this[x])}e.end()}this[$](U)}}[A](e){if(this[D]){this[L](e)}else if(!e&&!this[x]){this[M]()}else{this[D]=true;if(this[x]){this[L](e);const t=this[x];this[x]=null;this[C](t)}else{this[C](e)}while(this[x]&&this[x].length>=512&&!this[F]&&!this[z]){const e=this[x];this[x]=null;this[C](e)}this[D]=false}if(!this[x]||this[P]){this[M]()}}[C](e){let t=0;const r=e.length;while(t+512<=r&&!this[F]&&!this[z]){switch(this[p]){case"begin":case"header":this[N](e,t);t+=512;break;case"ignore":case"body":t+=this[k](e,t);break;case"meta":t+=this[I](e,t);break;default:throw new Error("invalid state: "+this[p])}}if(t<r){if(this[x]){this[x]=Buffer.concat([e.slice(t),this[x]])}else{this[x]=e.slice(t)}}}end(e){if(!this[F]){if(this[T]){this[T].end(e)}else{this[P]=true;this.write(e)}}}})},6716:(e,t,r)=>{const s=r(9491);const n=r(4711);const i=r(2517);const{join:o}=r(1017);const a=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const c=a==="win32";e.exports=()=>{const e=new Map;const t=new Map;const getDirs=e=>{const t=e.split("/").slice(0,-1).reduce(((e,t)=>{if(e.length){t=o(e[e.length-1],t)}e.push(t||"/");return e}),[]);return t};const r=new Set;const getQueues=r=>{const s=t.get(r);if(!s){throw new Error("function does not have any path reservations")}return{paths:s.paths.map((t=>e.get(t))),dirs:[...s.dirs].map((t=>e.get(t)))}};const check=e=>{const{paths:t,dirs:r}=getQueues(e);return t.every((t=>t[0]===e))&&r.every((t=>t[0]instanceof Set&&t[0].has(e)))};const run=e=>{if(r.has(e)||!check(e)){return false}r.add(e);e((()=>clear(e)));return true};const clear=n=>{if(!r.has(n)){return false}const{paths:i,dirs:o}=t.get(n);const a=new Set;i.forEach((t=>{const r=e.get(t);s.equal(r[0],n);if(r.length===1){e.delete(t)}else{r.shift();if(typeof r[0]==="function"){a.add(r[0])}else{r[0].forEach((e=>a.add(e)))}}}));o.forEach((t=>{const r=e.get(t);s(r[0]instanceof Set);if(r[0].size===1&&r.length===1){e.delete(t)}else if(r[0].size===1){r.shift();a.add(r[0])}else{r[0].delete(n)}}));r.delete(n);a.forEach((e=>run(e)));return true};const reserve=(r,s)=>{r=c?["win32 parallelization disabled"]:r.map((e=>i(o(n(e))).toLowerCase()));const a=new Set(r.map((e=>getDirs(e))).reduce(((e,t)=>e.concat(t))));t.set(s,{dirs:a,paths:r});r.forEach((t=>{const r=e.get(t);if(!r){e.set(t,[s])}else{r.push(s)}}));a.forEach((t=>{const r=e.get(t);if(!r){e.set(t,[new Set([s])])}else if(r[r.length-1]instanceof Set){r[r.length-1].add(s)}else{r.push(new Set([s]))}}));return run(s)};return{check:check,reserve:reserve}}},9037:(e,t,r)=>{"use strict";const s=r(1703);const n=r(1017);class Pax{constructor(e,t){this.atime=e.atime||null;this.charset=e.charset||null;this.comment=e.comment||null;this.ctime=e.ctime||null;this.gid=e.gid||null;this.gname=e.gname||null;this.linkpath=e.linkpath||null;this.mtime=e.mtime||null;this.path=e.path||null;this.size=e.size||null;this.uid=e.uid||null;this.uname=e.uname||null;this.dev=e.dev||null;this.ino=e.ino||null;this.nlink=e.nlink||null;this.global=t||false}encode(){const e=this.encodeBody();if(e===""){return null}const t=Buffer.byteLength(e);const r=512*Math.ceil(1+t/512);const i=Buffer.allocUnsafe(r);for(let e=0;e<512;e++){i[e]=0}new s({path:("PaxHeader/"+n.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,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(e,512,t,"utf8");for(let e=t+512;e<i.length;e++){i[e]=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(e){if(this[e]===null||this[e]===undefined){return""}const t=this[e]instanceof Date?this[e].getTime()/1e3:this[e];const r=" "+(e==="dev"||e==="ino"||e==="nlink"?"SCHILY.":"")+e+"="+t+"\n";const s=Buffer.byteLength(r);let n=Math.floor(Math.log(s)/Math.log(10))+1;if(s+n>=Math.pow(10,n)){n+=1}const i=n+s;return i+r}}Pax.parse=(e,t,r)=>new Pax(merge(parseKV(e),t),r);const merge=(e,t)=>t?Object.keys(e).reduce(((t,r)=>(t[r]=e[r],t)),t):e;const parseKV=e=>e.replace(/\n$/,"").split("\n").reduce(parseKVLine,Object.create(null));const parseKVLine=(e,t)=>{const r=parseInt(t,10);if(r!==Buffer.byteLength(t)+1){return e}t=t.slice((r+" ").length);const s=t.split("=");const n=s.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!n){return e}const i=s.join("=");e[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(i*1e3):/^[0-9]+$/.test(i)?+i:i;return e};e.exports=Pax},5917:(e,t,r)=>{"use strict";const{Minipass:s}=r(5540);const n=r(9740);const i=Symbol("slurp");e.exports=class ReadEntry extends s{constructor(e,t,r){super();this.pause();this.extended=t;this.globalExtended=r;this.header=e;this.startBlockSize=512*Math.ceil(e.size/512);this.blockRemain=this.startBlockSize;this.remain=e.size;this.type=e.type;this.meta=false;this.ignore=false;switch(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=true;break;default:this.ignore=true}this.path=n(e.path);this.mode=e.mode;if(this.mode){this.mode=this.mode&4095}this.uid=e.uid;this.gid=e.gid;this.uname=e.uname;this.gname=e.gname;this.size=e.size;this.mtime=e.mtime;this.atime=e.atime;this.ctime=e.ctime;this.linkpath=n(e.linkpath);this.uname=e.uname;this.gname=e.gname;if(t){this[i](t)}if(r){this[i](r,true)}}write(e){const t=e.length;if(t>this.blockRemain){throw new Error("writing more to entry than is appropriate")}const r=this.remain;const s=this.blockRemain;this.remain=Math.max(0,r-t);this.blockRemain=Math.max(0,s-t);if(this.ignore){return true}if(r>=t){return super.write(e)}return super.write(e.slice(0,r))}[i](e,t){for(const r in e){if(e[r]!==null&&e[r]!==undefined&&!(t&&r==="path")){this[r]=r==="path"||r==="linkpath"?n(e[r]):e[r]}}}}},1138:(e,t,r)=>{"use strict";const s=r(3831);const n=r(7301);const i=r(7147);const o=r(644);const a=r(4975);const c=r(1017);const l=r(1703);e.exports=(e,t,r)=>{const n=s(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")}t=Array.from(t);return n.sync?replaceSync(n,t):replace(n,t,r)};const replaceSync=(e,t)=>{const r=new n.Sync(e);let s=true;let o;let a;try{try{o=i.openSync(e.file,"r+")}catch(t){if(t.code==="ENOENT"){o=i.openSync(e.file,"w+")}else{throw t}}const n=i.fstatSync(o);const c=Buffer.alloc(512);e:for(a=0;a<n.size;a+=512){for(let e=0,t=0;e<512;e+=t){t=i.readSync(o,c,e,c.length-e,a+e);if(a===0&&c[0]===31&&c[1]===139){throw new Error("cannot append to compressed archives")}if(!t){break e}}const t=new l(c);if(!t.cksumValid){break}const r=512*Math.ceil(t.size/512);if(a+r+512>n.size){break}a+=r;if(e.mtimeCache){e.mtimeCache.set(t.path,t.mtime)}}s=false;streamSync(e,r,a,o,t)}finally{if(s){try{i.closeSync(o)}catch(e){}}}};const streamSync=(e,t,r,s,n)=>{const i=new o.WriteStreamSync(e.file,{fd:s,start:r});t.pipe(i);addFilesSync(t,n)};const replace=(e,t,r)=>{t=Array.from(t);const s=new n(e);const getPos=(t,r,s)=>{const cb=(e,r)=>{if(e){i.close(t,(t=>s(e)))}else{s(null,r)}};let n=0;if(r===0){return cb(null,0)}let o=0;const a=Buffer.alloc(512);const onread=(s,c)=>{if(s){return cb(s)}o+=c;if(o<512&&c){return i.read(t,a,o,a.length-o,n+o,onread)}if(n===0&&a[0]===31&&a[1]===139){return cb(new Error("cannot append to compressed archives"))}if(o<512){return cb(null,n)}const u=new l(a);if(!u.cksumValid){return cb(null,n)}const h=512*Math.ceil(u.size/512);if(n+h+512>r){return cb(null,n)}n+=h+512;if(n>=r){return cb(null,n)}if(e.mtimeCache){e.mtimeCache.set(u.path,u.mtime)}o=0;i.read(t,a,0,512,n,onread)};i.read(t,a,0,512,n,onread)};const a=new Promise(((r,n)=>{s.on("error",n);let a="r+";const onopen=(c,l)=>{if(c&&c.code==="ENOENT"&&a==="r+"){a="w+";return i.open(e.file,a,onopen)}if(c){return n(c)}i.fstat(l,((a,c)=>{if(a){return i.close(l,(()=>n(a)))}getPos(l,c.size,((i,a)=>{if(i){return n(i)}const c=new o.WriteStream(e.file,{fd:l,start:a});s.pipe(c);c.on("error",n);c.on("close",r);addFilesAsync(s,t)}))}))};i.open(e.file,a,onopen)}));return r?a.then(r,r):a};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@"){a({file:c.resolve(e.cwd,t.slice(1)),sync:true,noResume:true,onentry:t=>e.add(t)})}else{e.add(t)}}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const r=t.shift();if(r.charAt(0)==="@"){return a({file:c.resolve(e.cwd,r.slice(1)),noResume:true,onentry:t=>e.add(t)}).then((r=>addFilesAsync(e,t)))}else{e.add(r)}}e.end()}},332:(e,t,r)=>{const{isAbsolute:s,parse:n}=r(1017).win32;e.exports=e=>{let t="";let r=n(e);while(s(e)||r.root){const s=e.charAt(0)==="/"&&e.slice(0,4)!=="//?/"?"/":r.root;e=e.slice(s.length);t+=s;r=n(e)}return[t,e]}},2517:e=>{e.exports=e=>{let t=e.length-1;let r=-1;while(t>-1&&e.charAt(t)==="/"){r=t;t--}return r===-1?e:e.slice(0,r)}},1046:(e,t)=>{"use strict";t.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"]]);t.code=new Map(Array.from(t.name).map((e=>[e[1],e[0]])))},5951:(e,t,r)=>{"use strict";const s=r(9491);const n=r(5222);const i=r(7147);const o=r(644);const a=r(1017);const c=r(6209);const l=r(4099);const u=r(6716);const h=r(332);const d=r(9740);const p=r(2517);const m=r(4711);const y=Symbol("onEntry");const g=Symbol("checkFs");const v=Symbol("checkFs2");const b=Symbol("pruneCache");const w=Symbol("isReusable");const E=Symbol("makeFs");const S=Symbol("file");const x=Symbol("directory");const R=Symbol("link");const P=Symbol("symlink");const O=Symbol("hardlink");const $=Symbol("unsupported");const T=Symbol("checkPath");const A=Symbol("mkdir");const C=Symbol("onError");const k=Symbol("pending");const I=Symbol("pend");const N=Symbol("unpend");const D=Symbol("ended");const L=Symbol("maybeClose");const M=Symbol("skip");const j=Symbol("doChown");const F=Symbol("uid");const U=Symbol("gid");const B=Symbol("checkedCwd");const H=r(6113);const z=r(9262);const G=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const V=G==="win32";const unlinkFile=(e,t)=>{if(!V){return i.unlink(e,t)}const r=e+".DELETE."+H.randomBytes(16).toString("hex");i.rename(e,r,(e=>{if(e){return t(e)}i.unlink(r,t)}))};const unlinkFileSync=e=>{if(!V){return i.unlinkSync(e)}const t=e+".DELETE."+H.randomBytes(16).toString("hex");i.renameSync(e,t);i.unlinkSync(t)};const uint32=(e,t,r)=>e===e>>>0?e:t===t>>>0?t:r;const cacheKeyNormalize=e=>p(d(m(e))).toLowerCase();const pruneCache=(e,t)=>{t=cacheKeyNormalize(t);for(const r of e.keys()){const s=cacheKeyNormalize(r);if(s===t||s.indexOf(t+"/")===0){e.delete(r)}}};const dropCache=e=>{for(const t of e.keys()){e.delete(t)}};class Unpack extends n{constructor(e){if(!e){e={}}e.ondone=e=>{this[D]=true;this[L]()};super(e);this[B]=false;this.reservations=u();this.transform=typeof e.transform==="function"?e.transform:null;this.writable=true;this.readable=false;this[k]=0;this[D]=false;this.dirCache=e.dirCache||new Map;if(typeof e.uid==="number"||typeof e.gid==="number"){if(typeof e.uid!=="number"||typeof e.gid!=="number"){throw new TypeError("cannot set owner without number uid and gid")}if(e.preserveOwner){throw new TypeError("cannot preserve owner in archive and also set owner explicitly")}this.uid=e.uid;this.gid=e.gid;this.setOwner=true}else{this.uid=null;this.gid=null;this.setOwner=false}if(e.preserveOwner===undefined&&typeof e.uid!=="number"){this.preserveOwner=process.getuid&&process.getuid()===0}else{this.preserveOwner=!!e.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=e.forceChown===true;this.win32=!!e.win32||V;this.newer=!!e.newer;this.keep=!!e.keep;this.noMtime=!!e.noMtime;this.preservePaths=!!e.preservePaths;this.unlink=!!e.unlink;this.cwd=d(a.resolve(e.cwd||process.cwd()));this.strip=+e.strip||0;this.processUmask=e.noChmod?0:process.umask();this.umask=typeof e.umask==="number"?e.umask:this.processUmask;this.dmode=e.dmode||511&~this.umask;this.fmode=e.fmode||438&~this.umask;this.on("entry",(e=>this[y](e)))}warn(e,t,r={}){if(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT"){r.recoverable=false}return super.warn(e,t,r)}[L](){if(this[D]&&this[k]===0){this.emit("prefinish");this.emit("finish");this.emit("end")}}[T](e){if(this.strip){const t=d(e.path).split("/");if(t.length<this.strip){return false}e.path=t.slice(this.strip).join("/");if(e.type==="Link"){const t=d(e.linkpath).split("/");if(t.length>=this.strip){e.linkpath=t.slice(this.strip).join("/")}else{return false}}}if(!this.preservePaths){const t=d(e.path);const r=t.split("/");if(r.includes("..")||V&&/^[a-z]:\.\.$/i.test(r[0])){this.warn("TAR_ENTRY_ERROR",`path contains '..'`,{entry:e,path:t});return false}const[s,n]=h(t);if(s){e.path=n;this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:e,path:t})}}if(a.isAbsolute(e.path)){e.absolute=d(a.resolve(e.path))}else{e.absolute=d(a.resolve(this.cwd,e.path))}if(!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd){this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:d(e.path),resolvedPath:e.absolute,cwd:this.cwd});return false}if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir"){return false}if(this.win32){const{root:t}=a.win32.parse(e.absolute);e.absolute=t+l.encode(e.absolute.slice(t.length));const{root:r}=a.win32.parse(e.path);e.path=r+l.encode(e.path.slice(r.length))}return true}[y](e){if(!this[T](e)){return e.resume()}s.equal(typeof e.absolute,"string");switch(e.type){case"Directory":case"GNUDumpDir":if(e.mode){e.mode=e.mode|448}case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[g](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[$](e)}}[C](e,t){if(e.name==="CwdError"){this.emit("error",e)}else{this.warn("TAR_ENTRY_ERROR",e,{entry:t});this[N]();t.resume()}}[A](e,t,r){c(d(e),{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:t,noChmod:this.noChmod},r)}[j](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==="number"&&e.uid!==this.processUid||typeof e.gid==="number"&&e.gid!==this.processGid)||(typeof this.uid==="number"&&this.uid!==this.processUid||typeof this.gid==="number"&&this.gid!==this.processGid)}[F](e){return uint32(this.uid,e.uid,this.processUid)}[U](e){return uint32(this.gid,e.gid,this.processGid)}[S](e,t){const r=e.mode&4095||this.fmode;const s=new o.WriteStream(e.absolute,{flags:z(e.size),mode:r,autoClose:false});s.on("error",(r=>{if(s.fd){i.close(s.fd,(()=>{}))}s.write=()=>true;this[C](r,e);t()}));let n=1;const done=r=>{if(r){if(s.fd){i.close(s.fd,(()=>{}))}this[C](r,e);t();return}if(--n===0){i.close(s.fd,(r=>{if(r){this[C](r,e)}else{this[N]()}t()}))}};s.on("finish",(t=>{const r=e.absolute;const o=s.fd;if(e.mtime&&!this.noMtime){n++;const t=e.atime||new Date;const s=e.mtime;i.futimes(o,t,s,(e=>e?i.utimes(r,t,s,(t=>done(t&&e))):done()))}if(this[j](e)){n++;const t=this[F](e);const s=this[U](e);i.fchown(o,t,s,(e=>e?i.chown(r,t,s,(t=>done(t&&e))):done()))}done()}));const a=this.transform?this.transform(e)||e:e;if(a!==e){a.on("error",(r=>{this[C](r,e);t()}));e.pipe(a)}a.pipe(s)}[x](e,t){const r=e.mode&4095||this.dmode;this[A](e.absolute,r,(r=>{if(r){this[C](r,e);t();return}let s=1;const done=r=>{if(--s===0){t();this[N]();e.resume()}};if(e.mtime&&!this.noMtime){s++;i.utimes(e.absolute,e.atime||new Date,e.mtime,done)}if(this[j](e)){s++;i.chown(e.absolute,this[F](e),this[U](e),done)}done()}))}[$](e){e.unsupported=true;this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e});e.resume()}[P](e,t){this[R](e,e.linkpath,"symlink",t)}[O](e,t){const r=d(a.resolve(this.cwd,e.linkpath));this[R](e,r,"link",t)}[I](){this[k]++}[N](){this[k]--;this[L]()}[M](e){this[N]();e.resume()}[w](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&!V}[g](e){this[I]();const t=[e.path];if(e.linkpath){t.push(e.linkpath)}this.reservations.reserve(t,(t=>this[v](e,t)))}[b](e){if(e.type==="SymbolicLink"){dropCache(this.dirCache)}else if(e.type!=="Directory"){pruneCache(this.dirCache,e.absolute)}}[v](e,t){this[b](e);const done=r=>{this[b](e);t(r)};const checkCwd=()=>{this[A](this.cwd,this.dmode,(t=>{if(t){this[C](t,e);done();return}this[B]=true;start()}))};const start=()=>{if(e.absolute!==this.cwd){const t=d(a.dirname(e.absolute));if(t!==this.cwd){return this[A](t,this.dmode,(t=>{if(t){this[C](t,e);done();return}afterMakeParent()}))}}afterMakeParent()};const afterMakeParent=()=>{i.lstat(e.absolute,((t,r)=>{if(r&&(this.keep||this.newer&&r.mtime>e.mtime)){this[M](e);done();return}if(t||this[w](e,r)){return this[E](null,e,done)}if(r.isDirectory()){if(e.type==="Directory"){const t=!this.noChmod&&e.mode&&(r.mode&4095)!==e.mode;const afterChmod=t=>this[E](t,e,done);if(!t){return afterChmod()}return i.chmod(e.absolute,e.mode,afterChmod)}if(e.absolute!==this.cwd){return i.rmdir(e.absolute,(t=>this[E](t,e,done)))}}if(e.absolute===this.cwd){return this[E](null,e,done)}unlinkFile(e.absolute,(t=>this[E](t,e,done)))}))};if(this[B]){start()}else{checkCwd()}}[E](e,t,r){if(e){this[C](e,t);r();return}switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[S](t,r);case"Link":return this[O](t,r);case"SymbolicLink":return this[P](t,r);case"Directory":case"GNUDumpDir":return this[x](t,r)}}[R](e,t,r,s){i[r](t,e.absolute,(t=>{if(t){this[C](t,e)}else{this[N]();e.resume()}s()}))}}const callSync=e=>{try{return[null,e()]}catch(e){return[e,null]}};class UnpackSync extends Unpack{[E](e,t){return super[E](e,t,(()=>{}))}[g](e){this[b](e);if(!this[B]){const t=this[A](this.cwd,this.dmode);if(t){return this[C](t,e)}this[B]=true}if(e.absolute!==this.cwd){const t=d(a.dirname(e.absolute));if(t!==this.cwd){const r=this[A](t,this.dmode);if(r){return this[C](r,e)}}}const[t,r]=callSync((()=>i.lstatSync(e.absolute)));if(r&&(this.keep||this.newer&&r.mtime>e.mtime)){return this[M](e)}if(t||this[w](e,r)){return this[E](null,e)}if(r.isDirectory()){if(e.type==="Directory"){const t=!this.noChmod&&e.mode&&(r.mode&4095)!==e.mode;const[s]=t?callSync((()=>{i.chmodSync(e.absolute,e.mode)})):[];return this[E](s,e)}const[t]=callSync((()=>i.rmdirSync(e.absolute)));this[E](t,e)}const[s]=e.absolute===this.cwd?[]:callSync((()=>unlinkFileSync(e.absolute)));this[E](s,e)}[S](e,t){const r=e.mode&4095||this.fmode;const oner=r=>{let n;try{i.closeSync(s)}catch(e){n=e}if(r||n){this[C](r||n,e)}t()};let s;try{s=i.openSync(e.absolute,z(e.size),r)}catch(e){return oner(e)}const n=this.transform?this.transform(e)||e:e;if(n!==e){n.on("error",(t=>this[C](t,e)));e.pipe(n)}n.on("data",(e=>{try{i.writeSync(s,e,0,e.length)}catch(e){oner(e)}}));n.on("end",(t=>{let r=null;if(e.mtime&&!this.noMtime){const t=e.atime||new Date;const n=e.mtime;try{i.futimesSync(s,t,n)}catch(s){try{i.utimesSync(e.absolute,t,n)}catch(e){r=s}}}if(this[j](e)){const t=this[F](e);const n=this[U](e);try{i.fchownSync(s,t,n)}catch(s){try{i.chownSync(e.absolute,t,n)}catch(e){r=r||s}}}oner(r)}))}[x](e,t){const r=e.mode&4095||this.dmode;const s=this[A](e.absolute,r);if(s){this[C](s,e);t();return}if(e.mtime&&!this.noMtime){try{i.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(s){}}if(this[j](e)){try{i.chownSync(e.absolute,this[F](e),this[U](e))}catch(s){}}t();e.resume()}[A](e,t){try{return c.sync(d(e),{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:t})}catch(e){return e}}[R](e,t,r,s){try{i[r+"Sync"](t,e.absolute);s();e.resume()}catch(t){return this[C](t,e)}}}Unpack.Sync=UnpackSync;e.exports=Unpack},9472:(e,t,r)=>{"use strict";const s=r(3831);const n=r(1138);e.exports=(e,t,r)=>{const i=s(e);if(!i.file){throw new TypeError("file is required")}if(i.gzip){throw new TypeError("cannot append to compressed archives")}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);mtimeFilter(i);return n(i,t,r)};const mtimeFilter=e=>{const t=e.filter;if(!e.mtimeCache){e.mtimeCache=new Map}e.filter=t?(r,s)=>t(r,s)&&!(e.mtimeCache.get(r)>s.mtime):(t,r)=>!(e.mtimeCache.get(t)>r.mtime)}},8920:e=>{"use strict";e.exports=e=>class extends e{warn(e,t,r={}){if(this.file){r.file=this.file}if(this.cwd){r.cwd=this.cwd}r.code=t instanceof Error&&t.code||e;r.tarCode=e;if(!this.strict&&r.recoverable!==false){if(t instanceof Error){r=Object.assign(t,r);t=t.message}this.emit("warn",r.tarCode,t,r)}else if(t instanceof Error){this.emit("error",Object.assign(t,r))}else{this.emit("error",Object.assign(new Error(`${e}: ${t}`),r))}}}},4099:e=>{"use strict";const t=["|","<",">","?",":"];const r=t.map((e=>String.fromCharCode(61440+e.charCodeAt(0))));const s=new Map(t.map(((e,t)=>[e,r[t]])));const n=new Map(r.map(((e,r)=>[e,t[r]])));e.exports={encode:e=>t.reduce(((e,t)=>e.split(t).join(s.get(t))),e),decode:e=>r.reduce(((e,t)=>e.split(t).join(n.get(t))),e)}},1944:(e,t,r)=>{"use strict";const{Minipass:s}=r(5540);const n=r(9037);const i=r(1703);const o=r(7147);const a=r(1017);const c=r(9740);const l=r(2517);const prefixPath=(e,t)=>{if(!t){return c(e)}e=c(e).replace(/^\.(\/|$)/,"");return l(t)+"/"+e};const u=16*1024*1024;const h=Symbol("process");const d=Symbol("file");const p=Symbol("directory");const m=Symbol("symlink");const y=Symbol("hardlink");const g=Symbol("header");const v=Symbol("read");const b=Symbol("lstat");const w=Symbol("onlstat");const E=Symbol("onread");const S=Symbol("onreadlink");const x=Symbol("openfile");const R=Symbol("onopenfile");const P=Symbol("close");const O=Symbol("mode");const $=Symbol("awaitDrain");const T=Symbol("ondrain");const A=Symbol("prefix");const C=Symbol("hadError");const k=r(8920);const I=r(4099);const N=r(332);const D=r(6601);const L=k(class WriteEntry extends s{constructor(e,t){t=t||{};super(t);if(typeof e!=="string"){throw new TypeError("path is required")}this.path=c(e);this.portable=!!t.portable;this.myuid=process.getuid&&process.getuid()||0;this.myuser=process.env.USER||"";this.maxReadSize=t.maxReadSize||u;this.linkCache=t.linkCache||new Map;this.statCache=t.statCache||new Map;this.preservePaths=!!t.preservePaths;this.cwd=c(t.cwd||process.cwd());this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.mtime=t.mtime||null;this.prefix=t.prefix?c(t.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;if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}let r=false;if(!this.preservePaths){const[e,t]=N(this.path);if(e){this.path=t;r=e}}this.win32=!!t.win32||process.platform==="win32";if(this.win32){this.path=I.decode(this.path.replace(/\\/g,"/"));e=e.replace(/\\/g,"/")}this.absolute=c(t.absolute||a.resolve(this.cwd,e));if(this.path===""){this.path="./"}if(r){this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path})}if(this.statCache.has(this.absolute)){this[w](this.statCache.get(this.absolute))}else{this[b]()}}emit(e,...t){if(e==="error"){this[C]=true}return super.emit(e,...t)}[b](){o.lstat(this.absolute,((e,t)=>{if(e){return this.emit("error",e)}this[w](t)}))}[w](e){this.statCache.set(this.absolute,e);this.stat=e;if(!e.isFile()){e.size=0}this.type=getType(e);this.emit("stat",e);this[h]()}[h](){switch(this.type){case"File":return this[d]();case"Directory":return this[p]();case"SymbolicLink":return this[m]();default:return this.end()}}[O](e){return D(e,this.type==="Directory",this.portable)}[A](e){return prefixPath(e,this.prefix)}[g](){if(this.type==="Directory"&&this.portable){this.noMtime=true}this.header=new i({path:this[A](this.path),linkpath:this.type==="Link"?this[A](this.linkpath):this.linkpath,mode:this[O](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});if(this.header.encode()&&!this.noPax){super.write(new n({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[A](this.path),linkpath:this.type==="Link"?this[A](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)}[p](){if(this.path.slice(-1)!=="/"){this.path+="/"}this.stat.size=0;this[g]();this.end()}[m](){o.readlink(this.absolute,((e,t)=>{if(e){return this.emit("error",e)}this[S](t)}))}[S](e){this.linkpath=c(e);this[g]();this.end()}[y](e){this.type="Link";this.linkpath=c(a.relative(this.cwd,e));this.stat.size=0;this[g]();this.end()}[d](){if(this.stat.nlink>1){const e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){const t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0){return this[y](t)}}this.linkCache.set(e,this.absolute)}this[g]();if(this.stat.size===0){return this.end()}this[x]()}[x](){o.open(this.absolute,"r",((e,t)=>{if(e){return this.emit("error",e)}this[R](t)}))}[R](e){this.fd=e;if(this[C]){return this[P]()}this.blockLen=512*Math.ceil(this.stat.size/512);this.blockRemain=this.blockLen;const t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t);this.offset=0;this.pos=0;this.remain=this.stat.size;this.length=this.buf.length;this[v]()}[v](){const{fd:e,buf:t,offset:r,length:s,pos:n}=this;o.read(e,t,r,s,n,((e,t)=>{if(e){return this[P]((()=>this.emit("error",e)))}this[E](t)}))}[P](e){o.close(this.fd,e)}[E](e){if(e<=0&&this.remain>0){const e=new Error("encountered unexpected EOF");e.path=this.absolute;e.syscall="read";e.code="EOF";return this[P]((()=>this.emit("error",e)))}if(e>this.remain){const e=new Error("did not encounter expected EOF");e.path=this.absolute;e.syscall="read";e.code="EOF";return this[P]((()=>this.emit("error",e)))}if(e===this.remain){for(let t=e;t<this.length&&e<this.blockRemain;t++){this.buf[t+this.offset]=0;e++;this.remain++}}const t=this.offset===0&&e===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+e);const r=this.write(t);if(!r){this[$]((()=>this[T]()))}else{this[T]()}}[$](e){this.once("drain",e)}write(e){if(this.blockRemain<e.length){const e=new Error("writing more data than expected");e.path=this.absolute;return this.emit("error",e)}this.remain-=e.length;this.blockRemain-=e.length;this.pos+=e.length;this.offset+=e.length;return super.write(e)}[T](){if(!this.remain){if(this.blockRemain){super.write(Buffer.alloc(this.blockRemain))}return this[P]((e=>e?this.emit("error",e):this.end()))}if(this.offset>=this.length){this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length));this.offset=0}this.length=this.buf.length-this.offset;this[v]()}});class WriteEntrySync extends L{[b](){this[w](o.lstatSync(this.absolute))}[m](){this[S](o.readlinkSync(this.absolute))}[x](){this[R](o.openSync(this.absolute,"r"))}[v](){let e=true;try{const{fd:t,buf:r,offset:s,length:n,pos:i}=this;const a=o.readSync(t,r,s,n,i);this[E](a);e=false}finally{if(e){try{this[P]((()=>{}))}catch(e){}}}}[$](e){e()}[P](e){o.closeSync(this.fd);e()}}const M=k(class WriteEntryTar extends s{constructor(e,t){t=t||{};super(t);this.preservePaths=!!t.preservePaths;this.portable=!!t.portable;this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.readEntry=e;this.type=e.type;if(this.type==="Directory"&&this.portable){this.noMtime=true}this.prefix=t.prefix||null;this.path=c(e.path);this.mode=this[O](e.mode);this.uid=this.portable?null:e.uid;this.gid=this.portable?null:e.gid;this.uname=this.portable?null:e.uname;this.gname=this.portable?null:e.gname;this.size=e.size;this.mtime=this.noMtime?null:t.mtime||e.mtime;this.atime=this.portable?null:e.atime;this.ctime=this.portable?null:e.ctime;this.linkpath=c(e.linkpath);if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}let r=false;if(!this.preservePaths){const[e,t]=N(this.path);if(e){this.path=t;r=e}}this.remain=e.size;this.blockRemain=e.startBlockSize;this.header=new i({path:this[A](this.path),linkpath:this.type==="Link"?this[A](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});if(r){this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path})}if(this.header.encode()&&!this.noPax){super.write(new n({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[A](this.path),linkpath:this.type==="Link"?this[A](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);e.pipe(this)}[A](e){return prefixPath(e,this.prefix)}[O](e){return D(e,this.type==="Directory",this.portable)}write(e){const t=e.length;if(t>this.blockRemain){throw new Error("writing more to entry than is appropriate")}this.blockRemain-=t;return super.write(e)}end(){if(this.blockRemain){super.write(Buffer.alloc(this.blockRemain))}return super.end()}});L.Sync=WriteEntrySync;L.Tar=M;const getType=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=L},3132:(e,t,r)=>{"use strict";const{Readable:s}=r(2781);const toReadableStream=e=>new s({read(){this.push(e);this.push(null)}});e.exports=toReadableStream;e.exports["default"]=toReadableStream},492:(e,t,r)=>{"use strict";
64
+ e.exports=runParallel;const s=r(592);function runParallel(e,t){let r,n,i;let o=true;if(Array.isArray(e)){r=[];n=e.length}else{i=Object.keys(e);r={};n=i.length}function done(e){function end(){if(t)t(e,r);t=null}if(o)s(end);else end()}function each(e,t,s){r[e]=s;if(--n===0||t){done(t)}}if(!n){done(null)}else if(i){i.forEach((function(t){e[t]((function(e,r){each(t,e,r)}))}))}else{e.forEach((function(e,t){e((function(e,r){each(t,e,r)}))}))}o=false}},6911:(e,t,r)=>{
65
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
66
+ var s=r(4300);var n=s.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=s}else{copyProps(s,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return n(e,t,r)}SafeBuffer.prototype=Object.create(n.prototype);copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var s=n(e);if(t!==undefined){if(typeof r==="string"){s.fill(t,r)}else{s.fill(t)}}else{s.fill(0)}return s};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return s.SlowBuffer(e)}},2485:(e,t,r)=>{const s=Symbol("SemVer ANY");class Comparator{static get ANY(){return s}constructor(e,t){t=n(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}c("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===s){this.value=""}else{this.value=this.operator+this.semver.version}c("comp",this)}parse(e){const t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR];const r=e.match(t);if(!r){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=s}else{this.semver=new l(r[2],this.options.loose)}}toString(){return this.value}test(e){c("Comparator.test",e,this.options.loose);if(this.semver===s||e===s){return true}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}return a(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new u(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new u(this.value,t).test(e.semver)}const r=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");const s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");const n=this.semver.version===e.semver.version;const i=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");const o=a(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<");const c=a(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||s||n&&i||o||c}}e.exports=Comparator;const n=r(3789);const{re:i,t:o}=r(4351);const a=r(2674);const c=r(5747);const l=r(7825);const u=r(7058)},7058:(e,t,r)=>{class Range{constructor(e,t){t=i(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof o){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${e}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0){this.set=[e]}else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=Object.keys(this.options).join(",");const r=`parseRange:${t}:${e}`;const s=n.get(r);if(s){return s}const i=this.options.loose;const c=i?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(c,hyphenReplace(this.options.includePrerelease));a("hyphen replace",e);e=e.replace(l[u.COMPARATORTRIM],h);a("comparator trim",e);e=e.replace(l[u.TILDETRIM],d);e=e.replace(l[u.CARETTRIM],p);e=e.split(/\s+/).join(" ");let m=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));if(i){m=m.filter((e=>{a("loose invalid filter",e,this.options);return!!e.match(l[u.COMPARATORLOOSE])}))}a("range list",m);const y=new Map;const g=m.map((e=>new o(e,this.options)));for(const e of g){if(isNullSet(e)){return[e]}y.set(e.value,e)}if(y.size>1&&y.has("")){y.delete("")}const v=[...y.values()];n.set(r,v);return v}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new c(e,this.options)}catch(e){return false}}for(let t=0;t<this.set.length;t++){if(testSet(this.set[t],e,this.options)){return true}}return false}}e.exports=Range;const s=r(8443);const n=new s({max:1e3});const i=r(3789);const o=r(2485);const a=r(5747);const c=r(7825);const{re:l,t:u,comparatorTrimReplace:h,tildeTrimReplace:d,caretTrimReplace:p}=r(4351);const isNullSet=e=>e.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let r=true;const s=e.slice();let n=s.pop();while(r&&s.length){r=s.every((e=>n.intersects(e,t)));n=s.pop()}return r};const parseComparator=(e,t)=>{a("comp",e,t);e=replaceCarets(e,t);a("caret",e);e=replaceTildes(e,t);a("tildes",e);e=replaceXRanges(e,t);a("xrange",e);e=replaceStars(e,t);a("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const r=t.loose?l[u.TILDELOOSE]:l[u.TILDE];return e.replace(r,((t,r,s,n,i)=>{a("tilde",e,t,r,s,n,i);let o;if(isX(r)){o=""}else if(isX(s)){o=`>=${r}.0.0 <${+r+1}.0.0-0`}else if(isX(n)){o=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`}else if(i){a("replaceTilde pr",i);o=`>=${r}.${s}.${n}-${i} <${r}.${+s+1}.0-0`}else{o=`>=${r}.${s}.${n} <${r}.${+s+1}.0-0`}a("tilde return",o);return o}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{a("caret",e,t);const r=t.loose?l[u.CARETLOOSE]:l[u.CARET];const s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,n,i,o)=>{a("caret",e,t,r,n,i,o);let c;if(isX(r)){c=""}else if(isX(n)){c=`>=${r}.0.0${s} <${+r+1}.0.0-0`}else if(isX(i)){if(r==="0"){c=`>=${r}.${n}.0${s} <${r}.${+n+1}.0-0`}else{c=`>=${r}.${n}.0${s} <${+r+1}.0.0-0`}}else if(o){a("replaceCaret pr",o);if(r==="0"){if(n==="0"){c=`>=${r}.${n}.${i}-${o} <${r}.${n}.${+i+1}-0`}else{c=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`}}else{c=`>=${r}.${n}.${i}-${o} <${+r+1}.0.0-0`}}else{a("no pr");if(r==="0"){if(n==="0"){c=`>=${r}.${n}.${i}${s} <${r}.${n}.${+i+1}-0`}else{c=`>=${r}.${n}.${i}${s} <${r}.${+n+1}.0-0`}}else{c=`>=${r}.${n}.${i} <${+r+1}.0.0-0`}}a("caret return",c);return c}))};const replaceXRanges=(e,t)=>{a("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return e.replace(r,((r,s,n,i,o,c)=>{a("xRange",e,r,s,n,i,o,c);const l=isX(n);const u=l||isX(i);const h=u||isX(o);const d=h;if(s==="="&&d){s=""}c=t.includePrerelease?"-0":"";if(l){if(s===">"||s==="<"){r="<0.0.0-0"}else{r="*"}}else if(s&&d){if(u){i=0}o=0;if(s===">"){s=">=";if(u){n=+n+1;i=0;o=0}else{i=+i+1;o=0}}else if(s==="<="){s="<";if(u){n=+n+1}else{i=+i+1}}if(s==="<"){c="-0"}r=`${s+n}.${i}.${o}${c}`}else if(u){r=`>=${n}.0.0${c} <${+n+1}.0.0-0`}else if(h){r=`>=${n}.${i}.0${c} <${n}.${+i+1}.0-0`}a("xRange return",r);return r}))};const replaceStars=(e,t)=>{a("replaceStars",e,t);return e.trim().replace(l[u.STAR],"")};const replaceGTE0=(e,t)=>{a("replaceGTE0",e,t);return e.trim().replace(l[t.includePrerelease?u.GTE0PRE:u.GTE0],"")};const hyphenReplace=e=>(t,r,s,n,i,o,a,c,l,u,h,d,p)=>{if(isX(s)){r=""}else if(isX(n)){r=`>=${s}.0.0${e?"-0":""}`}else if(isX(i)){r=`>=${s}.${n}.0${e?"-0":""}`}else if(o){r=`>=${r}`}else{r=`>=${r}${e?"-0":""}`}if(isX(l)){c=""}else if(isX(u)){c=`<${+l+1}.0.0-0`}else if(isX(h)){c=`<${l}.${+u+1}.0-0`}else if(d){c=`<=${l}.${u}.${h}-${d}`}else if(e){c=`<${l}.${u}.${+h+1}-0`}else{c=`<=${c}`}return`${r} ${c}`.trim()};const testSet=(e,t,r)=>{for(let r=0;r<e.length;r++){if(!e[r].test(t)){return false}}if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++){a(e[r].semver);if(e[r].semver===o.ANY){continue}if(e[r].semver.prerelease.length>0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch){return true}}}return false}return true}},7825:(e,t,r)=>{const s=r(5747);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:i}=r(8147);const{re:o,t:a}=r(4351);const c=r(3789);const{compareIdentifiers:l}=r(8307);class SemVer{constructor(e,t){t=c(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid Version: ${e}`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}s("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i){return t}}return e}))}this.build=r[5]?r[5].split("."):[];this.format()}format(){this.version=`${this.major}.${this.minor}.${this.patch}`;if(this.prerelease.length){this.version+=`-${this.prerelease.join(".")}`}return this.version}toString(){return this.version}compare(e){s("SemVer.compare",this.version,this.options,e);if(!(e instanceof SemVer)){if(typeof e==="string"&&e===this.version){return 0}e=new SemVer(e,this.options)}if(e.version===this.version){return 0}return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}return l(this.major,e.major)||l(this.minor,e.minor)||l(this.patch,e.patch)}comparePre(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}if(this.prerelease.length&&!e.prerelease.length){return-1}else if(!this.prerelease.length&&e.prerelease.length){return 1}else if(!this.prerelease.length&&!e.prerelease.length){return 0}let t=0;do{const r=this.prerelease[t];const n=e.prerelease[t];s("prerelease compare",t,r,n);if(r===undefined&&n===undefined){return 0}else if(n===undefined){return 1}else if(r===undefined){return-1}else if(r===n){continue}else{return l(r,n)}}while(++t)}compareBuild(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}let t=0;do{const r=this.build[t];const n=e.build[t];s("prerelease compare",t,r,n);if(r===undefined&&n===undefined){return 0}else if(n===undefined){return 1}else if(r===undefined){return-1}else if(r===n){continue}else{return l(r,n)}}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",t);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",t);break;case"prepatch":this.prerelease.length=0;this.inc("patch",t);this.inc("pre",t);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",t)}this.inc("pre",t);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":if(this.prerelease.length===0){this.prerelease=[0]}else{let e=this.prerelease.length;while(--e>=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(t){if(l(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},6869:(e,t,r)=>{const s=r(4770);const clean=(e,t)=>{const r=s(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=clean},2674:(e,t,r)=>{const s=r(112);const n=r(4182);const i=r(2062);const o=r(6503);const a=r(1004);const c=r(3285);const cmp=(e,t,r,l)=>{switch(t){case"===":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e===r;case"!==":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e!==r;case"":case"=":case"==":return s(e,r,l);case"!=":return n(e,r,l);case">":return i(e,r,l);case">=":return o(e,r,l);case"<":return a(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},9608:(e,t,r)=>{const s=r(7825);const n=r(4770);const{re:i,t:o}=r(4351);const coerce=(e,t)=>{if(e instanceof s){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(i[o.COERCE])}else{let t;while((t=i[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}i[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}i[o.COERCERTL].lastIndex=-1}if(r===null){return null}return n(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=coerce},9874:(e,t,r)=>{const s=r(7825);const compareBuild=(e,t,r)=>{const n=new s(e,r);const i=new s(t,r);return n.compare(i)||n.compareBuild(i)};e.exports=compareBuild},8325:(e,t,r)=>{const s=r(1878);const compareLoose=(e,t)=>s(e,t,true);e.exports=compareLoose},1878:(e,t,r)=>{const s=r(7825);const compare=(e,t,r)=>new s(e,r).compare(new s(t,r));e.exports=compare},2464:(e,t,r)=>{const s=r(4770);const n=r(112);const diff=(e,t)=>{if(n(e,t)){return null}else{const r=s(e);const n=s(t);const i=r.prerelease.length||n.prerelease.length;const o=i?"pre":"";const a=i?"prerelease":"";for(const e in r){if(e==="major"||e==="minor"||e==="patch"){if(r[e]!==n[e]){return o+e}}}return a}};e.exports=diff},112:(e,t,r)=>{const s=r(1878);const eq=(e,t,r)=>s(e,t,r)===0;e.exports=eq},2062:(e,t,r)=>{const s=r(1878);const gt=(e,t,r)=>s(e,t,r)>0;e.exports=gt},6503:(e,t,r)=>{const s=r(1878);const gte=(e,t,r)=>s(e,t,r)>=0;e.exports=gte},6223:(e,t,r)=>{const s=r(7825);const inc=(e,t,r,n)=>{if(typeof r==="string"){n=r;r=undefined}try{return new s(e instanceof s?e.version:e,r).inc(t,n).version}catch(e){return null}};e.exports=inc},1004:(e,t,r)=>{const s=r(1878);const lt=(e,t,r)=>s(e,t,r)<0;e.exports=lt},3285:(e,t,r)=>{const s=r(1878);const lte=(e,t,r)=>s(e,t,r)<=0;e.exports=lte},6851:(e,t,r)=>{const s=r(7825);const major=(e,t)=>new s(e,t).major;e.exports=major},7443:(e,t,r)=>{const s=r(7825);const minor=(e,t)=>new s(e,t).minor;e.exports=minor},4182:(e,t,r)=>{const s=r(1878);const neq=(e,t,r)=>s(e,t,r)!==0;e.exports=neq},4770:(e,t,r)=>{const{MAX_LENGTH:s}=r(8147);const{re:n,t:i}=r(4351);const o=r(7825);const a=r(3789);const parse=(e,t)=>{t=a(t);if(e instanceof o){return e}if(typeof e!=="string"){return null}if(e.length>s){return null}const r=t.loose?n[i.LOOSE]:n[i.FULL];if(!r.test(e)){return null}try{return new o(e,t)}catch(e){return null}};e.exports=parse},1550:(e,t,r)=>{const s=r(7825);const patch=(e,t)=>new s(e,t).patch;e.exports=patch},3340:(e,t,r)=>{const s=r(4770);const prerelease=(e,t)=>{const r=s(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=prerelease},3119:(e,t,r)=>{const s=r(1878);const rcompare=(e,t,r)=>s(t,e,r);e.exports=rcompare},3379:(e,t,r)=>{const s=r(9874);const rsort=(e,t)=>e.sort(((e,r)=>s(r,e,t)));e.exports=rsort},4140:(e,t,r)=>{const s=r(7058);const satisfies=(e,t,r)=>{try{t=new s(t,r)}catch(e){return false}return t.test(e)};e.exports=satisfies},7408:(e,t,r)=>{const s=r(9874);const sort=(e,t)=>e.sort(((e,r)=>s(e,r,t)));e.exports=sort},8994:(e,t,r)=>{const s=r(4770);const valid=(e,t)=>{const r=s(e,t);return r?r.version:null};e.exports=valid},1452:(e,t,r)=>{const s=r(4351);const n=r(8147);const i=r(7825);const o=r(8307);const a=r(4770);const c=r(8994);const l=r(6869);const u=r(6223);const h=r(2464);const d=r(6851);const p=r(7443);const m=r(1550);const y=r(3340);const g=r(1878);const v=r(3119);const b=r(8325);const w=r(9874);const E=r(7408);const S=r(3379);const x=r(2062);const R=r(1004);const P=r(112);const O=r(4182);const $=r(6503);const T=r(3285);const A=r(2674);const C=r(9608);const k=r(2485);const I=r(7058);const N=r(4140);const D=r(8478);const L=r(4430);const M=r(4510);const j=r(2582);const F=r(4499);const U=r(3766);const B=r(3773);const H=r(8626);const z=r(4298);const G=r(6023);const V=r(5701);e.exports={parse:a,valid:c,clean:l,inc:u,diff:h,major:d,minor:p,patch:m,prerelease:y,compare:g,rcompare:v,compareLoose:b,compareBuild:w,sort:E,rsort:S,gt:x,lt:R,eq:P,neq:O,gte:$,lte:T,cmp:A,coerce:C,Comparator:k,Range:I,satisfies:N,toComparators:D,maxSatisfying:L,minSatisfying:M,minVersion:j,validRange:F,outside:U,gtr:B,ltr:H,intersects:z,simplifyRange:G,subset:V,SemVer:i,re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:n.SEMVER_SPEC_VERSION,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}},8147:e=>{const t="2.0.0";const r=256;const s=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;e.exports={SEMVER_SPEC_VERSION:t,MAX_LENGTH:r,MAX_SAFE_INTEGER:s,MAX_SAFE_COMPONENT_LENGTH:n}},5747:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},8307:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,r)=>{const s=t.test(e);const n=t.test(r);if(s&&n){e=+e;r=+r}return e===r?0:s&&!n?-1:n&&!s?1:e<r?-1:1};const rcompareIdentifiers=(e,t)=>compareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},3789:e=>{const t=["includePrerelease","loose","rtl"];const parseOptions=e=>!e?{}:typeof e!=="object"?{loose:true}:t.filter((t=>e[t])).reduce(((e,t)=>{e[t]=true;return e}),{});e.exports=parseOptions},4351:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:s}=r(8147);const n=r(5747);t=e.exports={};const i=t.re=[];const o=t.src=[];const a=t.t={};let c=0;const createToken=(e,t,r)=>{const s=c++;n(e,s,t);a[e]=s;o[s]=t;i[s]=new RegExp(t,r?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","[0-9]+");createToken("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");createToken("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER","[0-9A-Za-z-]+");createToken("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`);createToken("FULL",`^${o[a.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`);createToken("LOOSE",`^${o[a.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${o[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${o[a.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${s}})`+`(?:\\.(\\d{1,${s}}))?`+`(?:\\.(\\d{1,${s}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",o[a.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},3773:(e,t,r)=>{const s=r(3766);const gtr=(e,t,r)=>s(e,t,">",r);e.exports=gtr},4298:(e,t,r)=>{const s=r(7058);const intersects=(e,t,r)=>{e=new s(e,r);t=new s(t,r);return e.intersects(t)};e.exports=intersects},8626:(e,t,r)=>{const s=r(3766);const ltr=(e,t,r)=>s(e,t,"<",r);e.exports=ltr},4430:(e,t,r)=>{const s=r(7825);const n=r(7058);const maxSatisfying=(e,t,r)=>{let i=null;let o=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!i||o.compare(e)===-1){i=e;o=new s(i,r)}}}));return i};e.exports=maxSatisfying},4510:(e,t,r)=>{const s=r(7825);const n=r(7058);const minSatisfying=(e,t,r)=>{let i=null;let o=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!i||o.compare(e)===1){i=e;o=new s(i,r)}}}));return i};e.exports=minSatisfying},2582:(e,t,r)=>{const s=r(7825);const n=r(7058);const i=r(2062);const minVersion=(e,t)=>{e=new n(e,t);let r=new s("0.0.0");if(e.test(r)){return r}r=new s("0.0.0-0");if(e.test(r)){return r}r=null;for(let t=0;t<e.set.length;++t){const n=e.set[t];let o=null;n.forEach((e=>{const t=new s(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!o||i(t,o)){o=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(o&&(!r||i(r,o))){r=o}}if(r&&e.test(r)){return r}return null};e.exports=minVersion},3766:(e,t,r)=>{const s=r(7825);const n=r(2485);const{ANY:i}=n;const o=r(7058);const a=r(4140);const c=r(2062);const l=r(1004);const u=r(3285);const h=r(6503);const outside=(e,t,r,d)=>{e=new s(e,d);t=new o(t,d);let p,m,y,g,v;switch(r){case">":p=c;m=u;y=l;g=">";v=">=";break;case"<":p=l;m=h;y=c;g="<";v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d)){return false}for(let r=0;r<t.set.length;++r){const s=t.set[r];let o=null;let a=null;s.forEach((e=>{if(e.semver===i){e=new n(">=0.0.0")}o=o||e;a=a||e;if(p(e.semver,o.semver,d)){o=e}else if(y(e.semver,a.semver,d)){a=e}}));if(o.operator===g||o.operator===v){return false}if((!a.operator||a.operator===g)&&m(e,a.semver)){return false}else if(a.operator===v&&y(e,a.semver)){return false}}return true};e.exports=outside},6023:(e,t,r)=>{const s=r(4140);const n=r(1878);e.exports=(e,t,r)=>{const i=[];let o=null;let a=null;const c=e.sort(((e,t)=>n(e,t,r)));for(const e of c){const n=s(e,t,r);if(n){a=e;if(!o){o=e}}else{if(a){i.push([o,a])}a=null;o=null}}if(o){i.push([o,null])}const l=[];for(const[e,t]of i){if(e===t){l.push(e)}else if(!t&&e===c[0]){l.push("*")}else if(!t){l.push(`>=${e}`)}else if(e===c[0]){l.push(`<=${t}`)}else{l.push(`${e} - ${t}`)}}const u=l.join(" || ");const h=typeof t.raw==="string"?t.raw:String(t);return u.length<h.length?u:t}},5701:(e,t,r)=>{const s=r(7058);const n=r(2485);const{ANY:i}=n;const o=r(4140);const a=r(1878);const subset=(e,t,r={})=>{if(e===t){return true}e=new s(e,r);t=new s(t,r);let n=false;e:for(const s of e.set){for(const e of t.set){const t=simpleSubset(s,e,r);n=n||t!==null;if(t){continue e}}if(n){return false}}return true};const simpleSubset=(e,t,r)=>{if(e===t){return true}if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i){return true}else if(r.includePrerelease){e=[new n(">=0.0.0-0")]}else{e=[new n(">=0.0.0")]}}if(t.length===1&&t[0].semver===i){if(r.includePrerelease){return true}else{t=[new n(">=0.0.0")]}}const s=new Set;let c,l;for(const t of e){if(t.operator===">"||t.operator===">="){c=higherGT(c,t,r)}else if(t.operator==="<"||t.operator==="<="){l=lowerLT(l,t,r)}else{s.add(t.semver)}}if(s.size>1){return null}let u;if(c&&l){u=a(c.semver,l.semver,r);if(u>0){return null}else if(u===0&&(c.operator!==">="||l.operator!=="<=")){return null}}for(const e of s){if(c&&!o(e,String(c),r)){return null}if(l&&!o(e,String(l),r)){return null}for(const s of t){if(!o(e,String(s),r)){return false}}return true}let h,d;let p,m;let y=l&&!r.includePrerelease&&l.semver.prerelease.length?l.semver:false;let g=c&&!r.includePrerelease&&c.semver.prerelease.length?c.semver:false;if(y&&y.prerelease.length===1&&l.operator==="<"&&y.prerelease[0]===0){y=false}for(const e of t){m=m||e.operator===">"||e.operator===">=";p=p||e.operator==="<"||e.operator==="<=";if(c){if(g){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch){g=false}}if(e.operator===">"||e.operator===">="){h=higherGT(c,e,r);if(h===e&&h!==c){return false}}else if(c.operator===">="&&!o(c.semver,String(e),r)){return false}}if(l){if(y){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch){y=false}}if(e.operator==="<"||e.operator==="<="){d=lowerLT(l,e,r);if(d===e&&d!==l){return false}}else if(l.operator==="<="&&!o(l.semver,String(e),r)){return false}}if(!e.operator&&(l||c)&&u!==0){return false}}if(c&&p&&!l&&u!==0){return false}if(l&&m&&!c&&u!==0){return false}if(g||y){return false}return true};const higherGT=(e,t,r)=>{if(!e){return t}const s=a(e.semver,t.semver,r);return s>0?e:s<0?t:t.operator===">"&&e.operator===">="?t:e};const lowerLT=(e,t,r)=>{if(!e){return t}const s=a(e.semver,t.semver,r);return s<0?e:s>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=subset},8478:(e,t,r)=>{const s=r(7058);const toComparators=(e,t)=>new s(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));e.exports=toComparators},4499:(e,t,r)=>{const s=r(7058);const validRange=(e,t)=>{try{return new s(e,t).range||"*"}catch(e){return null}};e.exports=validRange},530:(e,t,r)=>{"use strict";const s=r(4401);e.exports=(e="")=>{const t=e.match(s);if(!t){return null}const[r,n]=t[0].replace(/#! ?/,"").split(" ");const i=r.split("/").pop();if(i==="env"){return n}return n?`${i} ${n}`:i}},4401:e=>{"use strict";e.exports=/^#!(.*)/},4577:e=>{"use strict";const t="";const r=`${t}[`;const s="";const n={to(e,t){if(!t)return`${r}${e+1}G`;return`${r}${t+1};${e+1}H`},move(e,t){let s="";if(e<0)s+=`${r}${-e}D`;else if(e>0)s+=`${r}${e}C`;if(t<0)s+=`${r}${-t}A`;else if(t>0)s+=`${r}${t}B`;return s},up:(e=1)=>`${r}${e}A`,down:(e=1)=>`${r}${e}B`,forward:(e=1)=>`${r}${e}C`,backward:(e=1)=>`${r}${e}D`,nextLine:(e=1)=>`${r}E`.repeat(e),prevLine:(e=1)=>`${r}F`.repeat(e),left:`${r}G`,hide:`${r}?25l`,show:`${r}?25h`,save:`${t}7`,restore:`${t}8`};const i={up:(e=1)=>`${r}S`.repeat(e),down:(e=1)=>`${r}T`.repeat(e)};const o={screen:`${r}2J`,up:(e=1)=>`${r}1J`.repeat(e),down:(e=1)=>`${r}J`.repeat(e),line:`${r}2K`,lineEnd:`${r}K`,lineStart:`${r}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?n.up():"");if(e)t+=n.left;return t}};e.exports={cursor:n,scroll:i,erase:o,beep:s}},2251:e=>{"use strict";var t=1;var r=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(e,t,r){return e.slice(t,r).replace(/\S/g," ")}e.exports=function(e,s){s=s||{};var n;var i;var o=false;var a=false;var c=0;var l="";var u=s.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var h=0;h<e.length;h++){n=e[h];i=e[h+1];if(!a&&n==='"'){var d=e[h-1]==="\\"&&e[h-2]!=="\\";if(!d){o=!o}}if(o){continue}if(!a&&n+i==="//"){l+=e.slice(c,h);c=h;a=t;h++}else if(a===t&&n+i==="\r\n"){h++;a=false;l+=u(e,c,h);c=h;continue}else if(a===t&&n==="\n"){a=false;l+=u(e,c,h);c=h}else if(!a&&n+i==="/*"){l+=e.slice(c,h);c=h;a=r;h++;continue}else if(a===r&&n+i==="*/"){h++;a=false;l+=u(e,c,h+1);c=h+1;continue}}return l+(a?u(e.substr(c)):e.substr(c))}},5255:(e,t,r)=>{"use strict";t.c=t.create=r(7585);t.r=t.replace=r(1138);t.t=t.list=r(4975);t.u=t.update=r(9472);t.x=t.extract=r(9985);t.Pack=r(7301);t.Unpack=r(5951);t.Parse=r(5222);t.ReadEntry=r(5917);t.WriteEntry=r(1944);t.Header=r(1703);t.Pax=r(9037);t.types=r(1046)},7585:(e,t,r)=>{"use strict";const s=r(3831);const n=r(7301);const i=r(644);const o=r(4975);const a=r(1017);e.exports=(e,t,r)=>{if(typeof t==="function"){r=t}if(Array.isArray(e)){t=e,e={}}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);const n=s(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?createFileSync(n,t):n.file?createFile(n,t,r):n.sync?createSync(n,t):create(n,t)};const createFileSync=(e,t)=>{const r=new n.Sync(e);const s=new i.WriteStreamSync(e.file,{mode:e.mode||438});r.pipe(s);addFilesSync(r,t)};const createFile=(e,t,r)=>{const s=new n(e);const o=new i.WriteStream(e.file,{mode:e.mode||438});s.pipe(o);const a=new Promise(((e,t)=>{o.on("error",t);o.on("close",e);s.on("error",t)}));addFilesAsync(s,t);return r?a.then(r,r):a};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@"){o({file:a.resolve(e.cwd,t.slice(1)),sync:true,noResume:true,onentry:t=>e.add(t)})}else{e.add(t)}}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const r=t.shift();if(r.charAt(0)==="@"){return o({file:a.resolve(e.cwd,r.slice(1)),noResume:true,onentry:t=>e.add(t)}).then((r=>addFilesAsync(e,t)))}else{e.add(r)}}e.end()};const createSync=(e,t)=>{const r=new n.Sync(e);addFilesSync(r,t);return r};const create=(e,t)=>{const r=new n(e);addFilesAsync(r,t);return r}},9985:(e,t,r)=>{"use strict";const s=r(3831);const n=r(5951);const i=r(7147);const o=r(644);const a=r(1017);const c=r(2517);e.exports=(e,t,r)=>{if(typeof e==="function"){r=e,t=null,e={}}else if(Array.isArray(e)){t=e,e={}}if(typeof t==="function"){r=t,t=null}if(!t){t=[]}else{t=Array.from(t)}const n=s(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")}if(t.length){filesFilter(n,t)}return n.file&&n.sync?extractFileSync(n):n.file?extractFile(n,r):n.sync?extractSync(n):extract(n)};const filesFilter=(e,t)=>{const r=new Map(t.map((e=>[c(e),true])));const s=e.filter;const mapHas=(e,t)=>{const s=t||a.parse(e).root||".";const n=e===s?false:r.has(e)?r.get(e):mapHas(a.dirname(e),s);r.set(e,n);return n};e.filter=s?(e,t)=>s(e,t)&&mapHas(c(e)):e=>mapHas(c(e))};const extractFileSync=e=>{const t=new n.Sync(e);const r=e.file;const s=i.statSync(r);const a=e.maxReadSize||16*1024*1024;const c=new o.ReadStreamSync(r,{readSize:a,size:s.size});c.pipe(t)};const extractFile=(e,t)=>{const r=new n(e);const s=e.maxReadSize||16*1024*1024;const a=e.file;const c=new Promise(((e,t)=>{r.on("error",t);r.on("close",e);i.stat(a,((e,n)=>{if(e){t(e)}else{const e=new o.ReadStream(a,{readSize:s,size:n.size});e.on("error",t);e.pipe(r)}}))}));return t?c.then(t,t):c};const extractSync=e=>new n.Sync(e);const extract=e=>new n(e)},9262:(e,t,r)=>{const s=process.env.__FAKE_PLATFORM__||process.platform;const n=s==="win32";const i=global.__FAKE_TESTING_FS__||r(7147);const{O_CREAT:o,O_TRUNC:a,O_WRONLY:c,UV_FS_O_FILEMAP:l=0}=i.constants;const u=n&&!!l;const h=512*1024;const d=l|a|o|c;e.exports=!u?()=>"w":e=>e<h?d:"w"},1703:(e,t,r)=>{"use strict";const s=r(1046);const n=r(1017).posix;const i=r(2933);const o=Symbol("slurp");const a=Symbol("type");class Header{constructor(e,t,r,s){this.cksumValid=false;this.needPax=false;this.nullBlock=false;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[a]="0";this.linkpath=null;this.uname=null;this.gname=null;this.devmaj=0;this.devmin=0;this.atime=null;this.ctime=null;if(Buffer.isBuffer(e)){this.decode(e,t||0,r,s)}else if(e){this.set(e)}}decode(e,t,r,s){if(!t){t=0}if(!e||!(e.length>=t+512)){throw new Error("need 512 bytes for header")}this.path=decString(e,t,100);this.mode=decNumber(e,t+100,8);this.uid=decNumber(e,t+108,8);this.gid=decNumber(e,t+116,8);this.size=decNumber(e,t+124,12);this.mtime=decDate(e,t+136,12);this.cksum=decNumber(e,t+148,12);this[o](r);this[o](s,true);this[a]=decString(e,t+156,1);if(this[a]===""){this[a]="0"}if(this[a]==="0"&&this.path.slice(-1)==="/"){this[a]="5"}if(this[a]==="5"){this.size=0}this.linkpath=decString(e,t+157,100);if(e.slice(t+257,t+265).toString()==="ustar\x0000"){this.uname=decString(e,t+265,32);this.gname=decString(e,t+297,32);this.devmaj=decNumber(e,t+329,8);this.devmin=decNumber(e,t+337,8);if(e[t+475]!==0){const r=decString(e,t+345,155);this.path=r+"/"+this.path}else{const r=decString(e,t+345,130);if(r){this.path=r+"/"+this.path}this.atime=decDate(e,t+476,12);this.ctime=decDate(e,t+488,12)}}let n=8*32;for(let r=t;r<t+148;r++){n+=e[r]}for(let r=t+156;r<t+512;r++){n+=e[r]}this.cksumValid=n===this.cksum;if(this.cksum===null&&n===8*32){this.nullBlock=true}}[o](e,t){for(const r in e){if(e[r]!==null&&e[r]!==undefined&&!(t&&r==="path")){this[r]=e[r]}}}encode(e,t){if(!e){e=this.block=Buffer.alloc(512);t=0}if(!t){t=0}if(!(e.length>=t+512)){throw new Error("need 512 bytes for header")}const r=this.ctime||this.atime?130:155;const s=splitPrefix(this.path||"",r);const n=s[0];const i=s[1];this.needPax=s[2];this.needPax=encString(e,t,100,n)||this.needPax;this.needPax=encNumber(e,t+100,8,this.mode)||this.needPax;this.needPax=encNumber(e,t+108,8,this.uid)||this.needPax;this.needPax=encNumber(e,t+116,8,this.gid)||this.needPax;this.needPax=encNumber(e,t+124,12,this.size)||this.needPax;this.needPax=encDate(e,t+136,12,this.mtime)||this.needPax;e[t+156]=this[a].charCodeAt(0);this.needPax=encString(e,t+157,100,this.linkpath)||this.needPax;e.write("ustar\x0000",t+257,8);this.needPax=encString(e,t+265,32,this.uname)||this.needPax;this.needPax=encString(e,t+297,32,this.gname)||this.needPax;this.needPax=encNumber(e,t+329,8,this.devmaj)||this.needPax;this.needPax=encNumber(e,t+337,8,this.devmin)||this.needPax;this.needPax=encString(e,t+345,r,i)||this.needPax;if(e[t+475]!==0){this.needPax=encString(e,t+345,155,i)||this.needPax}else{this.needPax=encString(e,t+345,130,i)||this.needPax;this.needPax=encDate(e,t+476,12,this.atime)||this.needPax;this.needPax=encDate(e,t+488,12,this.ctime)||this.needPax}let o=8*32;for(let r=t;r<t+148;r++){o+=e[r]}for(let r=t+156;r<t+512;r++){o+=e[r]}this.cksum=o;encNumber(e,t+148,8,this.cksum);this.cksumValid=true;return this.needPax}set(e){for(const t in e){if(e[t]!==null&&e[t]!==undefined){this[t]=e[t]}}}get type(){return s.name.get(this[a])||this[a]}get typeKey(){return this[a]}set type(e){if(s.code.has(e)){this[a]=s.code.get(e)}else{this[a]=e}}}const splitPrefix=(e,t)=>{const r=100;let s=e;let i="";let o;const a=n.parse(e).root||".";if(Buffer.byteLength(s)<r){o=[s,i,false]}else{i=n.dirname(s);s=n.basename(s);do{if(Buffer.byteLength(s)<=r&&Buffer.byteLength(i)<=t){o=[s,i,false]}else if(Buffer.byteLength(s)>r&&Buffer.byteLength(i)<=t){o=[s.slice(0,r-1),i,true]}else{s=n.join(n.basename(i),s);i=n.dirname(i)}}while(i!==a&&!o);if(!o){o=[e.slice(0,r-1),"",true]}}return o};const decString=(e,t,r)=>e.slice(t,t+r).toString("utf8").replace(/\0.*/,"");const decDate=(e,t,r)=>numToDate(decNumber(e,t,r));const numToDate=e=>e===null?null:new Date(e*1e3);const decNumber=(e,t,r)=>e[t]&128?i.parse(e.slice(t,t+r)):decSmallNumber(e,t,r);const nanNull=e=>isNaN(e)?null:e;const decSmallNumber=(e,t,r)=>nanNull(parseInt(e.slice(t,t+r).toString("utf8").replace(/\0.*$/,"").trim(),8));const c={12:8589934591,8:2097151};const encNumber=(e,t,r,s)=>s===null?false:s>c[r]||s<0?(i.encode(s,e.slice(t,t+r)),true):(encSmallNumber(e,t,r,s),false);const encSmallNumber=(e,t,r,s)=>e.write(octalString(s,r),t,r,"ascii");const octalString=(e,t)=>padOctal(Math.floor(e).toString(8),t);const padOctal=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0";const encDate=(e,t,r,s)=>s===null?false:encNumber(e,t,r,s.getTime()/1e3);const l=new Array(156).join("\0");const encString=(e,t,r,s)=>s===null?false:(e.write(s+l,t,r,"utf8"),s.length!==Buffer.byteLength(s)||s.length>r);e.exports=Header},3831:e=>{"use strict";const t=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"]]);e.exports=e=>e?Object.keys(e).map((r=>[t.has(r)?t.get(r):r,e[r]])).reduce(((e,t)=>(e[t[0]]=t[1],e)),Object.create(null)):{}},2933:e=>{"use strict";const encode=(e,t)=>{if(!Number.isSafeInteger(e)){throw Error("cannot encode number outside of javascript safe integer range")}else if(e<0){encodeNegative(e,t)}else{encodePositive(e,t)}return t};const encodePositive=(e,t)=>{t[0]=128;for(var r=t.length;r>1;r--){t[r-1]=e&255;e=Math.floor(e/256)}};const encodeNegative=(e,t)=>{t[0]=255;var r=false;e=e*-1;for(var s=t.length;s>1;s--){var n=e&255;e=Math.floor(e/256);if(r){t[s-1]=onesComp(n)}else if(n===0){t[s-1]=0}else{r=true;t[s-1]=twosComp(n)}}};const parse=e=>{const t=e[0];const r=t===128?pos(e.slice(1,e.length)):t===255?twos(e):null;if(r===null){throw Error("invalid base256 encoding")}if(!Number.isSafeInteger(r)){throw Error("parsed number outside of javascript safe integer range")}return r};const twos=e=>{var t=e.length;var r=0;var s=false;for(var n=t-1;n>-1;n--){var i=e[n];var o;if(s){o=onesComp(i)}else if(i===0){o=i}else{s=true;o=twosComp(i)}if(o!==0){r-=o*Math.pow(256,t-n-1)}}return r};const pos=e=>{var t=e.length;var r=0;for(var s=t-1;s>-1;s--){var n=e[s];if(n!==0){r+=n*Math.pow(256,t-s-1)}}return r};const onesComp=e=>(255^e)&255;const twosComp=e=>(255^e)+1&255;e.exports={encode:encode,parse:parse}},4975:(e,t,r)=>{"use strict";const s=r(3831);const n=r(5222);const i=r(7147);const o=r(644);const a=r(1017);const c=r(2517);e.exports=(e,t,r)=>{if(typeof e==="function"){r=e,t=null,e={}}else if(Array.isArray(e)){t=e,e={}}if(typeof t==="function"){r=t,t=null}if(!t){t=[]}else{t=Array.from(t)}const n=s(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")}if(t.length){filesFilter(n,t)}if(!n.noResume){onentryFunction(n)}return n.file&&n.sync?listFileSync(n):n.file?listFile(n,r):list(n)};const onentryFunction=e=>{const t=e.onentry;e.onentry=t?e=>{t(e);e.resume()}:e=>e.resume()};const filesFilter=(e,t)=>{const r=new Map(t.map((e=>[c(e),true])));const s=e.filter;const mapHas=(e,t)=>{const s=t||a.parse(e).root||".";const n=e===s?false:r.has(e)?r.get(e):mapHas(a.dirname(e),s);r.set(e,n);return n};e.filter=s?(e,t)=>s(e,t)&&mapHas(c(e)):e=>mapHas(c(e))};const listFileSync=e=>{const t=list(e);const r=e.file;let s=true;let n;try{const o=i.statSync(r);const a=e.maxReadSize||16*1024*1024;if(o.size<a){t.end(i.readFileSync(r))}else{let e=0;const s=Buffer.allocUnsafe(a);n=i.openSync(r,"r");while(e<o.size){const r=i.readSync(n,s,0,a,e);e+=r;t.write(s.slice(0,r))}t.end()}s=false}finally{if(s&&n){try{i.closeSync(n)}catch(e){}}}};const listFile=(e,t)=>{const r=new n(e);const s=e.maxReadSize||16*1024*1024;const a=e.file;const c=new Promise(((e,t)=>{r.on("error",t);r.on("end",e);i.stat(a,((e,n)=>{if(e){t(e)}else{const e=new o.ReadStream(a,{readSize:s,size:n.size});e.on("error",t);e.pipe(r)}}))}));return t?c.then(t,t):c};const list=e=>new n(e)},6209:(e,t,r)=>{"use strict";const s=r(9806);const n=r(7147);const i=r(1017);const o=r(2975);const a=r(9740);class SymlinkError extends Error{constructor(e,t){super("Cannot extract through symbolic link");this.path=t;this.symlink=e}get name(){return"SylinkError"}}class CwdError extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'");this.path=e;this.code=t}get name(){return"CwdError"}}const cGet=(e,t)=>e.get(a(t));const cSet=(e,t,r)=>e.set(a(t),r);const checkCwd=(e,t)=>{n.stat(e,((r,s)=>{if(r||!s.isDirectory()){r=new CwdError(e,r&&r.code||"ENOTDIR")}t(r)}))};e.exports=(e,t,r)=>{e=a(e);const c=t.umask;const l=t.mode|448;const u=(l&c)!==0;const h=t.uid;const d=t.gid;const p=typeof h==="number"&&typeof d==="number"&&(h!==t.processUid||d!==t.processGid);const m=t.preserve;const y=t.unlink;const g=t.cache;const v=a(t.cwd);const done=(t,s)=>{if(t){r(t)}else{cSet(g,e,true);if(s&&p){o(s,h,d,(e=>done(e)))}else if(u){n.chmod(e,l,r)}else{r()}}};if(g&&cGet(g,e)===true){return done()}if(e===v){return checkCwd(e,done)}if(m){return s(e,{mode:l}).then((e=>done(null,e)),done)}const b=a(i.relative(v,e));const w=b.split("/");mkdir_(v,w,l,g,y,v,null,done)};const mkdir_=(e,t,r,s,o,c,l,u)=>{if(!t.length){return u(null,l)}const h=t.shift();const d=a(i.resolve(e+"/"+h));if(cGet(s,d)){return mkdir_(d,t,r,s,o,c,l,u)}n.mkdir(d,r,onmkdir(d,t,r,s,o,c,l,u))};const onmkdir=(e,t,r,s,i,o,c,l)=>u=>{if(u){n.lstat(e,((h,d)=>{if(h){h.path=h.path&&a(h.path);l(h)}else if(d.isDirectory()){mkdir_(e,t,r,s,i,o,c,l)}else if(i){n.unlink(e,(a=>{if(a){return l(a)}n.mkdir(e,r,onmkdir(e,t,r,s,i,o,c,l))}))}else if(d.isSymbolicLink()){return l(new SymlinkError(e,e+"/"+t.join("/")))}else{l(u)}}))}else{c=c||e;mkdir_(e,t,r,s,i,o,c,l)}};const checkCwdSync=e=>{let t=false;let r="ENOTDIR";try{t=n.statSync(e).isDirectory()}catch(e){r=e.code}finally{if(!t){throw new CwdError(e,r)}}};e.exports.sync=(e,t)=>{e=a(e);const r=t.umask;const c=t.mode|448;const l=(c&r)!==0;const u=t.uid;const h=t.gid;const d=typeof u==="number"&&typeof h==="number"&&(u!==t.processUid||h!==t.processGid);const p=t.preserve;const m=t.unlink;const y=t.cache;const g=a(t.cwd);const done=t=>{cSet(y,e,true);if(t&&d){o.sync(t,u,h)}if(l){n.chmodSync(e,c)}};if(y&&cGet(y,e)===true){return done()}if(e===g){checkCwdSync(g);return done()}if(p){return done(s.sync(e,c))}const v=a(i.relative(g,e));const b=v.split("/");let w=null;for(let e=b.shift(),t=g;e&&(t+="/"+e);e=b.shift()){t=a(i.resolve(t));if(cGet(y,t)){continue}try{n.mkdirSync(t,c);w=w||t;cSet(y,t,true)}catch(e){const r=n.lstatSync(t);if(r.isDirectory()){cSet(y,t,true);continue}else if(m){n.unlinkSync(t);n.mkdirSync(t,c);w=w||t;cSet(y,t,true);continue}else if(r.isSymbolicLink()){return new SymlinkError(t,t+"/"+b.join("/"))}}}return done(w)}},6601:e=>{"use strict";e.exports=(e,t,r)=>{e&=4095;if(r){e=(e|384)&~18}if(t){if(e&256){e|=64}if(e&32){e|=8}if(e&4){e|=1}}return e}},4711:e=>{const t=Object.create(null);const{hasOwnProperty:r}=Object.prototype;e.exports=e=>{if(!r.call(t,e)){t[e]=e.normalize("NFD")}return t[e]}},9740:e=>{const t=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=t!=="win32"?e=>e:e=>e&&e.replace(/\\/g,"/")},7301:(e,t,r)=>{"use strict";class PackJob{constructor(e,t){this.path=e||"./";this.absolute=t;this.entry=null;this.stat=null;this.readdir=null;this.pending=false;this.ignore=false;this.piped=false}}const{Minipass:s}=r(5540);const n=r(7750);const i=r(5917);const o=r(1944);const a=o.Sync;const c=o.Tar;const l=r(3401);const u=Buffer.alloc(1024);const h=Symbol("onStat");const d=Symbol("ended");const p=Symbol("queue");const m=Symbol("current");const y=Symbol("process");const g=Symbol("processing");const v=Symbol("processJob");const b=Symbol("jobs");const w=Symbol("jobDone");const E=Symbol("addFSEntry");const S=Symbol("addTarEntry");const x=Symbol("stat");const R=Symbol("readdir");const P=Symbol("onreaddir");const O=Symbol("pipe");const $=Symbol("entry");const T=Symbol("entryOpt");const A=Symbol("writeEntryClass");const C=Symbol("write");const k=Symbol("ondrain");const I=r(7147);const N=r(1017);const D=r(8920);const L=r(9740);const M=D(class Pack extends s{constructor(e){super(e);e=e||Object.create(null);this.opt=e;this.file=e.file||"";this.cwd=e.cwd||process.cwd();this.maxReadSize=e.maxReadSize;this.preservePaths=!!e.preservePaths;this.strict=!!e.strict;this.noPax=!!e.noPax;this.prefix=L(e.prefix||"");this.linkCache=e.linkCache||new Map;this.statCache=e.statCache||new Map;this.readdirCache=e.readdirCache||new Map;this[A]=o;if(typeof e.onwarn==="function"){this.on("warn",e.onwarn)}this.portable=!!e.portable;this.zip=null;if(e.gzip){if(typeof e.gzip!=="object"){e.gzip={}}if(this.portable){e.gzip.portable=true}this.zip=new n.Gzip(e.gzip);this.zip.on("data",(e=>super.write(e)));this.zip.on("end",(e=>super.end()));this.zip.on("drain",(e=>this[k]()));this.on("resume",(e=>this.zip.resume()))}else{this.on("drain",this[k])}this.noDirRecurse=!!e.noDirRecurse;this.follow=!!e.follow;this.noMtime=!!e.noMtime;this.mtime=e.mtime||null;this.filter=typeof e.filter==="function"?e.filter:e=>true;this[p]=new l;this[b]=0;this.jobs=+e.jobs||4;this[g]=false;this[d]=false}[C](e){return super.write(e)}add(e){this.write(e);return this}end(e){if(e){this.write(e)}this[d]=true;this[y]();return this}write(e){if(this[d]){throw new Error("write after end")}if(e instanceof i){this[S](e)}else{this[E](e)}return this.flowing}[S](e){const t=L(N.resolve(this.cwd,e.path));if(!this.filter(e.path,e)){e.resume()}else{const r=new PackJob(e.path,t,false);r.entry=new c(e,this[T](r));r.entry.on("end",(e=>this[w](r)));this[b]+=1;this[p].push(r)}this[y]()}[E](e){const t=L(N.resolve(this.cwd,e));this[p].push(new PackJob(e,t));this[y]()}[x](e){e.pending=true;this[b]+=1;const t=this.follow?"stat":"lstat";I[t](e.absolute,((t,r)=>{e.pending=false;this[b]-=1;if(t){this.emit("error",t)}else{this[h](e,r)}}))}[h](e,t){this.statCache.set(e.absolute,t);e.stat=t;if(!this.filter(e.path,t)){e.ignore=true}this[y]()}[R](e){e.pending=true;this[b]+=1;I.readdir(e.absolute,((t,r)=>{e.pending=false;this[b]-=1;if(t){return this.emit("error",t)}this[P](e,r)}))}[P](e,t){this.readdirCache.set(e.absolute,t);e.readdir=t;this[y]()}[y](){if(this[g]){return}this[g]=true;for(let e=this[p].head;e!==null&&this[b]<this.jobs;e=e.next){this[v](e.value);if(e.value.ignore){const t=e.next;this[p].removeNode(e);e.next=t}}this[g]=false;if(this[d]&&!this[p].length&&this[b]===0){if(this.zip){this.zip.end(u)}else{super.write(u);super.end()}}}get[m](){return this[p]&&this[p].head&&this[p].head.value}[w](e){this[p].shift();this[b]-=1;this[y]()}[v](e){if(e.pending){return}if(e.entry){if(e===this[m]&&!e.piped){this[O](e)}return}if(!e.stat){if(this.statCache.has(e.absolute)){this[h](e,this.statCache.get(e.absolute))}else{this[x](e)}}if(!e.stat){return}if(e.ignore){return}if(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir){if(this.readdirCache.has(e.absolute)){this[P](e,this.readdirCache.get(e.absolute))}else{this[R](e)}if(!e.readdir){return}}e.entry=this[$](e);if(!e.entry){e.ignore=true;return}if(e===this[m]&&!e.piped){this[O](e)}}[T](e){return{onwarn:(e,t,r)=>this.warn(e,t,r),noPax:this.noPax,cwd:this.cwd,absolute:e.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}}[$](e){this[b]+=1;try{return new this[A](e.path,this[T](e)).on("end",(()=>this[w](e))).on("error",(e=>this.emit("error",e)))}catch(e){this.emit("error",e)}}[k](){if(this[m]&&this[m].entry){this[m].entry.resume()}}[O](e){e.piped=true;if(e.readdir){e.readdir.forEach((t=>{const r=e.path;const s=r==="./"?"":r.replace(/\/*$/,"/");this[E](s+t)}))}const t=e.entry;const r=this.zip;if(r){t.on("data",(e=>{if(!r.write(e)){t.pause()}}))}else{t.on("data",(e=>{if(!super.write(e)){t.pause()}}))}}pause(){if(this.zip){this.zip.pause()}return super.pause()}});class PackSync extends M{constructor(e){super(e);this[A]=a}pause(){}resume(){}[x](e){const t=this.follow?"statSync":"lstatSync";this[h](e,I[t](e.absolute))}[R](e,t){this[P](e,I.readdirSync(e.absolute))}[O](e){const t=e.entry;const r=this.zip;if(e.readdir){e.readdir.forEach((t=>{const r=e.path;const s=r==="./"?"":r.replace(/\/*$/,"/");this[E](s+t)}))}if(r){t.on("data",(e=>{r.write(e)}))}else{t.on("data",(e=>{super[C](e)}))}}}M.Sync=PackSync;e.exports=M},5222:(e,t,r)=>{"use strict";const s=r(8920);const n=r(1703);const i=r(2361);const o=r(3401);const a=1024*1024;const c=r(5917);const l=r(9037);const u=r(7750);const{nextTick:h}=r(7282);const d=Buffer.from([31,139]);const p=Symbol("state");const m=Symbol("writeEntry");const y=Symbol("readEntry");const g=Symbol("nextEntry");const v=Symbol("processEntry");const b=Symbol("extendedHeader");const w=Symbol("globalExtendedHeader");const E=Symbol("meta");const S=Symbol("emitMeta");const x=Symbol("buffer");const R=Symbol("queue");const P=Symbol("ended");const O=Symbol("emittedEnd");const $=Symbol("emit");const T=Symbol("unzip");const A=Symbol("consumeChunk");const C=Symbol("consumeChunkSub");const k=Symbol("consumeBody");const I=Symbol("consumeMeta");const N=Symbol("consumeHeader");const D=Symbol("consuming");const L=Symbol("bufferConcat");const M=Symbol("maybeEnd");const j=Symbol("writing");const F=Symbol("aborted");const U=Symbol("onDone");const B=Symbol("sawValidEntry");const H=Symbol("sawNullBlock");const z=Symbol("sawEOF");const G=Symbol("closeStream");const noop=e=>true;e.exports=s(class Parser extends i{constructor(e){e=e||{};super(e);this.file=e.file||"";this[B]=null;this.on(U,(e=>{if(this[p]==="begin"||this[B]===false){this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}}));if(e.ondone){this.on(U,e.ondone)}else{this.on(U,(e=>{this.emit("prefinish");this.emit("finish");this.emit("end")}))}this.strict=!!e.strict;this.maxMetaEntrySize=e.maxMetaEntrySize||a;this.filter=typeof e.filter==="function"?e.filter:noop;this.writable=true;this.readable=false;this[R]=new o;this[x]=null;this[y]=null;this[m]=null;this[p]="begin";this[E]="";this[b]=null;this[w]=null;this[P]=false;this[T]=null;this[F]=false;this[H]=false;this[z]=false;this.on("end",(()=>this[G]()));if(typeof e.onwarn==="function"){this.on("warn",e.onwarn)}if(typeof e.onentry==="function"){this.on("entry",e.onentry)}}[N](e,t){if(this[B]===null){this[B]=false}let r;try{r=new n(e,t,this[b],this[w])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(r.nullBlock){if(this[H]){this[z]=true;if(this[p]==="begin"){this[p]="header"}this[$]("eof")}else{this[H]=true;this[$]("nullBlock")}}else{this[H]=false;if(!r.cksumValid){this.warn("TAR_ENTRY_INVALID","checksum failure",{header:r})}else if(!r.path){this.warn("TAR_ENTRY_INVALID","path is required",{header:r})}else{const e=r.type;if(/^(Symbolic)?Link$/.test(e)&&!r.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath required",{header:r})}else if(!/^(Symbolic)?Link$/.test(e)&&r.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:r})}else{const e=this[m]=new c(r,this[b],this[w]);if(!this[B]){if(e.remain){const onend=()=>{if(!e.invalid){this[B]=true}};e.on("end",onend)}else{this[B]=true}}if(e.meta){if(e.size>this.maxMetaEntrySize){e.ignore=true;this[$]("ignoredEntry",e);this[p]="ignore";e.resume()}else if(e.size>0){this[E]="";e.on("data",(e=>this[E]+=e));this[p]="meta"}}else{this[b]=null;e.ignore=e.ignore||!this.filter(e.path,e);if(e.ignore){this[$]("ignoredEntry",e);this[p]=e.remain?"ignore":"header";e.resume()}else{if(e.remain){this[p]="body"}else{this[p]="header";e.end()}if(!this[y]){this[R].push(e);this[g]()}else{this[R].push(e)}}}}}}}[G](){h((()=>this.emit("close")))}[v](e){let t=true;if(!e){this[y]=null;t=false}else if(Array.isArray(e)){this.emit.apply(this,e)}else{this[y]=e;this.emit("entry",e);if(!e.emittedEnd){e.on("end",(e=>this[g]()));t=false}}return t}[g](){do{}while(this[v](this[R].shift()));if(!this[R].length){const e=this[y];const t=!e||e.flowing||e.size===e.remain;if(t){if(!this[j]){this.emit("drain")}}else{e.once("drain",(e=>this.emit("drain")))}}}[k](e,t){const r=this[m];const s=r.blockRemain;const n=s>=e.length&&t===0?e:e.slice(t,t+s);r.write(n);if(!r.blockRemain){this[p]="header";this[m]=null;r.end()}return n.length}[I](e,t){const r=this[m];const s=this[k](e,t);if(!this[m]){this[S](r)}return s}[$](e,t,r){if(!this[R].length&&!this[y]){this.emit(e,t,r)}else{this[R].push([e,t,r])}}[S](e){this[$]("meta",this[E]);switch(e.type){case"ExtendedHeader":case"OldExtendedHeader":this[b]=l.parse(this[E],this[b],false);break;case"GlobalExtendedHeader":this[w]=l.parse(this[E],this[w],true);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[b]=this[b]||Object.create(null);this[b].path=this[E].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[b]=this[b]||Object.create(null);this[b].linkpath=this[E].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[F]=true;this.emit("abort",e);this.warn("TAR_ABORT",e,{recoverable:false})}write(e){if(this[F]){return}if(this[T]===null&&e){if(this[x]){e=Buffer.concat([this[x],e]);this[x]=null}if(e.length<d.length){this[x]=e;return true}for(let t=0;this[T]===null&&t<d.length;t++){if(e[t]!==d[t]){this[T]=false}}if(this[T]===null){const t=this[P];this[P]=false;this[T]=new u.Unzip;this[T].on("data",(e=>this[A](e)));this[T].on("error",(e=>this.abort(e)));this[T].on("end",(e=>{this[P]=true;this[A]()}));this[j]=true;const r=this[T][t?"end":"write"](e);this[j]=false;return r}}this[j]=true;if(this[T]){this[T].write(e)}else{this[A](e)}this[j]=false;const t=this[R].length?false:this[y]?this[y].flowing:true;if(!t&&!this[R].length){this[y].once("drain",(e=>this.emit("drain")))}return t}[L](e){if(e&&!this[F]){this[x]=this[x]?Buffer.concat([this[x],e]):e}}[M](){if(this[P]&&!this[O]&&!this[F]&&!this[D]){this[O]=true;const e=this[m];if(e&&e.blockRemain){const t=this[x]?this[x].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e});if(this[x]){e.write(this[x])}e.end()}this[$](U)}}[A](e){if(this[D]){this[L](e)}else if(!e&&!this[x]){this[M]()}else{this[D]=true;if(this[x]){this[L](e);const t=this[x];this[x]=null;this[C](t)}else{this[C](e)}while(this[x]&&this[x].length>=512&&!this[F]&&!this[z]){const e=this[x];this[x]=null;this[C](e)}this[D]=false}if(!this[x]||this[P]){this[M]()}}[C](e){let t=0;const r=e.length;while(t+512<=r&&!this[F]&&!this[z]){switch(this[p]){case"begin":case"header":this[N](e,t);t+=512;break;case"ignore":case"body":t+=this[k](e,t);break;case"meta":t+=this[I](e,t);break;default:throw new Error("invalid state: "+this[p])}}if(t<r){if(this[x]){this[x]=Buffer.concat([e.slice(t),this[x]])}else{this[x]=e.slice(t)}}}end(e){if(!this[F]){if(this[T]){this[T].end(e)}else{this[P]=true;this.write(e)}}}})},6716:(e,t,r)=>{const s=r(9491);const n=r(4711);const i=r(2517);const{join:o}=r(1017);const a=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const c=a==="win32";e.exports=()=>{const e=new Map;const t=new Map;const getDirs=e=>{const t=e.split("/").slice(0,-1).reduce(((e,t)=>{if(e.length){t=o(e[e.length-1],t)}e.push(t||"/");return e}),[]);return t};const r=new Set;const getQueues=r=>{const s=t.get(r);if(!s){throw new Error("function does not have any path reservations")}return{paths:s.paths.map((t=>e.get(t))),dirs:[...s.dirs].map((t=>e.get(t)))}};const check=e=>{const{paths:t,dirs:r}=getQueues(e);return t.every((t=>t[0]===e))&&r.every((t=>t[0]instanceof Set&&t[0].has(e)))};const run=e=>{if(r.has(e)||!check(e)){return false}r.add(e);e((()=>clear(e)));return true};const clear=n=>{if(!r.has(n)){return false}const{paths:i,dirs:o}=t.get(n);const a=new Set;i.forEach((t=>{const r=e.get(t);s.equal(r[0],n);if(r.length===1){e.delete(t)}else{r.shift();if(typeof r[0]==="function"){a.add(r[0])}else{r[0].forEach((e=>a.add(e)))}}}));o.forEach((t=>{const r=e.get(t);s(r[0]instanceof Set);if(r[0].size===1&&r.length===1){e.delete(t)}else if(r[0].size===1){r.shift();a.add(r[0])}else{r[0].delete(n)}}));r.delete(n);a.forEach((e=>run(e)));return true};const reserve=(r,s)=>{r=c?["win32 parallelization disabled"]:r.map((e=>i(o(n(e))).toLowerCase()));const a=new Set(r.map((e=>getDirs(e))).reduce(((e,t)=>e.concat(t))));t.set(s,{dirs:a,paths:r});r.forEach((t=>{const r=e.get(t);if(!r){e.set(t,[s])}else{r.push(s)}}));a.forEach((t=>{const r=e.get(t);if(!r){e.set(t,[new Set([s])])}else if(r[r.length-1]instanceof Set){r[r.length-1].add(s)}else{r.push(new Set([s]))}}));return run(s)};return{check:check,reserve:reserve}}},9037:(e,t,r)=>{"use strict";const s=r(1703);const n=r(1017);class Pax{constructor(e,t){this.atime=e.atime||null;this.charset=e.charset||null;this.comment=e.comment||null;this.ctime=e.ctime||null;this.gid=e.gid||null;this.gname=e.gname||null;this.linkpath=e.linkpath||null;this.mtime=e.mtime||null;this.path=e.path||null;this.size=e.size||null;this.uid=e.uid||null;this.uname=e.uname||null;this.dev=e.dev||null;this.ino=e.ino||null;this.nlink=e.nlink||null;this.global=t||false}encode(){const e=this.encodeBody();if(e===""){return null}const t=Buffer.byteLength(e);const r=512*Math.ceil(1+t/512);const i=Buffer.allocUnsafe(r);for(let e=0;e<512;e++){i[e]=0}new s({path:("PaxHeader/"+n.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,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(e,512,t,"utf8");for(let e=t+512;e<i.length;e++){i[e]=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(e){if(this[e]===null||this[e]===undefined){return""}const t=this[e]instanceof Date?this[e].getTime()/1e3:this[e];const r=" "+(e==="dev"||e==="ino"||e==="nlink"?"SCHILY.":"")+e+"="+t+"\n";const s=Buffer.byteLength(r);let n=Math.floor(Math.log(s)/Math.log(10))+1;if(s+n>=Math.pow(10,n)){n+=1}const i=n+s;return i+r}}Pax.parse=(e,t,r)=>new Pax(merge(parseKV(e),t),r);const merge=(e,t)=>t?Object.keys(e).reduce(((t,r)=>(t[r]=e[r],t)),t):e;const parseKV=e=>e.replace(/\n$/,"").split("\n").reduce(parseKVLine,Object.create(null));const parseKVLine=(e,t)=>{const r=parseInt(t,10);if(r!==Buffer.byteLength(t)+1){return e}t=t.slice((r+" ").length);const s=t.split("=");const n=s.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!n){return e}const i=s.join("=");e[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(i*1e3):/^[0-9]+$/.test(i)?+i:i;return e};e.exports=Pax},5917:(e,t,r)=>{"use strict";const{Minipass:s}=r(5540);const n=r(9740);const i=Symbol("slurp");e.exports=class ReadEntry extends s{constructor(e,t,r){super();this.pause();this.extended=t;this.globalExtended=r;this.header=e;this.startBlockSize=512*Math.ceil(e.size/512);this.blockRemain=this.startBlockSize;this.remain=e.size;this.type=e.type;this.meta=false;this.ignore=false;switch(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=true;break;default:this.ignore=true}this.path=n(e.path);this.mode=e.mode;if(this.mode){this.mode=this.mode&4095}this.uid=e.uid;this.gid=e.gid;this.uname=e.uname;this.gname=e.gname;this.size=e.size;this.mtime=e.mtime;this.atime=e.atime;this.ctime=e.ctime;this.linkpath=n(e.linkpath);this.uname=e.uname;this.gname=e.gname;if(t){this[i](t)}if(r){this[i](r,true)}}write(e){const t=e.length;if(t>this.blockRemain){throw new Error("writing more to entry than is appropriate")}const r=this.remain;const s=this.blockRemain;this.remain=Math.max(0,r-t);this.blockRemain=Math.max(0,s-t);if(this.ignore){return true}if(r>=t){return super.write(e)}return super.write(e.slice(0,r))}[i](e,t){for(const r in e){if(e[r]!==null&&e[r]!==undefined&&!(t&&r==="path")){this[r]=r==="path"||r==="linkpath"?n(e[r]):e[r]}}}}},1138:(e,t,r)=>{"use strict";const s=r(3831);const n=r(7301);const i=r(7147);const o=r(644);const a=r(4975);const c=r(1017);const l=r(1703);e.exports=(e,t,r)=>{const n=s(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")}t=Array.from(t);return n.sync?replaceSync(n,t):replace(n,t,r)};const replaceSync=(e,t)=>{const r=new n.Sync(e);let s=true;let o;let a;try{try{o=i.openSync(e.file,"r+")}catch(t){if(t.code==="ENOENT"){o=i.openSync(e.file,"w+")}else{throw t}}const n=i.fstatSync(o);const c=Buffer.alloc(512);e:for(a=0;a<n.size;a+=512){for(let e=0,t=0;e<512;e+=t){t=i.readSync(o,c,e,c.length-e,a+e);if(a===0&&c[0]===31&&c[1]===139){throw new Error("cannot append to compressed archives")}if(!t){break e}}const t=new l(c);if(!t.cksumValid){break}const r=512*Math.ceil(t.size/512);if(a+r+512>n.size){break}a+=r;if(e.mtimeCache){e.mtimeCache.set(t.path,t.mtime)}}s=false;streamSync(e,r,a,o,t)}finally{if(s){try{i.closeSync(o)}catch(e){}}}};const streamSync=(e,t,r,s,n)=>{const i=new o.WriteStreamSync(e.file,{fd:s,start:r});t.pipe(i);addFilesSync(t,n)};const replace=(e,t,r)=>{t=Array.from(t);const s=new n(e);const getPos=(t,r,s)=>{const cb=(e,r)=>{if(e){i.close(t,(t=>s(e)))}else{s(null,r)}};let n=0;if(r===0){return cb(null,0)}let o=0;const a=Buffer.alloc(512);const onread=(s,c)=>{if(s){return cb(s)}o+=c;if(o<512&&c){return i.read(t,a,o,a.length-o,n+o,onread)}if(n===0&&a[0]===31&&a[1]===139){return cb(new Error("cannot append to compressed archives"))}if(o<512){return cb(null,n)}const u=new l(a);if(!u.cksumValid){return cb(null,n)}const h=512*Math.ceil(u.size/512);if(n+h+512>r){return cb(null,n)}n+=h+512;if(n>=r){return cb(null,n)}if(e.mtimeCache){e.mtimeCache.set(u.path,u.mtime)}o=0;i.read(t,a,0,512,n,onread)};i.read(t,a,0,512,n,onread)};const a=new Promise(((r,n)=>{s.on("error",n);let a="r+";const onopen=(c,l)=>{if(c&&c.code==="ENOENT"&&a==="r+"){a="w+";return i.open(e.file,a,onopen)}if(c){return n(c)}i.fstat(l,((a,c)=>{if(a){return i.close(l,(()=>n(a)))}getPos(l,c.size,((i,a)=>{if(i){return n(i)}const c=new o.WriteStream(e.file,{fd:l,start:a});s.pipe(c);c.on("error",n);c.on("close",r);addFilesAsync(s,t)}))}))};i.open(e.file,a,onopen)}));return r?a.then(r,r):a};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@"){a({file:c.resolve(e.cwd,t.slice(1)),sync:true,noResume:true,onentry:t=>e.add(t)})}else{e.add(t)}}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const r=t.shift();if(r.charAt(0)==="@"){return a({file:c.resolve(e.cwd,r.slice(1)),noResume:true,onentry:t=>e.add(t)}).then((r=>addFilesAsync(e,t)))}else{e.add(r)}}e.end()}},332:(e,t,r)=>{const{isAbsolute:s,parse:n}=r(1017).win32;e.exports=e=>{let t="";let r=n(e);while(s(e)||r.root){const s=e.charAt(0)==="/"&&e.slice(0,4)!=="//?/"?"/":r.root;e=e.slice(s.length);t+=s;r=n(e)}return[t,e]}},2517:e=>{e.exports=e=>{let t=e.length-1;let r=-1;while(t>-1&&e.charAt(t)==="/"){r=t;t--}return r===-1?e:e.slice(0,r)}},1046:(e,t)=>{"use strict";t.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"]]);t.code=new Map(Array.from(t.name).map((e=>[e[1],e[0]])))},5951:(e,t,r)=>{"use strict";const s=r(9491);const n=r(5222);const i=r(7147);const o=r(644);const a=r(1017);const c=r(6209);const l=r(4099);const u=r(6716);const h=r(332);const d=r(9740);const p=r(2517);const m=r(4711);const y=Symbol("onEntry");const g=Symbol("checkFs");const v=Symbol("checkFs2");const b=Symbol("pruneCache");const w=Symbol("isReusable");const E=Symbol("makeFs");const S=Symbol("file");const x=Symbol("directory");const R=Symbol("link");const P=Symbol("symlink");const O=Symbol("hardlink");const $=Symbol("unsupported");const T=Symbol("checkPath");const A=Symbol("mkdir");const C=Symbol("onError");const k=Symbol("pending");const I=Symbol("pend");const N=Symbol("unpend");const D=Symbol("ended");const L=Symbol("maybeClose");const M=Symbol("skip");const j=Symbol("doChown");const F=Symbol("uid");const U=Symbol("gid");const B=Symbol("checkedCwd");const H=r(6113);const z=r(9262);const G=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const V=G==="win32";const unlinkFile=(e,t)=>{if(!V){return i.unlink(e,t)}const r=e+".DELETE."+H.randomBytes(16).toString("hex");i.rename(e,r,(e=>{if(e){return t(e)}i.unlink(r,t)}))};const unlinkFileSync=e=>{if(!V){return i.unlinkSync(e)}const t=e+".DELETE."+H.randomBytes(16).toString("hex");i.renameSync(e,t);i.unlinkSync(t)};const uint32=(e,t,r)=>e===e>>>0?e:t===t>>>0?t:r;const cacheKeyNormalize=e=>p(d(m(e))).toLowerCase();const pruneCache=(e,t)=>{t=cacheKeyNormalize(t);for(const r of e.keys()){const s=cacheKeyNormalize(r);if(s===t||s.indexOf(t+"/")===0){e.delete(r)}}};const dropCache=e=>{for(const t of e.keys()){e.delete(t)}};class Unpack extends n{constructor(e){if(!e){e={}}e.ondone=e=>{this[D]=true;this[L]()};super(e);this[B]=false;this.reservations=u();this.transform=typeof e.transform==="function"?e.transform:null;this.writable=true;this.readable=false;this[k]=0;this[D]=false;this.dirCache=e.dirCache||new Map;if(typeof e.uid==="number"||typeof e.gid==="number"){if(typeof e.uid!=="number"||typeof e.gid!=="number"){throw new TypeError("cannot set owner without number uid and gid")}if(e.preserveOwner){throw new TypeError("cannot preserve owner in archive and also set owner explicitly")}this.uid=e.uid;this.gid=e.gid;this.setOwner=true}else{this.uid=null;this.gid=null;this.setOwner=false}if(e.preserveOwner===undefined&&typeof e.uid!=="number"){this.preserveOwner=process.getuid&&process.getuid()===0}else{this.preserveOwner=!!e.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=e.forceChown===true;this.win32=!!e.win32||V;this.newer=!!e.newer;this.keep=!!e.keep;this.noMtime=!!e.noMtime;this.preservePaths=!!e.preservePaths;this.unlink=!!e.unlink;this.cwd=d(a.resolve(e.cwd||process.cwd()));this.strip=+e.strip||0;this.processUmask=e.noChmod?0:process.umask();this.umask=typeof e.umask==="number"?e.umask:this.processUmask;this.dmode=e.dmode||511&~this.umask;this.fmode=e.fmode||438&~this.umask;this.on("entry",(e=>this[y](e)))}warn(e,t,r={}){if(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT"){r.recoverable=false}return super.warn(e,t,r)}[L](){if(this[D]&&this[k]===0){this.emit("prefinish");this.emit("finish");this.emit("end")}}[T](e){if(this.strip){const t=d(e.path).split("/");if(t.length<this.strip){return false}e.path=t.slice(this.strip).join("/");if(e.type==="Link"){const t=d(e.linkpath).split("/");if(t.length>=this.strip){e.linkpath=t.slice(this.strip).join("/")}else{return false}}}if(!this.preservePaths){const t=d(e.path);const r=t.split("/");if(r.includes("..")||V&&/^[a-z]:\.\.$/i.test(r[0])){this.warn("TAR_ENTRY_ERROR",`path contains '..'`,{entry:e,path:t});return false}const[s,n]=h(t);if(s){e.path=n;this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:e,path:t})}}if(a.isAbsolute(e.path)){e.absolute=d(a.resolve(e.path))}else{e.absolute=d(a.resolve(this.cwd,e.path))}if(!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd){this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:d(e.path),resolvedPath:e.absolute,cwd:this.cwd});return false}if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir"){return false}if(this.win32){const{root:t}=a.win32.parse(e.absolute);e.absolute=t+l.encode(e.absolute.slice(t.length));const{root:r}=a.win32.parse(e.path);e.path=r+l.encode(e.path.slice(r.length))}return true}[y](e){if(!this[T](e)){return e.resume()}s.equal(typeof e.absolute,"string");switch(e.type){case"Directory":case"GNUDumpDir":if(e.mode){e.mode=e.mode|448}case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[g](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[$](e)}}[C](e,t){if(e.name==="CwdError"){this.emit("error",e)}else{this.warn("TAR_ENTRY_ERROR",e,{entry:t});this[N]();t.resume()}}[A](e,t,r){c(d(e),{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:t,noChmod:this.noChmod},r)}[j](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==="number"&&e.uid!==this.processUid||typeof e.gid==="number"&&e.gid!==this.processGid)||(typeof this.uid==="number"&&this.uid!==this.processUid||typeof this.gid==="number"&&this.gid!==this.processGid)}[F](e){return uint32(this.uid,e.uid,this.processUid)}[U](e){return uint32(this.gid,e.gid,this.processGid)}[S](e,t){const r=e.mode&4095||this.fmode;const s=new o.WriteStream(e.absolute,{flags:z(e.size),mode:r,autoClose:false});s.on("error",(r=>{if(s.fd){i.close(s.fd,(()=>{}))}s.write=()=>true;this[C](r,e);t()}));let n=1;const done=r=>{if(r){if(s.fd){i.close(s.fd,(()=>{}))}this[C](r,e);t();return}if(--n===0){i.close(s.fd,(r=>{if(r){this[C](r,e)}else{this[N]()}t()}))}};s.on("finish",(t=>{const r=e.absolute;const o=s.fd;if(e.mtime&&!this.noMtime){n++;const t=e.atime||new Date;const s=e.mtime;i.futimes(o,t,s,(e=>e?i.utimes(r,t,s,(t=>done(t&&e))):done()))}if(this[j](e)){n++;const t=this[F](e);const s=this[U](e);i.fchown(o,t,s,(e=>e?i.chown(r,t,s,(t=>done(t&&e))):done()))}done()}));const a=this.transform?this.transform(e)||e:e;if(a!==e){a.on("error",(r=>{this[C](r,e);t()}));e.pipe(a)}a.pipe(s)}[x](e,t){const r=e.mode&4095||this.dmode;this[A](e.absolute,r,(r=>{if(r){this[C](r,e);t();return}let s=1;const done=r=>{if(--s===0){t();this[N]();e.resume()}};if(e.mtime&&!this.noMtime){s++;i.utimes(e.absolute,e.atime||new Date,e.mtime,done)}if(this[j](e)){s++;i.chown(e.absolute,this[F](e),this[U](e),done)}done()}))}[$](e){e.unsupported=true;this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e});e.resume()}[P](e,t){this[R](e,e.linkpath,"symlink",t)}[O](e,t){const r=d(a.resolve(this.cwd,e.linkpath));this[R](e,r,"link",t)}[I](){this[k]++}[N](){this[k]--;this[L]()}[M](e){this[N]();e.resume()}[w](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&!V}[g](e){this[I]();const t=[e.path];if(e.linkpath){t.push(e.linkpath)}this.reservations.reserve(t,(t=>this[v](e,t)))}[b](e){if(e.type==="SymbolicLink"){dropCache(this.dirCache)}else if(e.type!=="Directory"){pruneCache(this.dirCache,e.absolute)}}[v](e,t){this[b](e);const done=r=>{this[b](e);t(r)};const checkCwd=()=>{this[A](this.cwd,this.dmode,(t=>{if(t){this[C](t,e);done();return}this[B]=true;start()}))};const start=()=>{if(e.absolute!==this.cwd){const t=d(a.dirname(e.absolute));if(t!==this.cwd){return this[A](t,this.dmode,(t=>{if(t){this[C](t,e);done();return}afterMakeParent()}))}}afterMakeParent()};const afterMakeParent=()=>{i.lstat(e.absolute,((t,r)=>{if(r&&(this.keep||this.newer&&r.mtime>e.mtime)){this[M](e);done();return}if(t||this[w](e,r)){return this[E](null,e,done)}if(r.isDirectory()){if(e.type==="Directory"){const t=!this.noChmod&&e.mode&&(r.mode&4095)!==e.mode;const afterChmod=t=>this[E](t,e,done);if(!t){return afterChmod()}return i.chmod(e.absolute,e.mode,afterChmod)}if(e.absolute!==this.cwd){return i.rmdir(e.absolute,(t=>this[E](t,e,done)))}}if(e.absolute===this.cwd){return this[E](null,e,done)}unlinkFile(e.absolute,(t=>this[E](t,e,done)))}))};if(this[B]){start()}else{checkCwd()}}[E](e,t,r){if(e){this[C](e,t);r();return}switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[S](t,r);case"Link":return this[O](t,r);case"SymbolicLink":return this[P](t,r);case"Directory":case"GNUDumpDir":return this[x](t,r)}}[R](e,t,r,s){i[r](t,e.absolute,(t=>{if(t){this[C](t,e)}else{this[N]();e.resume()}s()}))}}const callSync=e=>{try{return[null,e()]}catch(e){return[e,null]}};class UnpackSync extends Unpack{[E](e,t){return super[E](e,t,(()=>{}))}[g](e){this[b](e);if(!this[B]){const t=this[A](this.cwd,this.dmode);if(t){return this[C](t,e)}this[B]=true}if(e.absolute!==this.cwd){const t=d(a.dirname(e.absolute));if(t!==this.cwd){const r=this[A](t,this.dmode);if(r){return this[C](r,e)}}}const[t,r]=callSync((()=>i.lstatSync(e.absolute)));if(r&&(this.keep||this.newer&&r.mtime>e.mtime)){return this[M](e)}if(t||this[w](e,r)){return this[E](null,e)}if(r.isDirectory()){if(e.type==="Directory"){const t=!this.noChmod&&e.mode&&(r.mode&4095)!==e.mode;const[s]=t?callSync((()=>{i.chmodSync(e.absolute,e.mode)})):[];return this[E](s,e)}const[t]=callSync((()=>i.rmdirSync(e.absolute)));this[E](t,e)}const[s]=e.absolute===this.cwd?[]:callSync((()=>unlinkFileSync(e.absolute)));this[E](s,e)}[S](e,t){const r=e.mode&4095||this.fmode;const oner=r=>{let n;try{i.closeSync(s)}catch(e){n=e}if(r||n){this[C](r||n,e)}t()};let s;try{s=i.openSync(e.absolute,z(e.size),r)}catch(e){return oner(e)}const n=this.transform?this.transform(e)||e:e;if(n!==e){n.on("error",(t=>this[C](t,e)));e.pipe(n)}n.on("data",(e=>{try{i.writeSync(s,e,0,e.length)}catch(e){oner(e)}}));n.on("end",(t=>{let r=null;if(e.mtime&&!this.noMtime){const t=e.atime||new Date;const n=e.mtime;try{i.futimesSync(s,t,n)}catch(s){try{i.utimesSync(e.absolute,t,n)}catch(e){r=s}}}if(this[j](e)){const t=this[F](e);const n=this[U](e);try{i.fchownSync(s,t,n)}catch(s){try{i.chownSync(e.absolute,t,n)}catch(e){r=r||s}}}oner(r)}))}[x](e,t){const r=e.mode&4095||this.dmode;const s=this[A](e.absolute,r);if(s){this[C](s,e);t();return}if(e.mtime&&!this.noMtime){try{i.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(s){}}if(this[j](e)){try{i.chownSync(e.absolute,this[F](e),this[U](e))}catch(s){}}t();e.resume()}[A](e,t){try{return c.sync(d(e),{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:t})}catch(e){return e}}[R](e,t,r,s){try{i[r+"Sync"](t,e.absolute);s();e.resume()}catch(t){return this[C](t,e)}}}Unpack.Sync=UnpackSync;e.exports=Unpack},9472:(e,t,r)=>{"use strict";const s=r(3831);const n=r(1138);e.exports=(e,t,r)=>{const i=s(e);if(!i.file){throw new TypeError("file is required")}if(i.gzip){throw new TypeError("cannot append to compressed archives")}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);mtimeFilter(i);return n(i,t,r)};const mtimeFilter=e=>{const t=e.filter;if(!e.mtimeCache){e.mtimeCache=new Map}e.filter=t?(r,s)=>t(r,s)&&!(e.mtimeCache.get(r)>s.mtime):(t,r)=>!(e.mtimeCache.get(t)>r.mtime)}},8920:e=>{"use strict";e.exports=e=>class extends e{warn(e,t,r={}){if(this.file){r.file=this.file}if(this.cwd){r.cwd=this.cwd}r.code=t instanceof Error&&t.code||e;r.tarCode=e;if(!this.strict&&r.recoverable!==false){if(t instanceof Error){r=Object.assign(t,r);t=t.message}this.emit("warn",r.tarCode,t,r)}else if(t instanceof Error){this.emit("error",Object.assign(t,r))}else{this.emit("error",Object.assign(new Error(`${e}: ${t}`),r))}}}},4099:e=>{"use strict";const t=["|","<",">","?",":"];const r=t.map((e=>String.fromCharCode(61440+e.charCodeAt(0))));const s=new Map(t.map(((e,t)=>[e,r[t]])));const n=new Map(r.map(((e,r)=>[e,t[r]])));e.exports={encode:e=>t.reduce(((e,t)=>e.split(t).join(s.get(t))),e),decode:e=>r.reduce(((e,t)=>e.split(t).join(n.get(t))),e)}},1944:(e,t,r)=>{"use strict";const{Minipass:s}=r(5540);const n=r(9037);const i=r(1703);const o=r(7147);const a=r(1017);const c=r(9740);const l=r(2517);const prefixPath=(e,t)=>{if(!t){return c(e)}e=c(e).replace(/^\.(\/|$)/,"");return l(t)+"/"+e};const u=16*1024*1024;const h=Symbol("process");const d=Symbol("file");const p=Symbol("directory");const m=Symbol("symlink");const y=Symbol("hardlink");const g=Symbol("header");const v=Symbol("read");const b=Symbol("lstat");const w=Symbol("onlstat");const E=Symbol("onread");const S=Symbol("onreadlink");const x=Symbol("openfile");const R=Symbol("onopenfile");const P=Symbol("close");const O=Symbol("mode");const $=Symbol("awaitDrain");const T=Symbol("ondrain");const A=Symbol("prefix");const C=Symbol("hadError");const k=r(8920);const I=r(4099);const N=r(332);const D=r(6601);const L=k(class WriteEntry extends s{constructor(e,t){t=t||{};super(t);if(typeof e!=="string"){throw new TypeError("path is required")}this.path=c(e);this.portable=!!t.portable;this.myuid=process.getuid&&process.getuid()||0;this.myuser=process.env.USER||"";this.maxReadSize=t.maxReadSize||u;this.linkCache=t.linkCache||new Map;this.statCache=t.statCache||new Map;this.preservePaths=!!t.preservePaths;this.cwd=c(t.cwd||process.cwd());this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.mtime=t.mtime||null;this.prefix=t.prefix?c(t.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;if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}let r=false;if(!this.preservePaths){const[e,t]=N(this.path);if(e){this.path=t;r=e}}this.win32=!!t.win32||process.platform==="win32";if(this.win32){this.path=I.decode(this.path.replace(/\\/g,"/"));e=e.replace(/\\/g,"/")}this.absolute=c(t.absolute||a.resolve(this.cwd,e));if(this.path===""){this.path="./"}if(r){this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path})}if(this.statCache.has(this.absolute)){this[w](this.statCache.get(this.absolute))}else{this[b]()}}emit(e,...t){if(e==="error"){this[C]=true}return super.emit(e,...t)}[b](){o.lstat(this.absolute,((e,t)=>{if(e){return this.emit("error",e)}this[w](t)}))}[w](e){this.statCache.set(this.absolute,e);this.stat=e;if(!e.isFile()){e.size=0}this.type=getType(e);this.emit("stat",e);this[h]()}[h](){switch(this.type){case"File":return this[d]();case"Directory":return this[p]();case"SymbolicLink":return this[m]();default:return this.end()}}[O](e){return D(e,this.type==="Directory",this.portable)}[A](e){return prefixPath(e,this.prefix)}[g](){if(this.type==="Directory"&&this.portable){this.noMtime=true}this.header=new i({path:this[A](this.path),linkpath:this.type==="Link"?this[A](this.linkpath):this.linkpath,mode:this[O](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});if(this.header.encode()&&!this.noPax){super.write(new n({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[A](this.path),linkpath:this.type==="Link"?this[A](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)}[p](){if(this.path.slice(-1)!=="/"){this.path+="/"}this.stat.size=0;this[g]();this.end()}[m](){o.readlink(this.absolute,((e,t)=>{if(e){return this.emit("error",e)}this[S](t)}))}[S](e){this.linkpath=c(e);this[g]();this.end()}[y](e){this.type="Link";this.linkpath=c(a.relative(this.cwd,e));this.stat.size=0;this[g]();this.end()}[d](){if(this.stat.nlink>1){const e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){const t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0){return this[y](t)}}this.linkCache.set(e,this.absolute)}this[g]();if(this.stat.size===0){return this.end()}this[x]()}[x](){o.open(this.absolute,"r",((e,t)=>{if(e){return this.emit("error",e)}this[R](t)}))}[R](e){this.fd=e;if(this[C]){return this[P]()}this.blockLen=512*Math.ceil(this.stat.size/512);this.blockRemain=this.blockLen;const t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t);this.offset=0;this.pos=0;this.remain=this.stat.size;this.length=this.buf.length;this[v]()}[v](){const{fd:e,buf:t,offset:r,length:s,pos:n}=this;o.read(e,t,r,s,n,((e,t)=>{if(e){return this[P]((()=>this.emit("error",e)))}this[E](t)}))}[P](e){o.close(this.fd,e)}[E](e){if(e<=0&&this.remain>0){const e=new Error("encountered unexpected EOF");e.path=this.absolute;e.syscall="read";e.code="EOF";return this[P]((()=>this.emit("error",e)))}if(e>this.remain){const e=new Error("did not encounter expected EOF");e.path=this.absolute;e.syscall="read";e.code="EOF";return this[P]((()=>this.emit("error",e)))}if(e===this.remain){for(let t=e;t<this.length&&e<this.blockRemain;t++){this.buf[t+this.offset]=0;e++;this.remain++}}const t=this.offset===0&&e===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+e);const r=this.write(t);if(!r){this[$]((()=>this[T]()))}else{this[T]()}}[$](e){this.once("drain",e)}write(e){if(this.blockRemain<e.length){const e=new Error("writing more data than expected");e.path=this.absolute;return this.emit("error",e)}this.remain-=e.length;this.blockRemain-=e.length;this.pos+=e.length;this.offset+=e.length;return super.write(e)}[T](){if(!this.remain){if(this.blockRemain){super.write(Buffer.alloc(this.blockRemain))}return this[P]((e=>e?this.emit("error",e):this.end()))}if(this.offset>=this.length){this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length));this.offset=0}this.length=this.buf.length-this.offset;this[v]()}});class WriteEntrySync extends L{[b](){this[w](o.lstatSync(this.absolute))}[m](){this[S](o.readlinkSync(this.absolute))}[x](){this[R](o.openSync(this.absolute,"r"))}[v](){let e=true;try{const{fd:t,buf:r,offset:s,length:n,pos:i}=this;const a=o.readSync(t,r,s,n,i);this[E](a);e=false}finally{if(e){try{this[P]((()=>{}))}catch(e){}}}}[$](e){e()}[P](e){o.closeSync(this.fd);e()}}const M=k(class WriteEntryTar extends s{constructor(e,t){t=t||{};super(t);this.preservePaths=!!t.preservePaths;this.portable=!!t.portable;this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.readEntry=e;this.type=e.type;if(this.type==="Directory"&&this.portable){this.noMtime=true}this.prefix=t.prefix||null;this.path=c(e.path);this.mode=this[O](e.mode);this.uid=this.portable?null:e.uid;this.gid=this.portable?null:e.gid;this.uname=this.portable?null:e.uname;this.gname=this.portable?null:e.gname;this.size=e.size;this.mtime=this.noMtime?null:t.mtime||e.mtime;this.atime=this.portable?null:e.atime;this.ctime=this.portable?null:e.ctime;this.linkpath=c(e.linkpath);if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}let r=false;if(!this.preservePaths){const[e,t]=N(this.path);if(e){this.path=t;r=e}}this.remain=e.size;this.blockRemain=e.startBlockSize;this.header=new i({path:this[A](this.path),linkpath:this.type==="Link"?this[A](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});if(r){this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path})}if(this.header.encode()&&!this.noPax){super.write(new n({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[A](this.path),linkpath:this.type==="Link"?this[A](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);e.pipe(this)}[A](e){return prefixPath(e,this.prefix)}[O](e){return D(e,this.type==="Directory",this.portable)}write(e){const t=e.length;if(t>this.blockRemain){throw new Error("writing more to entry than is appropriate")}this.blockRemain-=t;return super.write(e)}end(){if(this.blockRemain){super.write(Buffer.alloc(this.blockRemain))}return super.end()}});L.Sync=WriteEntrySync;L.Tar=M;const getType=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=L},3132:(e,t,r)=>{"use strict";const{Readable:s}=r(2781);const toReadableStream=e=>new s({read(){this.push(e);this.push(null)}});e.exports=toReadableStream;e.exports["default"]=toReadableStream},492:(e,t,r)=>{"use strict";
65
67
  /*!
66
68
  * to-regex-range <https://github.com/micromatch/to-regex-range>
67
69
  *
@@ -69,4 +71,4 @@ e.exports=runParallel;const s=r(592);function runParallel(e,t){let r,n,i;let o=t
69
71
  * Released under the MIT License.
70
72
  */const s=r(3357);const toRegexRange=(e,t,r)=>{if(s(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(s(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let n={relaxZeros:true,...r};if(typeof n.strictZeros==="boolean"){n.relaxZeros=n.strictZeros===false}let i=String(n.relaxZeros);let o=String(n.shorthand);let a=String(n.capture);let c=String(n.wrap);let l=e+":"+t+"="+i+o+a+c;if(toRegexRange.cache.hasOwnProperty(l)){return toRegexRange.cache[l].result}let u=Math.min(e,t);let h=Math.max(e,t);if(Math.abs(u-h)===1){let r=e+"|"+t;if(n.capture){return`(${r})`}if(n.wrap===false){return r}return`(?:${r})`}let d=hasPadding(e)||hasPadding(t);let p={min:e,max:t,a:u,b:h};let m=[];let y=[];if(d){p.isPadded=d;p.maxLen=String(p.max).length}if(u<0){let e=h<0?Math.abs(h):1;y=splitToPatterns(e,Math.abs(u),p,n);u=p.a=0}if(h>=0){m=splitToPatterns(u,h,p,n)}p.negatives=y;p.positives=m;p.result=collatePatterns(y,m,n);if(n.capture===true){p.result=`(${p.result})`}else if(n.wrap!==false&&m.length+y.length>1){p.result=`(?:${p.result})`}toRegexRange.cache[l]=p;return p.result};function collatePatterns(e,t,r){let s=filterPatterns(e,t,"-",false,r)||[];let n=filterPatterns(t,e,"",false,r)||[];let i=filterPatterns(e,t,"-?",true,r)||[];let o=s.concat(i).concat(n);return o.join("|")}function splitToRanges(e,t){let r=1;let s=1;let n=countNines(e,r);let i=new Set([t]);while(e<=n&&n<=t){i.add(n);r+=1;n=countNines(e,r)}n=countZeros(t+1,s)-1;while(e<n&&n<=t){i.add(n);s+=1;n=countZeros(t+1,s)-1}i=[...i];i.sort(compare);return i}function rangeToPattern(e,t,r){if(e===t){return{pattern:e,count:[],digits:0}}let s=zip(e,t);let n=s.length;let i="";let o=0;for(let e=0;e<n;e++){let[t,n]=s[e];if(t===n){i+=t}else if(t!=="0"||n!=="9"){i+=toCharacterClass(t,n,r)}else{o++}}if(o){i+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:i,count:[o],digits:n}}function splitToPatterns(e,t,r,s){let n=splitToRanges(e,t);let i=[];let o=e;let a;for(let e=0;e<n.length;e++){let t=n[e];let c=rangeToPattern(String(o),String(t),s);let l="";if(!r.isPadded&&a&&a.pattern===c.pattern){if(a.count.length>1){a.count.pop()}a.count.push(c.count[0]);a.string=a.pattern+toQuantifier(a.count);o=t+1;continue}if(r.isPadded){l=padZeros(t,r,s)}c.string=l+c.pattern+toQuantifier(c.count);i.push(c);o=t+1;a=c}return i}function filterPatterns(e,t,r,s,n){let i=[];for(let n of e){let{string:e}=n;if(!s&&!contains(t,"string",e)){i.push(r+e)}if(s&&contains(t,"string",e)){i.push(r+e)}}return i}function zip(e,t){let r=[];for(let s=0;s<e.length;s++)r.push([e[s],t[s]]);return r}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,r){return e.some((e=>e[t]===r))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,r=""]=e;if(r||t>1){return`{${t+(r?","+r:"")}}`}return""}function toCharacterClass(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,r){if(!t.isPadded){return e}let s=Math.abs(t.maxLen-String(e).length);let n=r.relaxZeros!==false;switch(s){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:{return n?`0{0,${s}}`:`0{${s}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};e.exports=toRegexRange},5656:(e,t,r)=>{const{URL:s}=r(7310);const{join:n}=r(1017);const i=r(7147);const{promisify:o}=r(3837);const{tmpdir:a}=r(2037);const c=r(9074);const l=o(i.writeFile);const u=o(i.mkdir);const h=o(i.readFile);const compareVersions=(e,t)=>e.localeCompare(t,"en-US",{numeric:true});const encode=e=>encodeURIComponent(e).replace(/^%40/,"@");const getFile=async(e,t)=>{const r=a();const s=n(r,"update-check");if(!i.existsSync(s)){await u(s)}let o=`${e.name}-${t}.json`;if(e.scope){o=`${e.scope}-${o}`}return n(s,o)};const evaluateCache=async(e,t,r)=>{if(i.existsSync(e)){const s=await h(e,"utf8");const{lastUpdate:n,latest:i}=JSON.parse(s);const o=n+r;if(o>t){return{shouldCheck:false,latest:i}}}return{shouldCheck:true,latest:null}};const updateCache=async(e,t,r)=>{const s=JSON.stringify({latest:t,lastUpdate:r});await l(e,s,"utf8")};const loadPackage=(e,t)=>new Promise(((s,n)=>{const i={host:e.hostname,path:e.pathname,port:e.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(t){i.headers.authorization=`${t.type} ${t.token}`}const{get:o}=r(e.protocol==="https:"?5687:3685);o(i,(e=>{const{statusCode:t}=e;if(t!==200){const r=new Error(`Request failed with code ${t}`);r.code=t;n(r);e.resume();return}let r="";e.setEncoding("utf8");e.on("data",(e=>{r+=e}));e.on("end",(()=>{try{const e=JSON.parse(r);s(e)}catch(e){n(e)}}))})).on("error",n).on("timeout",n)}));const getMostRecent=async({full:e,scope:t},n)=>{const i=c(t);const o=new s(e,i);let a=null;try{a=await loadPackage(o)}catch(e){if(e.code&&String(e.code).startsWith(4)){const e=r(1281);const t=e(i,{recursive:true});a=await loadPackage(o,t)}else{throw e}}const l=a["dist-tags"][n];if(!l){throw new Error(`Distribution tag ${n} is not available`)}return l};const d={interval:36e5,distTag:"latest"};const getDetails=e=>{const t={full:encode(e)};if(e.includes("/")){const r=e.split("/");t.scope=r[0];t.name=r[1]}else{t.scope=null;t.name=e}return t};e.exports=async(e,t)=>{if(typeof e!=="object"){throw new Error("The first parameter should be your package.json file content")}const r=getDetails(e.name);const s=Date.now();const{distTag:n,interval:i}=Object.assign({},d,t);const o=await getFile(r,n);let a=null;let c=true;({shouldCheck:c,latest:a}=await evaluateCache(o,s,i));if(c){a=await getMostRecent(r,n);await updateCache(o,a,s)}const l=compareVersions(e.version,a);if(l===-1){return{latest:a,fromCache:!c}}return null}},4618:function(e,t){
71
73
  /** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
72
- (function(e,r){true?r(t):0})(this,(function(e){"use strict";function merge(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++){t[r]=arguments[r]}if(t.length>1){t[0]=t[0].slice(0,-1);var s=t.length-1;for(var n=1;n<s;++n){t[n]=t[n].slice(1,-1)}t[s]=t[s].slice(1);return t.join("")}else{return t[0]}}function subexp(e){return"(?:"+e+")"}function typeOf(e){return e===undefined?"undefined":e===null?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(e){return e.toUpperCase()}function toArray(e){return e!==undefined&&e!==null?e instanceof Array?e:typeof e.length!=="number"||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function assign(e,t){var r=e;if(t){for(var s in t){r[s]=t[s]}}return r}function buildExps(e){var t="[A-Za-z]",r="[\\x0D]",s="[0-9]",n="[\\x22]",i=merge(s,"[A-Fa-f]"),o="[\\x0A]",a="[\\x20]",c=subexp(subexp("%[EFef]"+i+"%"+i+i+"%"+i+i)+"|"+subexp("%[89A-Fa-f]"+i+"%"+i+i)+"|"+subexp("%"+i+i)),l="[\\:\\/\\?\\#\\[\\]\\@]",u="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",h=merge(l,u),d=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",p=e?"[\\uE000-\\uF8FF]":"[]",m=merge(t,s,"[\\-\\.\\_\\~]",d),y=subexp(t+merge(t,s,"[\\+\\-\\.]")+"*"),g=subexp(subexp(c+"|"+merge(m,u,"[\\:]"))+"*"),v=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+s)+"|"+subexp("1"+s+s)+"|"+subexp("[1-9]"+s)+"|"+s),b=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+s)+"|"+subexp("1"+s+s)+"|"+subexp("0?[1-9]"+s)+"|0?0?"+s),w=subexp(b+"\\."+b+"\\."+b+"\\."+b),E=subexp(i+"{1,4}"),S=subexp(subexp(E+"\\:"+E)+"|"+w),x=subexp(subexp(E+"\\:")+"{6}"+S),R=subexp("\\:\\:"+subexp(E+"\\:")+"{5}"+S),P=subexp(subexp(E)+"?\\:\\:"+subexp(E+"\\:")+"{4}"+S),O=subexp(subexp(subexp(E+"\\:")+"{0,1}"+E)+"?\\:\\:"+subexp(E+"\\:")+"{3}"+S),$=subexp(subexp(subexp(E+"\\:")+"{0,2}"+E)+"?\\:\\:"+subexp(E+"\\:")+"{2}"+S),T=subexp(subexp(subexp(E+"\\:")+"{0,3}"+E)+"?\\:\\:"+E+"\\:"+S),A=subexp(subexp(subexp(E+"\\:")+"{0,4}"+E)+"?\\:\\:"+S),C=subexp(subexp(subexp(E+"\\:")+"{0,5}"+E)+"?\\:\\:"+E),k=subexp(subexp(subexp(E+"\\:")+"{0,6}"+E)+"?\\:\\:"),I=subexp([x,R,P,O,$,T,A,C,k].join("|")),N=subexp(subexp(m+"|"+c)+"+"),D=subexp(I+"\\%25"+N),L=subexp(I+subexp("\\%25|\\%(?!"+i+"{2})")+N),M=subexp("[vV]"+i+"+\\."+merge(m,u,"[\\:]")+"+"),j=subexp("\\["+subexp(L+"|"+I+"|"+M)+"\\]"),F=subexp(subexp(c+"|"+merge(m,u))+"*"),U=subexp(j+"|"+w+"(?!"+F+")"+"|"+F),B=subexp(s+"*"),H=subexp(subexp(g+"@")+"?"+U+subexp("\\:"+B)+"?"),z=subexp(c+"|"+merge(m,u,"[\\:\\@]")),G=subexp(z+"*"),V=subexp(z+"+"),q=subexp(subexp(c+"|"+merge(m,u,"[\\@]"))+"+"),W=subexp(subexp("\\/"+G)+"*"),K=subexp("\\/"+subexp(V+W)+"?"),Y=subexp(q+W),Z=subexp(V+W),J="(?!"+z+")",X=subexp(W+"|"+K+"|"+Y+"|"+Z+"|"+J),Q=subexp(subexp(z+"|"+merge("[\\/\\?]",p))+"*"),ee=subexp(subexp(z+"|[\\/\\?]")+"*"),te=subexp(subexp("\\/\\/"+H+W)+"|"+K+"|"+Z+"|"+J),re=subexp(y+"\\:"+te+subexp("\\?"+Q)+"?"+subexp("\\#"+ee)+"?"),se=subexp(subexp("\\/\\/"+H+W)+"|"+K+"|"+Y+"|"+J),ne=subexp(se+subexp("\\?"+Q)+"?"+subexp("\\#"+ee)+"?"),ie=subexp(re+"|"+ne),oe=subexp(y+"\\:"+te+subexp("\\?"+Q)+"?"),ae="^("+y+")\\:"+subexp(subexp("\\/\\/("+subexp("("+g+")@")+"?("+U+")"+subexp("\\:("+B+")")+"?)")+"?("+W+"|"+K+"|"+Z+"|"+J+")")+subexp("\\?("+Q+")")+"?"+subexp("\\#("+ee+")")+"?$",ce="^(){0}"+subexp(subexp("\\/\\/("+subexp("("+g+")@")+"?("+U+")"+subexp("\\:("+B+")")+"?)")+"?("+W+"|"+K+"|"+Y+"|"+J+")")+subexp("\\?("+Q+")")+"?"+subexp("\\#("+ee+")")+"?$",le="^("+y+")\\:"+subexp(subexp("\\/\\/("+subexp("("+g+")@")+"?("+U+")"+subexp("\\:("+B+")")+"?)")+"?("+W+"|"+K+"|"+Z+"|"+J+")")+subexp("\\?("+Q+")")+"?$",ue="^"+subexp("\\#("+ee+")")+"?$",he="^"+subexp("("+g+")@")+"?("+U+")"+subexp("\\:("+B+")")+"?$";return{NOT_SCHEME:new RegExp(merge("[^]",t,s,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",m,u),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",m,u),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",m,u),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",m,u),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",m,u,"[\\:\\@\\/\\?]",p),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",m,u,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",m,u),"g"),UNRESERVED:new RegExp(m,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",m,h),"g"),PCT_ENCODED:new RegExp(c,"g"),IPV4ADDRESS:new RegExp("^("+w+")$"),IPV6ADDRESS:new RegExp("^\\[?("+I+")"+subexp(subexp("\\%25|\\%(?!"+i+"{2})")+"("+N+")")+"?\\]?$")}}var t=buildExps(false);var r=buildExps(true);var s=function(){function sliceIterator(e,t){var r=[];var s=true;var n=false;var i=undefined;try{for(var o=e[Symbol.iterator](),a;!(s=(a=o.next()).done);s=true){r.push(a.value);if(t&&r.length===t)break}}catch(e){n=true;i=e}finally{try{if(!s&&o["return"])o["return"]()}finally{if(n)throw i}}return r}return function(e,t){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,t)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}else{return Array.from(e)}};var n=2147483647;var i=36;var o=1;var a=26;var c=38;var l=700;var u=72;var h=128;var d="-";var p=/^xn--/;var m=/[^\0-\x7E]/;var y=/[\x2E\u3002\uFF0E\uFF61]/g;var g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var v=i-o;var b=Math.floor;var w=String.fromCharCode;function error$1(e){throw new RangeError(g[e])}function map(e,t){var r=[];var s=e.length;while(s--){r[s]=t(e[s])}return r}function mapDomain(e,t){var r=e.split("@");var s="";if(r.length>1){s=r[0]+"@";e=r[1]}e=e.replace(y,".");var n=e.split(".");var i=map(n,t).join(".");return s+i}function ucs2decode(e){var t=[];var r=0;var s=e.length;while(r<s){var n=e.charCodeAt(r++);if(n>=55296&&n<=56319&&r<s){var i=e.charCodeAt(r++);if((i&64512)==56320){t.push(((n&1023)<<10)+(i&1023)+65536)}else{t.push(n);r--}}else{t.push(n)}}return t}var E=function ucs2encode(e){return String.fromCodePoint.apply(String,toConsumableArray(e))};var S=function basicToDigit(e){if(e-48<10){return e-22}if(e-65<26){return e-65}if(e-97<26){return e-97}return i};var x=function digitToBasic(e,t){return e+22+75*(e<26)-((t!=0)<<5)};var R=function adapt(e,t,r){var s=0;e=r?b(e/l):e>>1;e+=b(e/t);for(;e>v*a>>1;s+=i){e=b(e/v)}return b(s+(v+1)*e/(e+c))};var P=function decode(e){var t=[];var r=e.length;var s=0;var c=h;var l=u;var p=e.lastIndexOf(d);if(p<0){p=0}for(var m=0;m<p;++m){if(e.charCodeAt(m)>=128){error$1("not-basic")}t.push(e.charCodeAt(m))}for(var y=p>0?p+1:0;y<r;){var g=s;for(var v=1,w=i;;w+=i){if(y>=r){error$1("invalid-input")}var E=S(e.charCodeAt(y++));if(E>=i||E>b((n-s)/v)){error$1("overflow")}s+=E*v;var x=w<=l?o:w>=l+a?a:w-l;if(E<x){break}var P=i-x;if(v>b(n/P)){error$1("overflow")}v*=P}var O=t.length+1;l=R(s-g,O,g==0);if(b(s/O)>n-c){error$1("overflow")}c+=b(s/O);s%=O;t.splice(s++,0,c)}return String.fromCodePoint.apply(String,t)};var O=function encode(e){var t=[];e=ucs2decode(e);var r=e.length;var s=h;var c=0;var l=u;var p=true;var m=false;var y=undefined;try{for(var g=e[Symbol.iterator](),v;!(p=(v=g.next()).done);p=true){var E=v.value;if(E<128){t.push(w(E))}}}catch(e){m=true;y=e}finally{try{if(!p&&g.return){g.return()}}finally{if(m){throw y}}}var S=t.length;var P=S;if(S){t.push(d)}while(P<r){var O=n;var $=true;var T=false;var A=undefined;try{for(var C=e[Symbol.iterator](),k;!($=(k=C.next()).done);$=true){var I=k.value;if(I>=s&&I<O){O=I}}}catch(e){T=true;A=e}finally{try{if(!$&&C.return){C.return()}}finally{if(T){throw A}}}var N=P+1;if(O-s>b((n-c)/N)){error$1("overflow")}c+=(O-s)*N;s=O;var D=true;var L=false;var M=undefined;try{for(var j=e[Symbol.iterator](),F;!(D=(F=j.next()).done);D=true){var U=F.value;if(U<s&&++c>n){error$1("overflow")}if(U==s){var B=c;for(var H=i;;H+=i){var z=H<=l?o:H>=l+a?a:H-l;if(B<z){break}var G=B-z;var V=i-z;t.push(w(x(z+G%V,0)));B=b(G/V)}t.push(w(x(B,0)));l=R(c,N,P==S);c=0;++P}}}catch(e){L=true;M=e}finally{try{if(!D&&j.return){j.return()}}finally{if(L){throw M}}}++c;++s}return t.join("")};var $=function toUnicode(e){return mapDomain(e,(function(e){return p.test(e)?P(e.slice(4).toLowerCase()):e}))};var T=function toASCII(e){return mapDomain(e,(function(e){return m.test(e)?"xn--"+O(e):e}))};var A={version:"2.1.0",ucs2:{decode:ucs2decode,encode:E},decode:P,encode:O,toASCII:T,toUnicode:$};var C={};function pctEncChar(e){var t=e.charCodeAt(0);var r=void 0;if(t<16)r="%0"+t.toString(16).toUpperCase();else if(t<128)r="%"+t.toString(16).toUpperCase();else if(t<2048)r="%"+(t>>6|192).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();else r="%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();return r}function pctDecChars(e){var t="";var r=0;var s=e.length;while(r<s){var n=parseInt(e.substr(r+1,2),16);if(n<128){t+=String.fromCharCode(n);r+=3}else if(n>=194&&n<224){if(s-r>=6){var i=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((n&31)<<6|i&63)}else{t+=e.substr(r,6)}r+=6}else if(n>=224){if(s-r>=9){var o=parseInt(e.substr(r+4,2),16);var a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((n&15)<<12|(o&63)<<6|a&63)}else{t+=e.substr(r,9)}r+=9}else{t+=e.substr(r,3);r+=3}}return t}function _normalizeComponentEncoding(e,t){function decodeUnreserved(e){var r=pctDecChars(e);return!r.match(t.UNRESERVED)?e:r}if(e.scheme)e.scheme=String(e.scheme).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_USERINFO,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.host!==undefined)e.host=String(e.host).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_HOST,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.path!==undefined)e.path=String(e.path).replace(t.PCT_ENCODED,decodeUnreserved).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.query!==undefined)e.query=String(e.query).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_QUERY,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_FRAGMENT,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);return e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,t){var r=e.match(t.IPV4ADDRESS)||[];var n=s(r,2),i=n[1];if(i){return i.split(".").map(_stripLeadingZeros).join(".")}else{return e}}function _normalizeIPv6(e,t){var r=e.match(t.IPV6ADDRESS)||[];var n=s(r,3),i=n[1],o=n[2];if(i){var a=i.toLowerCase().split("::").reverse(),c=s(a,2),l=c[0],u=c[1];var h=u?u.split(":").map(_stripLeadingZeros):[];var d=l.split(":").map(_stripLeadingZeros);var p=t.IPV4ADDRESS.test(d[d.length-1]);var m=p?7:8;var y=d.length-m;var g=Array(m);for(var v=0;v<m;++v){g[v]=h[v]||d[y+v]||""}if(p){g[m-1]=_normalizeIPv4(g[m-1],t)}var b=g.reduce((function(e,t,r){if(!t||t==="0"){var s=e[e.length-1];if(s&&s.index+s.length===r){s.length++}else{e.push({index:r,length:1})}}return e}),[]);var w=b.sort((function(e,t){return t.length-e.length}))[0];var E=void 0;if(w&&w.length>1){var S=g.slice(0,w.index);var x=g.slice(w.index+w.length);E=S.join(":")+"::"+x.join(":")}else{E=g.join(":")}if(o){E+="%"+o}return E}else{return e}}var k=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var I="".match(/(){0}/)[1]===undefined;function parse(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n={};var i=s.iri!==false?r:t;if(s.reference==="suffix")e=(s.scheme?s.scheme+":":"")+"//"+e;var o=e.match(k);if(o){if(I){n.scheme=o[1];n.userinfo=o[3];n.host=o[4];n.port=parseInt(o[5],10);n.path=o[6]||"";n.query=o[7];n.fragment=o[8];if(isNaN(n.port)){n.port=o[5]}}else{n.scheme=o[1]||undefined;n.userinfo=e.indexOf("@")!==-1?o[3]:undefined;n.host=e.indexOf("//")!==-1?o[4]:undefined;n.port=parseInt(o[5],10);n.path=o[6]||"";n.query=e.indexOf("?")!==-1?o[7]:undefined;n.fragment=e.indexOf("#")!==-1?o[8]:undefined;if(isNaN(n.port)){n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined}}if(n.host){n.host=_normalizeIPv6(_normalizeIPv4(n.host,i),i)}if(n.scheme===undefined&&n.userinfo===undefined&&n.host===undefined&&n.port===undefined&&!n.path&&n.query===undefined){n.reference="same-document"}else if(n.scheme===undefined){n.reference="relative"}else if(n.fragment===undefined){n.reference="absolute"}else{n.reference="uri"}if(s.reference&&s.reference!=="suffix"&&s.reference!==n.reference){n.error=n.error||"URI is not a "+s.reference+" reference."}var a=C[(s.scheme||n.scheme||"").toLowerCase()];if(!s.unicodeSupport&&(!a||!a.unicodeSupport)){if(n.host&&(s.domainHost||a&&a.domainHost)){try{n.host=A.toASCII(n.host.replace(i.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(n,t)}else{_normalizeComponentEncoding(n,i)}if(a&&a.parse){a.parse(n,s)}}else{n.error=n.error||"URI can not be parsed."}return n}function _recomposeAuthority(e,s){var n=s.iri!==false?r:t;var i=[];if(e.userinfo!==undefined){i.push(e.userinfo);i.push("@")}if(e.host!==undefined){i.push(_normalizeIPv6(_normalizeIPv4(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"})))}if(typeof e.port==="number"){i.push(":");i.push(e.port.toString(10))}return i.length?i.join(""):undefined}var N=/^\.\.?\//;var D=/^\/\.(\/|$)/;var L=/^\/\.\.(\/|$)/;var M=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){var t=[];while(e.length){if(e.match(N)){e=e.replace(N,"")}else if(e.match(D)){e=e.replace(D,"/")}else if(e.match(L)){e=e.replace(L,"/");t.pop()}else if(e==="."||e===".."){e=""}else{var r=e.match(M);if(r){var s=r[0];e=e.slice(s.length);t.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return t.join("")}function serialize(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=s.iri?r:t;var i=[];var o=C[(s.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize)o.serialize(e,s);if(e.host){if(n.IPV6ADDRESS.test(e.host)){}else if(s.domainHost||o&&o.domainHost){try{e.host=!s.iri?A.toASCII(e.host.replace(n.PCT_ENCODED,pctDecChars).toLowerCase()):A.toUnicode(e.host)}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(!s.iri?"ASCII":"Unicode")+" via punycode: "+t}}}_normalizeComponentEncoding(e,n);if(s.reference!=="suffix"&&e.scheme){i.push(e.scheme);i.push(":")}var a=_recomposeAuthority(e,s);if(a!==undefined){if(s.reference!=="suffix"){i.push("//")}i.push(a);if(e.path&&e.path.charAt(0)!=="/"){i.push("/")}}if(e.path!==undefined){var c=e.path;if(!s.absolutePath&&(!o||!o.absolutePath)){c=removeDotSegments(c)}if(a===undefined){c=c.replace(/^\/\//,"/%2F")}i.push(c)}if(e.query!==undefined){i.push("?");i.push(e.query)}if(e.fragment!==undefined){i.push("#");i.push(e.fragment)}return i.join("")}function resolveComponents(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var s=arguments[3];var n={};if(!s){e=parse(serialize(e,r),r);t=parse(serialize(t,r),r)}r=r||{};if(!r.tolerant&&t.scheme){n.scheme=t.scheme;n.userinfo=t.userinfo;n.host=t.host;n.port=t.port;n.path=removeDotSegments(t.path||"");n.query=t.query}else{if(t.userinfo!==undefined||t.host!==undefined||t.port!==undefined){n.userinfo=t.userinfo;n.host=t.host;n.port=t.port;n.path=removeDotSegments(t.path||"");n.query=t.query}else{if(!t.path){n.path=e.path;if(t.query!==undefined){n.query=t.query}else{n.query=e.query}}else{if(t.path.charAt(0)==="/"){n.path=removeDotSegments(t.path)}else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path){n.path="/"+t.path}else if(!e.path){n.path=t.path}else{n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path}n.path=removeDotSegments(n.path)}n.query=t.query}n.userinfo=e.userinfo;n.host=e.host;n.port=e.port}n.scheme=e.scheme}n.fragment=t.fragment;return n}function resolve(e,t,r){var s=assign({scheme:"null"},r);return serialize(resolveComponents(parse(e,s),parse(t,s),s,true),s)}function normalize(e,t){if(typeof e==="string"){e=serialize(parse(e,t),t)}else if(typeOf(e)==="object"){e=parse(serialize(e,t),t)}return e}function equal(e,t,r){if(typeof e==="string"){e=serialize(parse(e,r),r)}else if(typeOf(e)==="object"){e=serialize(e,r)}if(typeof t==="string"){t=serialize(parse(t,r),r)}else if(typeOf(t)==="object"){t=serialize(t,r)}return e===t}function escapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?t.ESCAPE:r.ESCAPE,pctEncChar)}function unescapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?t.PCT_ENCODED:r.PCT_ENCODED,pctDecChars)}var j={scheme:"http",domainHost:true,parse:function parse(e,t){if(!e.host){e.error=e.error||"HTTP URIs must have a host."}return e},serialize:function serialize(e,t){if(e.port===(String(e.scheme).toLowerCase()!=="https"?80:443)||e.port===""){e.port=undefined}if(!e.path){e.path="/"}return e}};var F={scheme:"https",domainHost:j.domainHost,parse:j.parse,serialize:j.serialize};var U={};var B=true;var H="[A-Za-z0-9\\-\\.\\_\\~"+(B?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var z="[0-9A-Fa-f]";var G=subexp(subexp("%[EFef]"+z+"%"+z+z+"%"+z+z)+"|"+subexp("%[89A-Fa-f]"+z+"%"+z+z)+"|"+subexp("%"+z+z));var V="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var q="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var W=merge(q,'[\\"\\\\]');var K="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var Y=new RegExp(H,"g");var Z=new RegExp(G,"g");var J=new RegExp(merge("[^]",V,"[\\.]",'[\\"]',W),"g");var X=new RegExp(merge("[^]",H,K),"g");var Q=X;function decodeUnreserved(e){var t=pctDecChars(e);return!t.match(Y)?e:t}var ee={scheme:"mailto",parse:function parse$$1(e,t){var r=e;var s=r.to=r.path?r.path.split(","):[];r.path=undefined;if(r.query){var n=false;var i={};var o=r.query.split("&");for(var a=0,c=o.length;a<c;++a){var l=o[a].split("=");switch(l[0]){case"to":var u=l[1].split(",");for(var h=0,d=u.length;h<d;++h){s.push(u[h])}break;case"subject":r.subject=unescapeComponent(l[1],t);break;case"body":r.body=unescapeComponent(l[1],t);break;default:n=true;i[unescapeComponent(l[0],t)]=unescapeComponent(l[1],t);break}}if(n)r.headers=i}r.query=undefined;for(var p=0,m=s.length;p<m;++p){var y=s[p].split("@");y[0]=unescapeComponent(y[0]);if(!t.unicodeSupport){try{y[1]=A.toASCII(unescapeComponent(y[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}}else{y[1]=unescapeComponent(y[1],t).toLowerCase()}s[p]=y.join("@")}return r},serialize:function serialize$$1(e,t){var r=e;var s=toArray(e.to);if(s){for(var n=0,i=s.length;n<i;++n){var o=String(s[n]);var a=o.lastIndexOf("@");var c=o.slice(0,a).replace(Z,decodeUnreserved).replace(Z,toUpperCase).replace(J,pctEncChar);var l=o.slice(a+1);try{l=!t.iri?A.toASCII(unescapeComponent(l,t).toLowerCase()):A.toUnicode(l)}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(!t.iri?"ASCII":"Unicode")+" via punycode: "+e}s[n]=c+"@"+l}r.path=s.join(",")}var u=e.headers=e.headers||{};if(e.subject)u["subject"]=e.subject;if(e.body)u["body"]=e.body;var h=[];for(var d in u){if(u[d]!==U[d]){h.push(d.replace(Z,decodeUnreserved).replace(Z,toUpperCase).replace(X,pctEncChar)+"="+u[d].replace(Z,decodeUnreserved).replace(Z,toUpperCase).replace(Q,pctEncChar))}}if(h.length){r.query=h.join("&")}return r}};var te=/^([^\:]+)\:(.*)/;var re={scheme:"urn",parse:function parse$$1(e,t){var r=e.path&&e.path.match(te);var s=e;if(r){var n=t.scheme||s.scheme||"urn";var i=r[1].toLowerCase();var o=r[2];var a=n+":"+(t.nid||i);var c=C[a];s.nid=i;s.nss=o;s.path=undefined;if(c){s=c.parse(s,t)}}else{s.error=s.error||"URN can not be parsed."}return s},serialize:function serialize$$1(e,t){var r=t.scheme||e.scheme||"urn";var s=e.nid;var n=r+":"+(t.nid||s);var i=C[n];if(i){e=i.serialize(e,t)}var o=e;var a=e.nss;o.path=(s||t.nid)+":"+a;return o}};var se=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;var ne={scheme:"urn:uuid",parse:function parse(e,t){var r=e;r.uuid=r.nss;r.nss=undefined;if(!t.tolerant&&(!r.uuid||!r.uuid.match(se))){r.error=r.error||"UUID is not valid."}return r},serialize:function serialize(e,t){var r=e;r.nss=(e.uuid||"").toLowerCase();return r}};C[j.scheme]=j;C[F.scheme]=F;C[ee.scheme]=ee;C[re.scheme]=re;C[ne.scheme]=ne;e.SCHEMES=C;e.pctEncChar=pctEncChar;e.pctDecChars=pctDecChars;e.parse=parse;e.removeDotSegments=removeDotSegments;e.serialize=serialize;e.resolveComponents=resolveComponents;e.resolve=resolve;e.normalize=normalize;e.equal=equal;e.escapeComponent=escapeComponent;e.unescapeComponent=unescapeComponent;Object.defineProperty(e,"__esModule",{value:true})}))},2338:(e,t,r)=>{"use strict";var s=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var n=r(3113);var i=["node_modules","favicon.ico"];var o=e.exports=function(e){var t=[];var r=[];if(e===null){r.push("name cannot be null");return done(t,r)}if(e===undefined){r.push("name cannot be undefined");return done(t,r)}if(typeof e!=="string"){r.push("name must be a string");return done(t,r)}if(!e.length){r.push("name length must be greater than zero")}if(e.match(/^\./)){r.push("name cannot start with a period")}if(e.match(/^_/)){r.push("name cannot start with an underscore")}if(e.trim()!==e){r.push("name cannot contain leading or trailing spaces")}i.forEach((function(t){if(e.toLowerCase()===t){r.push(t+" is a blacklisted name")}}));n.forEach((function(r){if(e.toLowerCase()===r){t.push(r+" is a core module name")}}));if(e.length>214){t.push("name can no longer contain more than 214 characters")}if(e.toLowerCase()!==e){t.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(e.split("/").slice(-1)[0])){t.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(e)!==e){var o=e.match(s);if(o){var a=o[1];var c=o[2];if(encodeURIComponent(a)===a&&encodeURIComponent(c)===c){return done(t,r)}}r.push("name can only contain URL-friendly characters")}return done(t,r)};o.scopedPackagePattern=s;var done=function(e,t){var r={validForNewPackages:t.length===0&&e.length===0,validForOldPackages:t.length===0,warnings:e,errors:t};if(!r.warnings.length)delete r.warnings;if(!r.errors.length)delete r.errors;return r}},7200:(e,t,r)=>{const s=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const n=r(1017);const i=s?";":":";const o=r(7745);const getNotFoundError=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"});const getPathInfo=(e,t)=>{const r=t.colon||i;const n=e.match(/\//)||s&&e.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)];const o=s?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=s?o.split(r):[""];if(s){if(e.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:n,pathExt:a,pathExtExe:o}};const which=(e,t,r)=>{if(typeof t==="function"){r=t;t={}}if(!t)t={};const{pathEnv:s,pathExt:i,pathExtExe:a}=getPathInfo(e,t);const c=[];const step=r=>new Promise(((i,o)=>{if(r===s.length)return t.all&&c.length?i(c):o(getNotFoundError(e));const a=s[r];const l=/^".*"$/.test(a)?a.slice(1,-1):a;const u=n.join(l,e);const h=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;i(subStep(h,r,0))}));const subStep=(e,r,s)=>new Promise(((n,l)=>{if(s===i.length)return n(step(r+1));const u=i[s];o(e+u,{pathExt:a},((i,o)=>{if(!i&&o){if(t.all)c.push(e+u);else return n(e+u)}return n(subStep(e,r,s+1))}))}));return r?step(0).then((e=>r(null,e)),r):step(0)};const whichSync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:s,pathExtExe:i}=getPathInfo(e,t);const a=[];for(let c=0;c<r.length;c++){const l=r[c];const u=/^".*"$/.test(l)?l.slice(1,-1):l;const h=n.join(u,e);const d=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;for(let e=0;e<s.length;e++){const r=d+s[e];try{const e=o.sync(r,{pathExt:i});if(e){if(t.all)a.push(r);else return r}}catch(e){}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw getNotFoundError(e)};e.exports=which;which.sync=whichSync},3270:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r<t.length;r++){t[r]=arguments[r]}var s=e.apply(this,t);var n=t[t.length-1];if(typeof s==="function"&&s!==n){Object.keys(n).forEach((function(e){s[e]=n[e]}))}return s}}},9414:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},3401:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,s=arguments.length;r<s;r++){t.push(arguments[r])}}return t}Yallist.prototype.removeNode=function(e){if(e.list!==this){throw new Error("removing node which does not belong to this list")}var t=e.next;var r=e.prev;if(t){t.prev=r}if(r){r.next=t}if(e===this.head){this.head=t}if(e===this.tail){this.tail=r}e.list.length--;e.next=null;e.prev=null;e.list=null;return t};Yallist.prototype.unshiftNode=function(e){if(e===this.head){return}if(e.list){e.list.removeNode(e)}var t=this.head;e.list=this;e.next=t;if(t){t.prev=e}this.head=e;if(!this.tail){this.tail=e}this.length++};Yallist.prototype.pushNode=function(e){if(e===this.tail){return}if(e.list){e.list.removeNode(e)}var t=this.tail;e.list=this;e.prev=t;if(t){t.next=e}this.tail=e;if(!this.head){this.head=e}this.length++};Yallist.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++){push(this,arguments[e])}return this.length};Yallist.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++){unshift(this,arguments[e])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var e=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return e};Yallist.prototype.shift=function(){if(!this.head){return undefined}var e=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return e};Yallist.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,s=0;r!==null;s++){e.call(t,r.value,s,this);r=r.next}};Yallist.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,s=this.length-1;r!==null;s--){e.call(t,r.value,s,this);r=r.prev}};Yallist.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}};Yallist.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}};Yallist.prototype.map=function(e,t){t=t||this;var r=new Yallist;for(var s=this.head;s!==null;){r.push(e.call(t,s.value,this));s=s.next}return r};Yallist.prototype.mapReverse=function(e,t){t=t||this;var r=new Yallist;for(var s=this.tail;s!==null;){r.push(e.call(t,s.value,this));s=s.prev}return r};Yallist.prototype.reduce=function(e,t){var r;var s=this.head;if(arguments.length>1){r=t}else if(this.head){s=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=0;s!==null;n++){r=e(r,s.value,n);s=s.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var s=this.tail;if(arguments.length>1){r=t}else if(this.tail){s=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=this.length-1;s!==null;n--){r=e(r,s.value,n);s=s.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(t<e||t<0){return r}if(e<0){e=0}if(t>this.length){t=this.length}for(var s=0,n=this.head;n!==null&&s<e;s++){n=n.next}for(;n!==null&&s<t;s++,n=n.next){r.push(n.value)}return r};Yallist.prototype.sliceReverse=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(t<e||t<0){return r}if(e<0){e=0}if(t>this.length){t=this.length}for(var s=this.length,n=this.tail;n!==null&&s>t;s--){n=n.prev}for(;n!==null&&s>e;s--,n=n.prev){r.push(n.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var s=0,n=this.head;n!==null&&s<e;s++){n=n.next}var i=[];for(var s=0;n&&s<t;s++){i.push(n.value);n=this.removeNode(n)}if(n===null){n=this.tail}if(n!==this.head&&n!==this.tail){n=n.prev}for(var s=0;s<r.length;s++){n=insert(this,n,r[s])}return i};Yallist.prototype.reverse=function(){var e=this.head;var t=this.tail;for(var r=e;r!==null;r=r.prev){var s=r.prev;r.prev=r.next;r.next=s}this.head=t;this.tail=e;return this};function insert(e,t,r){var s=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);if(s.next===null){e.tail=s}if(s.prev===null){e.head=s}e.length++;return s}function push(e,t){e.tail=new Node(t,e.tail,null,e);if(!e.head){e.head=e.tail}e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e);if(!e.tail){e.tail=e.head}e.length++}function Node(e,t,r,s){if(!(this instanceof Node)){return new Node(e,t,r,s)}this.list=s;this.value=e;if(t){t.next=this;this.prev=t}else{this.prev=null}if(r){r.prev=this;this.next=r}else{this.next=null}}try{r(9414)(Yallist)}catch(e){}},3250:(e,t,r)=>{"use strict";r.r(t);var s=r(9306);var n=r(4101);var i=r.n(n);var o=r(7136);var a=r.n(o);var c=r(1017);var l=r.n(c);var u=r(9966);var h=r.n(u);var d=r(5656);var p=r.n(d);var m=r(9239);var y=r.n(m);var g=r(7147);var v=r.n(g);var b=r(9312);var w=r.n(b);var E=r(5255);var S=r(2781);var x=r(3837);var R=r(2037);var P=r.n(R);const O=(0,x.promisify)(S.Stream.pipeline);async function isUrlOk(e){const t=await w().head(e).catch((e=>e));return t.statusCode===200}async function getRepoInfo(e,t){const[,r,s,n,i,...o]=e.pathname.split("/");const a=t?t.replace(/^\//,""):o.join("/");if(n===undefined||n===""&&i===undefined){const e=await w()(`https://api.github.com/repos/${r}/${s}`).catch((e=>e));if(e.statusCode!==200){return}const t=JSON.parse(e.body);return{username:r,name:s,branch:t["default_branch"],filePath:a}}const c=t?`${i}/${o.join("/")}`.replace(new RegExp(`/${a}|/$`),""):i;if(r&&s&&c&&n==="tree"){return{username:r,name:s,branch:c,filePath:a}}}function hasRepo({username:e,name:t,branch:r,filePath:s}){const n=`https://api.github.com/repos/${e}/${t}/contents`;const i=`${s?`/${s}`:""}/package.json`;return isUrlOk(n+i+`?ref=${r}`)}function existsInRepo(e){try{const t=new URL(e);return isUrlOk(t.href)}catch{return isUrlOk(`https://api.github.com/repos/vercel/next.js/contents/examples/${encodeURIComponent(e)}`)}}async function downloadTar(e){const t=(0,c.join)((0,R.tmpdir)(),`next.js-cna-example.temp-${Date.now()}`);await O(w().stream(e),(0,g.createWriteStream)(t));return t}async function downloadAndExtractRepo(e,{username:t,name:r,branch:s,filePath:n}){const i=await downloadTar(`https://codeload.github.com/${t}/${r}/tar.gz/${s}`);await E.x({file:i,cwd:e,strip:n?n.split("/").length+1:1,filter:e=>e.startsWith(`${r}-${s.replace(/\//g,"-")}${n?`/${n}/`:"/"}`)});await g.promises.unlink(i)}async function downloadAndExtractExample(e,t){if(t==="__internal-testing-retry"){throw new Error("This is an internal example for testing the CLI.")}const r=await downloadTar("https://codeload.github.com/vercel/next.js/tar.gz/canary");await E.x({file:r,cwd:e,strip:2+t.split("/").length,filter:e=>e.includes(`next.js-canary/examples/${t}/`)});await g.promises.unlink(r)}function makeDir(e,t={recursive:true}){return v().promises.mkdir(e,t)}var $=r(2081);function isInGitRepository(){try{(0,$.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(e){}return false}function isInMercurialRepository(){try{(0,$.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(e){}return false}function isDefaultBranchSet(){try{(0,$.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(e){}return false}function tryGitInit(e){let t=false;try{(0,$.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,$.execSync)("git init",{stdio:"ignore"});t=true;if(!isDefaultBranchSet()){(0,$.execSync)("git checkout -b main",{stdio:"ignore"})}(0,$.execSync)("git add -A",{stdio:"ignore"});(0,$.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(r){if(t){try{v().rmSync(l().join(e,".git"),{recursive:true,force:true})}catch(e){}}return false}}var T=r(4488);var A=r.n(T);function install(e,t,{packageManager:r,isOnline:n,devDependencies:i}){const o=[];const a=[];return new Promise(((c,l)=>{let u;let h=r;const d=r==="yarn";if(t&&t.length){if(d){u=["add","--exact"];if(!n)u.push("--offline");u.push("--cwd",e);if(i)u.push("--dev");u.push(...t)}else{u=["install","--save-exact"];u.push(i?"--save-dev":"--save");u.push(...t)}}else{u=["install"];if(!n){console.log((0,s.yellow)("You appear to be offline."));if(d){console.log((0,s.yellow)("Falling back to the local Yarn cache."));console.log();u.push("--offline")}else{console.log()}}}if(d){u.push(...a)}else{u.push(...o)}const p=A()(h,u,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});p.on("close",(e=>{if(e!==0){l({command:`${h} ${u.join(" ")}`});return}c()}))}))}function isFolderEmpty(e,t){const r=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const n=v().readdirSync(e).filter((e=>!r.includes(e))).filter((e=>!/\.iml$/.test(e)));if(n.length>0){console.log(`The directory ${(0,s.green)(t)} contains files that could conflict:`);console.log();for(const t of n){try{const r=v().lstatSync(l().join(e,t));if(r.isDirectory()){console.log(` ${(0,s.blue)(t)}/`)}else{console.log(` ${t}`)}}catch{console.log(` ${t}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}var C=r(9523);var k=r.n(C);var I=r(7310);var N=r.n(I);function getProxy(){if(process.env.https_proxy){return process.env.https_proxy}try{const e=(0,$.execSync)("npm config get https-proxy").toString().trim();return e!=="null"?e:undefined}catch(e){return}}function getOnline(){return new Promise((e=>{k().lookup("registry.yarnpkg.com",(t=>{if(!t){return e(true)}const r=getProxy();if(!r){return e(false)}const{hostname:s}=N().parse(r);if(!s){return e(false)}k().lookup(s,(t=>{e(t==null)}))}))}))}async function isWriteable(e){try{await v().promises.access(e,(v().constants||v()).W_OK);return true}catch(e){return false}}var D=r(8695);const identity=e=>e;const copy=async(e,t,{cwd:r,rename:s=identity,parents:n=true}={})=>{const i=typeof e==="string"?[e]:e;if(i.length===0||!t){throw new TypeError("`src` and `dest` are required")}const o=await(0,D.async)(i,{cwd:r,dot:true,absolute:false,stats:false});const a=r?l().resolve(r,t):t;return Promise.all(o.map((async e=>{const t=l().dirname(e);const i=s(l().basename(e));const o=r?l().resolve(r,e):e;const c=n?l().join(a,t,i):l().join(a,i);await v().promises.mkdir(l().dirname(c),{recursive:true});return v().promises.copyFile(o,c)})))};var L=r(8383);const getTemplateFile=({template:e,mode:t,file:s})=>r.ab+"templates/"+e+"/"+t+"/"+s;const M=["app","pages","styles"];const installTemplate=async({appName:e,root:t,packageManager:n,isOnline:i,template:o,mode:a,tailwind:c,eslint:u,srcDir:h,importAlias:d})=>{console.log((0,s.bold)(`Using ${n}.`));console.log("\nInitializing project with template:",o,"\n");const p=r.ab+"templates/"+o+"/"+a;const m=["**"];if(!u)m.push("!eslintrc.json");if(!c)m.push("!tailwind.config.js","!postcss.config.js");await copy(m,t,{parents:true,cwd:p,rename(e){switch(e){case"gitignore":case"eslintrc.json":{return`.${e}`}case"README-template.md":{return"README.md"}default:{return e}}}});const y=l().join(t,a==="js"?"jsconfig.json":"tsconfig.json");await v().promises.writeFile(y,(await v().promises.readFile(y,"utf8")).replace(`"@/*": ["./*"]`,h?`"@/*": ["./src/*"]`:`"@/*": ["./*"]`).replace(`"@/*":`,`"${d}":`));if(d!=="@/*"){const e=await(0,D.async)("**/*",{cwd:t,dot:true,stats:false});const r=new L.Sema(8,{capacity:e.length});await Promise.all(e.map((async e=>{if(e==="tsconfig.json"||e==="jsconfig.json")return;await r.acquire();const s=l().join(t,e);if((await v().promises.stat(s)).isFile()){await v().promises.writeFile(s,(await v().promises.readFile(s,"utf8")).replace(`@/`,`${d.replace(/\*/g,"")}`))}await r.release()})))}if(h){await makeDir(l().join(t,"src"));await Promise.all(M.map((async e=>{await v().promises.rename(l().join(t,e),l().join(t,"src",e)).catch((e=>{if(e.code!=="ENOENT"){throw e}}))})));const e=o.startsWith("app");const r=l().join("src",e?"app":"pages",`${e?"page":"index"}.${a==="ts"?"tsx":"js"}`);await v().promises.writeFile(r,(await v().promises.readFile(r,"utf8")).replace(e?"app/page":"pages/index",e?"src/app/page":"src/pages/index"));if(c){const e=l().join(t,"tailwind.config.js");await v().promises.writeFile(e,(await v().promises.readFile(e,"utf8")).replace(/\.\/(\w+)\/\*\*\/\*\.\{js,ts,jsx,tsx,mdx\}/g,"./src/$1/**/*.{js,ts,jsx,tsx,mdx}"))}}const g={name:e,version:"0.1.0",private:true,scripts:{dev:"next dev",build:"next build",start:"next start",lint:"next lint"}};await v().promises.writeFile(l().join(t,"package.json"),JSON.stringify(g,null,2)+P().EOL);const b={packageManager:n,isOnline:i};const w=["react","react-dom",`next${process.env.NEXT_PRIVATE_TEST_VERSION?`@${process.env.NEXT_PRIVATE_TEST_VERSION}`:""}`];if(a==="ts"){w.push("typescript","@types/react","@types/node","@types/react-dom")}if(c){w.push("tailwindcss","postcss","autoprefixer")}if(u){w.push("eslint","eslint-config-next")}if(w.length){console.log();console.log("Installing dependencies:");for(const e of w){console.log(`- ${(0,s.cyan)(e)}`)}console.log();await install(t,w,b)}};class DownloadError extends Error{}async function createApp({appPath:e,packageManager:t,example:r,examplePath:n,typescript:i,tailwind:o,eslint:a,appRouter:c,srcDir:u,importAlias:h}){let d;const p=i?"ts":"js";const m=c?o?"app-tw":"app":o?"default-tw":"default";if(r){let e;try{e=new URL(r)}catch(e){if(e.code!=="ERR_INVALID_URL"){console.error(e);process.exit(1)}}if(e){if(e.origin!=="https://github.com"){console.error(`Invalid URL: ${(0,s.red)(`"${r}"`)}. Only GitHub repositories are supported. Please use a GitHub URL and try again.`);process.exit(1)}d=await getRepoInfo(e,n);if(!d){console.error(`Found invalid GitHub URL: ${(0,s.red)(`"${r}"`)}. Please fix the URL and try again.`);process.exit(1)}const t=await hasRepo(d);if(!t){console.error(`Could not locate the repository for ${(0,s.red)(`"${r}"`)}. Please check that the repository exists and try again.`);process.exit(1)}}else if(r!=="__internal-testing-retry"){const e=await existsInRepo(r);if(!e){console.error(`Could not locate an example named ${(0,s.red)(`"${r}"`)}. It could be due to the following:\n`,`1. Your spelling of example ${(0,s.red)(`"${r}"`)} might be incorrect.\n`,`2. You might not be connected to the internet or you are behind a proxy.`);process.exit(1)}}}const g=l().resolve(e);if(!await isWriteable(l().dirname(g))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const b=l().basename(g);await makeDir(g);if(!isFolderEmpty(g,b)){process.exit(1)}const w=t==="yarn";const E=!w||await getOnline();const S=process.cwd();console.log(`Creating a new Next.js app in ${(0,s.green)(g)}.`);console.log();process.chdir(g);const x=l().join(g,"package.json");let R=false;if(r){try{if(d){const e=d;console.log(`Downloading files from repo ${(0,s.cyan)(r)}. This might take a moment.`);console.log();await y()((()=>downloadAndExtractRepo(g,e)),{retries:3})}else{console.log(`Downloading files for example ${(0,s.cyan)(r)}. This might take a moment.`);console.log();await y()((()=>downloadAndExtractExample(g,r)),{retries:3})}}catch(e){function isErrorLike(e){return typeof e==="object"&&e!==null&&typeof e.message==="string"}throw new DownloadError(isErrorLike(e)?e.message:e+"")}const e=l().join(g,".gitignore");if(!v().existsSync(e)){v().copyFileSync(getTemplateFile({template:m,mode:p,file:"gitignore"}),e)}const n=l().join(g,"tsconfig.json");if(v().existsSync(n)){v().copyFileSync(getTemplateFile({template:m,mode:"ts",file:"next-env.d.ts"}),l().join(g,"next-env.d.ts"))}R=v().existsSync(x);if(R){console.log("Installing packages. This might take a couple of minutes.");console.log();await install(g,null,{packageManager:t,isOnline:E});console.log()}}else{await installTemplate({appName:b,root:g,template:m,mode:p,packageManager:t,isOnline:E,tailwind:o,eslint:a,srcDir:u,importAlias:h})}if(tryGitInit(g)){console.log("Initialized a git repository.");console.log()}let P;if(l().join(S,b)===e){P=b}else{P=e}console.log(`${(0,s.green)("Success!")} Created ${b} at ${e}`);if(R){console.log("Inside that directory, you can run several commands:");console.log();console.log((0,s.cyan)(` ${t} ${w?"":"run "}dev`));console.log(" Starts the development server.");console.log();console.log((0,s.cyan)(` ${t} ${w?"":"run "}build`));console.log(" Builds the app for production.");console.log();console.log((0,s.cyan)(` ${t} start`));console.log(" Runs the built app in production mode.");console.log();console.log("We suggest that you begin by typing:");console.log();console.log((0,s.cyan)(" cd"),P);console.log(` ${(0,s.cyan)(`${t} ${w?"":"run "}dev`)}`)}console.log()}function getPkgManager(){const e=process.env.npm_config_user_agent||"";if(e.startsWith("yarn")){return"yarn"}if(e.startsWith("pnpm")){return"pnpm"}return"npm"}var j=r(2338);var F=r.n(j);function validateNpmName(e){const t=F()(e);if(t.validForNewPackages){return{valid:true}}return{valid:false,problems:[...t.errors||[],...t.warnings||[]]}}const U=JSON.parse('{"name":"create-next-app","version":"13.4.13-canary.9","keywords":["react","next","next.js"],"description":"Create Next.js-powered React apps with one command","repository":{"type":"git","url":"https://github.com/vercel/next.js","directory":"packages/create-next-app"},"author":"Next.js Team <support@vercel.com>","license":"MIT","bin":{"create-next-app":"./dist/index.js"},"files":["dist"],"scripts":{"dev":"ncc build ./index.ts -w -o dist/","prerelease":"node ../../scripts/rm.mjs dist","release":"ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register","prepublishOnly":"cd ../../ && turbo run build","build":"pnpm release","lint-fix":"pnpm prettier -w --plugin prettier-plugin-tailwindcss \'templates/*-tw/{ts,js}/{app,pages}/**/*.{js,ts,tsx}\'"},"devDependencies":{"@types/async-retry":"1.4.2","@types/ci-info":"2.0.0","@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.0.1","@types/tar":"6.1.5","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","async-retry":"1.3.1","ci-info":"watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540","commander":"2.20.0","conf":"10.2.0","cross-spawn":"7.0.3","fast-glob":"3.3.1","got":"10.7.0","picocolors":"1.0.0","prettier-plugin-tailwindcss":"0.3.0","prompts":"2.1.0","tar":"6.1.15","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=16.8.0"}}');var B=r(7741);var H=r.n(B);let z="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=e=>{if(e.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const G=new(i().Command)(U.name).version(U.version).arguments("<project-directory>").usage(`${(0,s.green)("<project-directory>")} [options]`).action((e=>{z=e})).option("--ts, --typescript",`\n\n Initialize as a TypeScript project. (default)\n`).option("--js, --javascript",`\n\n Initialize as a JavaScript project.\n`).option("--tailwind",`\n\n Initialize with Tailwind CSS config. (default)\n`).option("--eslint",`\n\n Initialize with eslint config.\n`).option("--app",`\n\n Initialize as an App Router project.\n`).option("--src-dir",`\n\n Initialize inside a \`src/\` directory.\n`).option("--import-alias <alias-to-configure>",`\n\n Specify import alias to use (default "@/*").\n`).option("--use-npm",`\n\n Explicitly tell the CLI to bootstrap the application using npm\n`).option("--use-pnpm",`\n\n Explicitly tell the CLI to bootstrap the application using pnpm\n`).option("--use-yarn",`\n\n Explicitly tell the CLI to bootstrap the application using Yarn\n`).option("-e, --example [name]|[github-url]",`\n\n An example to bootstrap the app with. You can use an example name\n from the official Next.js repo or a GitHub URL. The URL can use\n any branch and/or subdirectory\n`).option("--example-path <path-to-example>",`\n\n In a rare case, your GitHub URL might contain a branch name with\n a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar).\n In this case, you must specify the path to the example separately:\n --example-path foo/bar\n`).option("--reset-preferences",`\n\n Explicitly tell the CLI to reset any stored preferences\n`).allowUnknownOption().parse(process.argv);const V=!!G.useNpm?"npm":!!G.usePnpm?"pnpm":!!G.useYarn?"yarn":getPkgManager();async function run(){const e=new(a())({projectName:"create-next-app"});if(G.resetPreferences){e.clear();console.log(`Preferences reset successfully`);return}if(typeof z==="string"){z=z.trim()}if(!z){const e=await h()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:e=>{const t=validateNpmName(l().basename(l().resolve(e)));if(t.valid){return true}return"Invalid project name: "+t.problems[0]}});if(typeof e.path==="string"){z=e.path.trim()}}if(!z){console.log("\nPlease specify the project directory:\n"+` ${(0,s.cyan)(G.name())} ${(0,s.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,s.cyan)(G.name())} ${(0,s.green)("my-next-app")}\n\n`+`Run ${(0,s.cyan)(`${G.name()} --help`)} to see all options.`);process.exit(1)}const t=l().resolve(z);const r=l().basename(t);const{valid:n,problems:i}=validateNpmName(r);if(!n){console.error(`Could not create a project called ${(0,s.red)(`"${r}"`)} because of npm naming restrictions:`);i.forEach((e=>console.error(` ${(0,s.red)((0,s.bold)("*"))} ${e}`)));process.exit(1)}if(G.example===true){console.error("Please provide an example name or url, otherwise remove the example option.");process.exit(1)}const o=l().resolve(t);const c=l().basename(o);const u=v().existsSync(o);if(u&&!isFolderEmpty(o,c)){process.exit(1)}const d=typeof G.example==="string"&&G.example.trim();const p=e.get("preferences")||{};if(!d){const e={typescript:true,eslint:true,tailwind:true,srcDir:false,importAlias:"@/*",customizeImportAlias:false};const getPrefOrDefault=t=>{var r;return(r=p[t])!==null&&r!==void 0?r:e[t]};if(!G.typescript&&!G.javascript){if(H().isCI){G.typescript=false;G.javascript=true}else{const e=(0,s.blue)("TypeScript");const{typescript:t}=await h()({type:"toggle",name:"typescript",message:`Would you like to use ${e}?`,initial:getPrefOrDefault("typescript"),active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});G.typescript=Boolean(t);G.javascript=!Boolean(t);p.typescript=Boolean(t)}}if(!process.argv.includes("--eslint")&&!process.argv.includes("--no-eslint")){if(H().isCI){G.eslint=true}else{const e=(0,s.blue)("ESLint");const{eslint:t}=await h()({onState:onPromptState,type:"toggle",name:"eslint",message:`Would you like to use ${e}?`,initial:getPrefOrDefault("eslint"),active:"Yes",inactive:"No"});G.eslint=Boolean(t);p.eslint=Boolean(t)}}if(!process.argv.includes("--tailwind")&&!process.argv.includes("--no-tailwind")){if(H().isCI){G.tailwind=false}else{const e=(0,s.blue)("Tailwind CSS");const{tailwind:t}=await h()({onState:onPromptState,type:"toggle",name:"tailwind",message:`Would you like to use ${e}?`,initial:getPrefOrDefault("tailwind"),active:"Yes",inactive:"No"});G.tailwind=Boolean(t);p.tailwind=Boolean(t)}}if(!process.argv.includes("--src-dir")&&!process.argv.includes("--no-src-dir")){if(H().isCI){G.srcDir=false}else{const e=(0,s.blue)("`src/` directory");const{srcDir:t}=await h()({onState:onPromptState,type:"toggle",name:"srcDir",message:`Would you like to use ${e}?`,initial:getPrefOrDefault("srcDir"),active:"Yes",inactive:"No"});G.srcDir=Boolean(t);p.srcDir=Boolean(t)}}if(!process.argv.includes("--app")&&!process.argv.includes("--no-app")){if(H().isCI){G.app=true}else{const e=(0,s.blue)("App Router");const{appRouter:t}=await h()({onState:onPromptState,type:"toggle",name:"appRouter",message:`Would you like to use ${e}? (recommended)`,initial:true,active:"Yes",inactive:"No"});G.app=Boolean(t)}}if(typeof G.importAlias!=="string"||!G.importAlias.length){if(H().isCI){G.importAlias="@/*"}else{const e=(0,s.blue)("import alias");const{customizeImportAlias:t}=await h()({onState:onPromptState,type:"toggle",name:"customizeImportAlias",message:`Would you like to customize the default ${e}?`,initial:getPrefOrDefault("customizeImportAlias"),active:"Yes",inactive:"No"});if(!t){G.importAlias="@/*"}else{const{importAlias:t}=await h()({onState:onPromptState,type:"text",name:"importAlias",message:`What ${e} would you like configured?`,initial:getPrefOrDefault("importAlias"),validate:e=>/.+\/\*/.test(e)?true:"Import alias must follow the pattern <prefix>/*"});G.importAlias=t;p.importAlias=t}}}}try{await createApp({appPath:t,packageManager:V,example:d&&d!=="default"?d:undefined,examplePath:G.examplePath,typescript:G.typescript,tailwind:G.tailwind,eslint:G.eslint,appRouter:G.app,srcDir:G.srcDir,importAlias:G.importAlias})}catch(e){if(!(e instanceof DownloadError)){throw e}const r=await h()({onState:onPromptState,type:"confirm",name:"builtin",message:`Could not download "${d}" because of a connectivity issue between your machine and GitHub.\n`+`Do you want to use the default template instead?`,initial:true});if(!r.builtin){throw e}await createApp({appPath:t,packageManager:V,typescript:G.typescript,eslint:G.eslint,tailwind:G.tailwind,appRouter:G.app,srcDir:G.srcDir,importAlias:G.importAlias})}e.set("preferences",p)}const q=p()(U).catch((()=>null));async function notifyUpdate(){try{const e=await q;if(e===null||e===void 0?void 0:e.latest){const e=V==="yarn"?"yarn global add create-next-app":V==="pnpm"?"pnpm add -g create-next-app":"npm i -g create-next-app";console.log((0,s.yellow)((0,s.bold)("A new version of `create-next-app` is available!"))+"\n"+"You can update by running: "+(0,s.cyan)(e)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async e=>{console.log();console.log("Aborting installation.");if(e.command){console.log(` ${(0,s.cyan)(e.command)} has failed.`)}else{console.log((0,s.red)("Unexpected error. Please report it as a bug:")+"\n",e)}console.log();await notifyUpdate();process.exit(1)}))},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},7282:e=>{"use strict";e.exports=require("process")},4521:e=>{"use strict";e.exports=require("readline")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},7918:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},9520:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},3113:e=>{"use strict";e.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')},6107:e=>{"use strict";e.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitHub Actions","constant":"GITHUB_ACTIONS","env":"GITHUB_ACTIONS","pr":{"GITHUB_EVENT_NAME":"pull_request"}},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"ZEIT Now","constant":"ZEIT_NOW","env":"NOW_BUILDER"},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Nevercode","constant":"NEVERCODE","env":"NEVERCODE","pr":{"env":"NEVERCODE_PULL_REQUEST","ne":"false"}},{"name":"Render","constant":"RENDER","env":"RENDER","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={id:r,loaded:false,exports:{}};var i=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}n.loaded=true;return n.exports}(()=>{__nccwpck_require__.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;__nccwpck_require__.d(t,{a:t});return t}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(3250);module.exports=r})();
74
+ (function(e,r){true?r(t):0})(this,(function(e){"use strict";function merge(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++){t[r]=arguments[r]}if(t.length>1){t[0]=t[0].slice(0,-1);var s=t.length-1;for(var n=1;n<s;++n){t[n]=t[n].slice(1,-1)}t[s]=t[s].slice(1);return t.join("")}else{return t[0]}}function subexp(e){return"(?:"+e+")"}function typeOf(e){return e===undefined?"undefined":e===null?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(e){return e.toUpperCase()}function toArray(e){return e!==undefined&&e!==null?e instanceof Array?e:typeof e.length!=="number"||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function assign(e,t){var r=e;if(t){for(var s in t){r[s]=t[s]}}return r}function buildExps(e){var t="[A-Za-z]",r="[\\x0D]",s="[0-9]",n="[\\x22]",i=merge(s,"[A-Fa-f]"),o="[\\x0A]",a="[\\x20]",c=subexp(subexp("%[EFef]"+i+"%"+i+i+"%"+i+i)+"|"+subexp("%[89A-Fa-f]"+i+"%"+i+i)+"|"+subexp("%"+i+i)),l="[\\:\\/\\?\\#\\[\\]\\@]",u="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",h=merge(l,u),d=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",p=e?"[\\uE000-\\uF8FF]":"[]",m=merge(t,s,"[\\-\\.\\_\\~]",d),y=subexp(t+merge(t,s,"[\\+\\-\\.]")+"*"),g=subexp(subexp(c+"|"+merge(m,u,"[\\:]"))+"*"),v=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+s)+"|"+subexp("1"+s+s)+"|"+subexp("[1-9]"+s)+"|"+s),b=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+s)+"|"+subexp("1"+s+s)+"|"+subexp("0?[1-9]"+s)+"|0?0?"+s),w=subexp(b+"\\."+b+"\\."+b+"\\."+b),E=subexp(i+"{1,4}"),S=subexp(subexp(E+"\\:"+E)+"|"+w),x=subexp(subexp(E+"\\:")+"{6}"+S),R=subexp("\\:\\:"+subexp(E+"\\:")+"{5}"+S),P=subexp(subexp(E)+"?\\:\\:"+subexp(E+"\\:")+"{4}"+S),O=subexp(subexp(subexp(E+"\\:")+"{0,1}"+E)+"?\\:\\:"+subexp(E+"\\:")+"{3}"+S),$=subexp(subexp(subexp(E+"\\:")+"{0,2}"+E)+"?\\:\\:"+subexp(E+"\\:")+"{2}"+S),T=subexp(subexp(subexp(E+"\\:")+"{0,3}"+E)+"?\\:\\:"+E+"\\:"+S),A=subexp(subexp(subexp(E+"\\:")+"{0,4}"+E)+"?\\:\\:"+S),C=subexp(subexp(subexp(E+"\\:")+"{0,5}"+E)+"?\\:\\:"+E),k=subexp(subexp(subexp(E+"\\:")+"{0,6}"+E)+"?\\:\\:"),I=subexp([x,R,P,O,$,T,A,C,k].join("|")),N=subexp(subexp(m+"|"+c)+"+"),D=subexp(I+"\\%25"+N),L=subexp(I+subexp("\\%25|\\%(?!"+i+"{2})")+N),M=subexp("[vV]"+i+"+\\."+merge(m,u,"[\\:]")+"+"),j=subexp("\\["+subexp(L+"|"+I+"|"+M)+"\\]"),F=subexp(subexp(c+"|"+merge(m,u))+"*"),U=subexp(j+"|"+w+"(?!"+F+")"+"|"+F),B=subexp(s+"*"),H=subexp(subexp(g+"@")+"?"+U+subexp("\\:"+B)+"?"),z=subexp(c+"|"+merge(m,u,"[\\:\\@]")),G=subexp(z+"*"),V=subexp(z+"+"),q=subexp(subexp(c+"|"+merge(m,u,"[\\@]"))+"+"),W=subexp(subexp("\\/"+G)+"*"),K=subexp("\\/"+subexp(V+W)+"?"),Y=subexp(q+W),Z=subexp(V+W),J="(?!"+z+")",X=subexp(W+"|"+K+"|"+Y+"|"+Z+"|"+J),Q=subexp(subexp(z+"|"+merge("[\\/\\?]",p))+"*"),ee=subexp(subexp(z+"|[\\/\\?]")+"*"),te=subexp(subexp("\\/\\/"+H+W)+"|"+K+"|"+Z+"|"+J),re=subexp(y+"\\:"+te+subexp("\\?"+Q)+"?"+subexp("\\#"+ee)+"?"),se=subexp(subexp("\\/\\/"+H+W)+"|"+K+"|"+Y+"|"+J),ne=subexp(se+subexp("\\?"+Q)+"?"+subexp("\\#"+ee)+"?"),ie=subexp(re+"|"+ne),oe=subexp(y+"\\:"+te+subexp("\\?"+Q)+"?"),ae="^("+y+")\\:"+subexp(subexp("\\/\\/("+subexp("("+g+")@")+"?("+U+")"+subexp("\\:("+B+")")+"?)")+"?("+W+"|"+K+"|"+Z+"|"+J+")")+subexp("\\?("+Q+")")+"?"+subexp("\\#("+ee+")")+"?$",ce="^(){0}"+subexp(subexp("\\/\\/("+subexp("("+g+")@")+"?("+U+")"+subexp("\\:("+B+")")+"?)")+"?("+W+"|"+K+"|"+Y+"|"+J+")")+subexp("\\?("+Q+")")+"?"+subexp("\\#("+ee+")")+"?$",le="^("+y+")\\:"+subexp(subexp("\\/\\/("+subexp("("+g+")@")+"?("+U+")"+subexp("\\:("+B+")")+"?)")+"?("+W+"|"+K+"|"+Z+"|"+J+")")+subexp("\\?("+Q+")")+"?$",ue="^"+subexp("\\#("+ee+")")+"?$",he="^"+subexp("("+g+")@")+"?("+U+")"+subexp("\\:("+B+")")+"?$";return{NOT_SCHEME:new RegExp(merge("[^]",t,s,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",m,u),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",m,u),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",m,u),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",m,u),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",m,u,"[\\:\\@\\/\\?]",p),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",m,u,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",m,u),"g"),UNRESERVED:new RegExp(m,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",m,h),"g"),PCT_ENCODED:new RegExp(c,"g"),IPV4ADDRESS:new RegExp("^("+w+")$"),IPV6ADDRESS:new RegExp("^\\[?("+I+")"+subexp(subexp("\\%25|\\%(?!"+i+"{2})")+"("+N+")")+"?\\]?$")}}var t=buildExps(false);var r=buildExps(true);var s=function(){function sliceIterator(e,t){var r=[];var s=true;var n=false;var i=undefined;try{for(var o=e[Symbol.iterator](),a;!(s=(a=o.next()).done);s=true){r.push(a.value);if(t&&r.length===t)break}}catch(e){n=true;i=e}finally{try{if(!s&&o["return"])o["return"]()}finally{if(n)throw i}}return r}return function(e,t){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return sliceIterator(e,t)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}else{return Array.from(e)}};var n=2147483647;var i=36;var o=1;var a=26;var c=38;var l=700;var u=72;var h=128;var d="-";var p=/^xn--/;var m=/[^\0-\x7E]/;var y=/[\x2E\u3002\uFF0E\uFF61]/g;var g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var v=i-o;var b=Math.floor;var w=String.fromCharCode;function error$1(e){throw new RangeError(g[e])}function map(e,t){var r=[];var s=e.length;while(s--){r[s]=t(e[s])}return r}function mapDomain(e,t){var r=e.split("@");var s="";if(r.length>1){s=r[0]+"@";e=r[1]}e=e.replace(y,".");var n=e.split(".");var i=map(n,t).join(".");return s+i}function ucs2decode(e){var t=[];var r=0;var s=e.length;while(r<s){var n=e.charCodeAt(r++);if(n>=55296&&n<=56319&&r<s){var i=e.charCodeAt(r++);if((i&64512)==56320){t.push(((n&1023)<<10)+(i&1023)+65536)}else{t.push(n);r--}}else{t.push(n)}}return t}var E=function ucs2encode(e){return String.fromCodePoint.apply(String,toConsumableArray(e))};var S=function basicToDigit(e){if(e-48<10){return e-22}if(e-65<26){return e-65}if(e-97<26){return e-97}return i};var x=function digitToBasic(e,t){return e+22+75*(e<26)-((t!=0)<<5)};var R=function adapt(e,t,r){var s=0;e=r?b(e/l):e>>1;e+=b(e/t);for(;e>v*a>>1;s+=i){e=b(e/v)}return b(s+(v+1)*e/(e+c))};var P=function decode(e){var t=[];var r=e.length;var s=0;var c=h;var l=u;var p=e.lastIndexOf(d);if(p<0){p=0}for(var m=0;m<p;++m){if(e.charCodeAt(m)>=128){error$1("not-basic")}t.push(e.charCodeAt(m))}for(var y=p>0?p+1:0;y<r;){var g=s;for(var v=1,w=i;;w+=i){if(y>=r){error$1("invalid-input")}var E=S(e.charCodeAt(y++));if(E>=i||E>b((n-s)/v)){error$1("overflow")}s+=E*v;var x=w<=l?o:w>=l+a?a:w-l;if(E<x){break}var P=i-x;if(v>b(n/P)){error$1("overflow")}v*=P}var O=t.length+1;l=R(s-g,O,g==0);if(b(s/O)>n-c){error$1("overflow")}c+=b(s/O);s%=O;t.splice(s++,0,c)}return String.fromCodePoint.apply(String,t)};var O=function encode(e){var t=[];e=ucs2decode(e);var r=e.length;var s=h;var c=0;var l=u;var p=true;var m=false;var y=undefined;try{for(var g=e[Symbol.iterator](),v;!(p=(v=g.next()).done);p=true){var E=v.value;if(E<128){t.push(w(E))}}}catch(e){m=true;y=e}finally{try{if(!p&&g.return){g.return()}}finally{if(m){throw y}}}var S=t.length;var P=S;if(S){t.push(d)}while(P<r){var O=n;var $=true;var T=false;var A=undefined;try{for(var C=e[Symbol.iterator](),k;!($=(k=C.next()).done);$=true){var I=k.value;if(I>=s&&I<O){O=I}}}catch(e){T=true;A=e}finally{try{if(!$&&C.return){C.return()}}finally{if(T){throw A}}}var N=P+1;if(O-s>b((n-c)/N)){error$1("overflow")}c+=(O-s)*N;s=O;var D=true;var L=false;var M=undefined;try{for(var j=e[Symbol.iterator](),F;!(D=(F=j.next()).done);D=true){var U=F.value;if(U<s&&++c>n){error$1("overflow")}if(U==s){var B=c;for(var H=i;;H+=i){var z=H<=l?o:H>=l+a?a:H-l;if(B<z){break}var G=B-z;var V=i-z;t.push(w(x(z+G%V,0)));B=b(G/V)}t.push(w(x(B,0)));l=R(c,N,P==S);c=0;++P}}}catch(e){L=true;M=e}finally{try{if(!D&&j.return){j.return()}}finally{if(L){throw M}}}++c;++s}return t.join("")};var $=function toUnicode(e){return mapDomain(e,(function(e){return p.test(e)?P(e.slice(4).toLowerCase()):e}))};var T=function toASCII(e){return mapDomain(e,(function(e){return m.test(e)?"xn--"+O(e):e}))};var A={version:"2.1.0",ucs2:{decode:ucs2decode,encode:E},decode:P,encode:O,toASCII:T,toUnicode:$};var C={};function pctEncChar(e){var t=e.charCodeAt(0);var r=void 0;if(t<16)r="%0"+t.toString(16).toUpperCase();else if(t<128)r="%"+t.toString(16).toUpperCase();else if(t<2048)r="%"+(t>>6|192).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();else r="%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();return r}function pctDecChars(e){var t="";var r=0;var s=e.length;while(r<s){var n=parseInt(e.substr(r+1,2),16);if(n<128){t+=String.fromCharCode(n);r+=3}else if(n>=194&&n<224){if(s-r>=6){var i=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((n&31)<<6|i&63)}else{t+=e.substr(r,6)}r+=6}else if(n>=224){if(s-r>=9){var o=parseInt(e.substr(r+4,2),16);var a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((n&15)<<12|(o&63)<<6|a&63)}else{t+=e.substr(r,9)}r+=9}else{t+=e.substr(r,3);r+=3}}return t}function _normalizeComponentEncoding(e,t){function decodeUnreserved(e){var r=pctDecChars(e);return!r.match(t.UNRESERVED)?e:r}if(e.scheme)e.scheme=String(e.scheme).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_USERINFO,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.host!==undefined)e.host=String(e.host).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_HOST,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.path!==undefined)e.path=String(e.path).replace(t.PCT_ENCODED,decodeUnreserved).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.query!==undefined)e.query=String(e.query).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_QUERY,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_FRAGMENT,pctEncChar).replace(t.PCT_ENCODED,toUpperCase);return e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,t){var r=e.match(t.IPV4ADDRESS)||[];var n=s(r,2),i=n[1];if(i){return i.split(".").map(_stripLeadingZeros).join(".")}else{return e}}function _normalizeIPv6(e,t){var r=e.match(t.IPV6ADDRESS)||[];var n=s(r,3),i=n[1],o=n[2];if(i){var a=i.toLowerCase().split("::").reverse(),c=s(a,2),l=c[0],u=c[1];var h=u?u.split(":").map(_stripLeadingZeros):[];var d=l.split(":").map(_stripLeadingZeros);var p=t.IPV4ADDRESS.test(d[d.length-1]);var m=p?7:8;var y=d.length-m;var g=Array(m);for(var v=0;v<m;++v){g[v]=h[v]||d[y+v]||""}if(p){g[m-1]=_normalizeIPv4(g[m-1],t)}var b=g.reduce((function(e,t,r){if(!t||t==="0"){var s=e[e.length-1];if(s&&s.index+s.length===r){s.length++}else{e.push({index:r,length:1})}}return e}),[]);var w=b.sort((function(e,t){return t.length-e.length}))[0];var E=void 0;if(w&&w.length>1){var S=g.slice(0,w.index);var x=g.slice(w.index+w.length);E=S.join(":")+"::"+x.join(":")}else{E=g.join(":")}if(o){E+="%"+o}return E}else{return e}}var k=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var I="".match(/(){0}/)[1]===undefined;function parse(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n={};var i=s.iri!==false?r:t;if(s.reference==="suffix")e=(s.scheme?s.scheme+":":"")+"//"+e;var o=e.match(k);if(o){if(I){n.scheme=o[1];n.userinfo=o[3];n.host=o[4];n.port=parseInt(o[5],10);n.path=o[6]||"";n.query=o[7];n.fragment=o[8];if(isNaN(n.port)){n.port=o[5]}}else{n.scheme=o[1]||undefined;n.userinfo=e.indexOf("@")!==-1?o[3]:undefined;n.host=e.indexOf("//")!==-1?o[4]:undefined;n.port=parseInt(o[5],10);n.path=o[6]||"";n.query=e.indexOf("?")!==-1?o[7]:undefined;n.fragment=e.indexOf("#")!==-1?o[8]:undefined;if(isNaN(n.port)){n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined}}if(n.host){n.host=_normalizeIPv6(_normalizeIPv4(n.host,i),i)}if(n.scheme===undefined&&n.userinfo===undefined&&n.host===undefined&&n.port===undefined&&!n.path&&n.query===undefined){n.reference="same-document"}else if(n.scheme===undefined){n.reference="relative"}else if(n.fragment===undefined){n.reference="absolute"}else{n.reference="uri"}if(s.reference&&s.reference!=="suffix"&&s.reference!==n.reference){n.error=n.error||"URI is not a "+s.reference+" reference."}var a=C[(s.scheme||n.scheme||"").toLowerCase()];if(!s.unicodeSupport&&(!a||!a.unicodeSupport)){if(n.host&&(s.domainHost||a&&a.domainHost)){try{n.host=A.toASCII(n.host.replace(i.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(n,t)}else{_normalizeComponentEncoding(n,i)}if(a&&a.parse){a.parse(n,s)}}else{n.error=n.error||"URI can not be parsed."}return n}function _recomposeAuthority(e,s){var n=s.iri!==false?r:t;var i=[];if(e.userinfo!==undefined){i.push(e.userinfo);i.push("@")}if(e.host!==undefined){i.push(_normalizeIPv6(_normalizeIPv4(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"})))}if(typeof e.port==="number"){i.push(":");i.push(e.port.toString(10))}return i.length?i.join(""):undefined}var N=/^\.\.?\//;var D=/^\/\.(\/|$)/;var L=/^\/\.\.(\/|$)/;var M=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){var t=[];while(e.length){if(e.match(N)){e=e.replace(N,"")}else if(e.match(D)){e=e.replace(D,"/")}else if(e.match(L)){e=e.replace(L,"/");t.pop()}else if(e==="."||e===".."){e=""}else{var r=e.match(M);if(r){var s=r[0];e=e.slice(s.length);t.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return t.join("")}function serialize(e){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=s.iri?r:t;var i=[];var o=C[(s.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize)o.serialize(e,s);if(e.host){if(n.IPV6ADDRESS.test(e.host)){}else if(s.domainHost||o&&o.domainHost){try{e.host=!s.iri?A.toASCII(e.host.replace(n.PCT_ENCODED,pctDecChars).toLowerCase()):A.toUnicode(e.host)}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(!s.iri?"ASCII":"Unicode")+" via punycode: "+t}}}_normalizeComponentEncoding(e,n);if(s.reference!=="suffix"&&e.scheme){i.push(e.scheme);i.push(":")}var a=_recomposeAuthority(e,s);if(a!==undefined){if(s.reference!=="suffix"){i.push("//")}i.push(a);if(e.path&&e.path.charAt(0)!=="/"){i.push("/")}}if(e.path!==undefined){var c=e.path;if(!s.absolutePath&&(!o||!o.absolutePath)){c=removeDotSegments(c)}if(a===undefined){c=c.replace(/^\/\//,"/%2F")}i.push(c)}if(e.query!==undefined){i.push("?");i.push(e.query)}if(e.fragment!==undefined){i.push("#");i.push(e.fragment)}return i.join("")}function resolveComponents(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var s=arguments[3];var n={};if(!s){e=parse(serialize(e,r),r);t=parse(serialize(t,r),r)}r=r||{};if(!r.tolerant&&t.scheme){n.scheme=t.scheme;n.userinfo=t.userinfo;n.host=t.host;n.port=t.port;n.path=removeDotSegments(t.path||"");n.query=t.query}else{if(t.userinfo!==undefined||t.host!==undefined||t.port!==undefined){n.userinfo=t.userinfo;n.host=t.host;n.port=t.port;n.path=removeDotSegments(t.path||"");n.query=t.query}else{if(!t.path){n.path=e.path;if(t.query!==undefined){n.query=t.query}else{n.query=e.query}}else{if(t.path.charAt(0)==="/"){n.path=removeDotSegments(t.path)}else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path){n.path="/"+t.path}else if(!e.path){n.path=t.path}else{n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path}n.path=removeDotSegments(n.path)}n.query=t.query}n.userinfo=e.userinfo;n.host=e.host;n.port=e.port}n.scheme=e.scheme}n.fragment=t.fragment;return n}function resolve(e,t,r){var s=assign({scheme:"null"},r);return serialize(resolveComponents(parse(e,s),parse(t,s),s,true),s)}function normalize(e,t){if(typeof e==="string"){e=serialize(parse(e,t),t)}else if(typeOf(e)==="object"){e=parse(serialize(e,t),t)}return e}function equal(e,t,r){if(typeof e==="string"){e=serialize(parse(e,r),r)}else if(typeOf(e)==="object"){e=serialize(e,r)}if(typeof t==="string"){t=serialize(parse(t,r),r)}else if(typeOf(t)==="object"){t=serialize(t,r)}return e===t}function escapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?t.ESCAPE:r.ESCAPE,pctEncChar)}function unescapeComponent(e,s){return e&&e.toString().replace(!s||!s.iri?t.PCT_ENCODED:r.PCT_ENCODED,pctDecChars)}var j={scheme:"http",domainHost:true,parse:function parse(e,t){if(!e.host){e.error=e.error||"HTTP URIs must have a host."}return e},serialize:function serialize(e,t){if(e.port===(String(e.scheme).toLowerCase()!=="https"?80:443)||e.port===""){e.port=undefined}if(!e.path){e.path="/"}return e}};var F={scheme:"https",domainHost:j.domainHost,parse:j.parse,serialize:j.serialize};var U={};var B=true;var H="[A-Za-z0-9\\-\\.\\_\\~"+(B?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var z="[0-9A-Fa-f]";var G=subexp(subexp("%[EFef]"+z+"%"+z+z+"%"+z+z)+"|"+subexp("%[89A-Fa-f]"+z+"%"+z+z)+"|"+subexp("%"+z+z));var V="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var q="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var W=merge(q,'[\\"\\\\]');var K="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var Y=new RegExp(H,"g");var Z=new RegExp(G,"g");var J=new RegExp(merge("[^]",V,"[\\.]",'[\\"]',W),"g");var X=new RegExp(merge("[^]",H,K),"g");var Q=X;function decodeUnreserved(e){var t=pctDecChars(e);return!t.match(Y)?e:t}var ee={scheme:"mailto",parse:function parse$$1(e,t){var r=e;var s=r.to=r.path?r.path.split(","):[];r.path=undefined;if(r.query){var n=false;var i={};var o=r.query.split("&");for(var a=0,c=o.length;a<c;++a){var l=o[a].split("=");switch(l[0]){case"to":var u=l[1].split(",");for(var h=0,d=u.length;h<d;++h){s.push(u[h])}break;case"subject":r.subject=unescapeComponent(l[1],t);break;case"body":r.body=unescapeComponent(l[1],t);break;default:n=true;i[unescapeComponent(l[0],t)]=unescapeComponent(l[1],t);break}}if(n)r.headers=i}r.query=undefined;for(var p=0,m=s.length;p<m;++p){var y=s[p].split("@");y[0]=unescapeComponent(y[0]);if(!t.unicodeSupport){try{y[1]=A.toASCII(unescapeComponent(y[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}}else{y[1]=unescapeComponent(y[1],t).toLowerCase()}s[p]=y.join("@")}return r},serialize:function serialize$$1(e,t){var r=e;var s=toArray(e.to);if(s){for(var n=0,i=s.length;n<i;++n){var o=String(s[n]);var a=o.lastIndexOf("@");var c=o.slice(0,a).replace(Z,decodeUnreserved).replace(Z,toUpperCase).replace(J,pctEncChar);var l=o.slice(a+1);try{l=!t.iri?A.toASCII(unescapeComponent(l,t).toLowerCase()):A.toUnicode(l)}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(!t.iri?"ASCII":"Unicode")+" via punycode: "+e}s[n]=c+"@"+l}r.path=s.join(",")}var u=e.headers=e.headers||{};if(e.subject)u["subject"]=e.subject;if(e.body)u["body"]=e.body;var h=[];for(var d in u){if(u[d]!==U[d]){h.push(d.replace(Z,decodeUnreserved).replace(Z,toUpperCase).replace(X,pctEncChar)+"="+u[d].replace(Z,decodeUnreserved).replace(Z,toUpperCase).replace(Q,pctEncChar))}}if(h.length){r.query=h.join("&")}return r}};var te=/^([^\:]+)\:(.*)/;var re={scheme:"urn",parse:function parse$$1(e,t){var r=e.path&&e.path.match(te);var s=e;if(r){var n=t.scheme||s.scheme||"urn";var i=r[1].toLowerCase();var o=r[2];var a=n+":"+(t.nid||i);var c=C[a];s.nid=i;s.nss=o;s.path=undefined;if(c){s=c.parse(s,t)}}else{s.error=s.error||"URN can not be parsed."}return s},serialize:function serialize$$1(e,t){var r=t.scheme||e.scheme||"urn";var s=e.nid;var n=r+":"+(t.nid||s);var i=C[n];if(i){e=i.serialize(e,t)}var o=e;var a=e.nss;o.path=(s||t.nid)+":"+a;return o}};var se=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;var ne={scheme:"urn:uuid",parse:function parse(e,t){var r=e;r.uuid=r.nss;r.nss=undefined;if(!t.tolerant&&(!r.uuid||!r.uuid.match(se))){r.error=r.error||"UUID is not valid."}return r},serialize:function serialize(e,t){var r=e;r.nss=(e.uuid||"").toLowerCase();return r}};C[j.scheme]=j;C[F.scheme]=F;C[ee.scheme]=ee;C[re.scheme]=re;C[ne.scheme]=ne;e.SCHEMES=C;e.pctEncChar=pctEncChar;e.pctDecChars=pctDecChars;e.parse=parse;e.removeDotSegments=removeDotSegments;e.serialize=serialize;e.resolveComponents=resolveComponents;e.resolve=resolve;e.normalize=normalize;e.equal=equal;e.escapeComponent=escapeComponent;e.unescapeComponent=unescapeComponent;Object.defineProperty(e,"__esModule",{value:true})}))},2338:(e,t,r)=>{"use strict";var s=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var n=r(3113);var i=["node_modules","favicon.ico"];var o=e.exports=function(e){var t=[];var r=[];if(e===null){r.push("name cannot be null");return done(t,r)}if(e===undefined){r.push("name cannot be undefined");return done(t,r)}if(typeof e!=="string"){r.push("name must be a string");return done(t,r)}if(!e.length){r.push("name length must be greater than zero")}if(e.match(/^\./)){r.push("name cannot start with a period")}if(e.match(/^_/)){r.push("name cannot start with an underscore")}if(e.trim()!==e){r.push("name cannot contain leading or trailing spaces")}i.forEach((function(t){if(e.toLowerCase()===t){r.push(t+" is a blacklisted name")}}));n.forEach((function(r){if(e.toLowerCase()===r){t.push(r+" is a core module name")}}));if(e.length>214){t.push("name can no longer contain more than 214 characters")}if(e.toLowerCase()!==e){t.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(e.split("/").slice(-1)[0])){t.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(e)!==e){var o=e.match(s);if(o){var a=o[1];var c=o[2];if(encodeURIComponent(a)===a&&encodeURIComponent(c)===c){return done(t,r)}}r.push("name can only contain URL-friendly characters")}return done(t,r)};o.scopedPackagePattern=s;var done=function(e,t){var r={validForNewPackages:t.length===0&&e.length===0,validForOldPackages:t.length===0,warnings:e,errors:t};if(!r.warnings.length)delete r.warnings;if(!r.errors.length)delete r.errors;return r}},7200:(e,t,r)=>{const s=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const n=r(1017);const i=s?";":":";const o=r(7745);const getNotFoundError=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"});const getPathInfo=(e,t)=>{const r=t.colon||i;const n=e.match(/\//)||s&&e.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)];const o=s?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=s?o.split(r):[""];if(s){if(e.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:n,pathExt:a,pathExtExe:o}};const which=(e,t,r)=>{if(typeof t==="function"){r=t;t={}}if(!t)t={};const{pathEnv:s,pathExt:i,pathExtExe:a}=getPathInfo(e,t);const c=[];const step=r=>new Promise(((i,o)=>{if(r===s.length)return t.all&&c.length?i(c):o(getNotFoundError(e));const a=s[r];const l=/^".*"$/.test(a)?a.slice(1,-1):a;const u=n.join(l,e);const h=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;i(subStep(h,r,0))}));const subStep=(e,r,s)=>new Promise(((n,l)=>{if(s===i.length)return n(step(r+1));const u=i[s];o(e+u,{pathExt:a},((i,o)=>{if(!i&&o){if(t.all)c.push(e+u);else return n(e+u)}return n(subStep(e,r,s+1))}))}));return r?step(0).then((e=>r(null,e)),r):step(0)};const whichSync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:s,pathExtExe:i}=getPathInfo(e,t);const a=[];for(let c=0;c<r.length;c++){const l=r[c];const u=/^".*"$/.test(l)?l.slice(1,-1):l;const h=n.join(u,e);const d=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;for(let e=0;e<s.length;e++){const r=d+s[e];try{const e=o.sync(r,{pathExt:i});if(e){if(t.all)a.push(r);else return r}}catch(e){}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw getNotFoundError(e)};e.exports=which;which.sync=whichSync},3270:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r<t.length;r++){t[r]=arguments[r]}var s=e.apply(this,t);var n=t[t.length-1];if(typeof s==="function"&&s!==n){Object.keys(n).forEach((function(e){s[e]=n[e]}))}return s}}},9414:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},3401:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,s=arguments.length;r<s;r++){t.push(arguments[r])}}return t}Yallist.prototype.removeNode=function(e){if(e.list!==this){throw new Error("removing node which does not belong to this list")}var t=e.next;var r=e.prev;if(t){t.prev=r}if(r){r.next=t}if(e===this.head){this.head=t}if(e===this.tail){this.tail=r}e.list.length--;e.next=null;e.prev=null;e.list=null;return t};Yallist.prototype.unshiftNode=function(e){if(e===this.head){return}if(e.list){e.list.removeNode(e)}var t=this.head;e.list=this;e.next=t;if(t){t.prev=e}this.head=e;if(!this.tail){this.tail=e}this.length++};Yallist.prototype.pushNode=function(e){if(e===this.tail){return}if(e.list){e.list.removeNode(e)}var t=this.tail;e.list=this;e.prev=t;if(t){t.next=e}this.tail=e;if(!this.head){this.head=e}this.length++};Yallist.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++){push(this,arguments[e])}return this.length};Yallist.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++){unshift(this,arguments[e])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var e=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return e};Yallist.prototype.shift=function(){if(!this.head){return undefined}var e=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return e};Yallist.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,s=0;r!==null;s++){e.call(t,r.value,s,this);r=r.next}};Yallist.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,s=this.length-1;r!==null;s--){e.call(t,r.value,s,this);r=r.prev}};Yallist.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}};Yallist.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}};Yallist.prototype.map=function(e,t){t=t||this;var r=new Yallist;for(var s=this.head;s!==null;){r.push(e.call(t,s.value,this));s=s.next}return r};Yallist.prototype.mapReverse=function(e,t){t=t||this;var r=new Yallist;for(var s=this.tail;s!==null;){r.push(e.call(t,s.value,this));s=s.prev}return r};Yallist.prototype.reduce=function(e,t){var r;var s=this.head;if(arguments.length>1){r=t}else if(this.head){s=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=0;s!==null;n++){r=e(r,s.value,n);s=s.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var s=this.tail;if(arguments.length>1){r=t}else if(this.tail){s=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=this.length-1;s!==null;n--){r=e(r,s.value,n);s=s.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(t<e||t<0){return r}if(e<0){e=0}if(t>this.length){t=this.length}for(var s=0,n=this.head;n!==null&&s<e;s++){n=n.next}for(;n!==null&&s<t;s++,n=n.next){r.push(n.value)}return r};Yallist.prototype.sliceReverse=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(t<e||t<0){return r}if(e<0){e=0}if(t>this.length){t=this.length}for(var s=this.length,n=this.tail;n!==null&&s>t;s--){n=n.prev}for(;n!==null&&s>e;s--,n=n.prev){r.push(n.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var s=0,n=this.head;n!==null&&s<e;s++){n=n.next}var i=[];for(var s=0;n&&s<t;s++){i.push(n.value);n=this.removeNode(n)}if(n===null){n=this.tail}if(n!==this.head&&n!==this.tail){n=n.prev}for(var s=0;s<r.length;s++){n=insert(this,n,r[s])}return i};Yallist.prototype.reverse=function(){var e=this.head;var t=this.tail;for(var r=e;r!==null;r=r.prev){var s=r.prev;r.prev=r.next;r.next=s}this.head=t;this.tail=e;return this};function insert(e,t,r){var s=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);if(s.next===null){e.tail=s}if(s.prev===null){e.head=s}e.length++;return s}function push(e,t){e.tail=new Node(t,e.tail,null,e);if(!e.head){e.head=e.tail}e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e);if(!e.tail){e.tail=e.head}e.length++}function Node(e,t,r,s){if(!(this instanceof Node)){return new Node(e,t,r,s)}this.list=s;this.value=e;if(t){t.next=this;this.prev=t}else{this.prev=null}if(r){r.prev=this;this.next=r}else{this.next=null}}try{r(9414)(Yallist)}catch(e){}},3250:(e,t,r)=>{"use strict";r.r(t);var s=r(9306);var n=r(4101);var i=r.n(n);var o=r(7136);var a=r.n(o);var c=r(1017);var l=r.n(c);var u=r(9966);var h=r.n(u);var d=r(5656);var p=r.n(d);var m=r(9239);var y=r.n(m);var g=r(7147);var v=r.n(g);var b=r(9312);var w=r.n(b);var E=r(5255);var S=r(2781);var x=r(3837);var R=r(2037);var P=r.n(R);const O=(0,x.promisify)(S.Stream.pipeline);async function isUrlOk(e){const t=await w().head(e).catch((e=>e));return t.statusCode===200}async function getRepoInfo(e,t){const[,r,s,n,i,...o]=e.pathname.split("/");const a=t?t.replace(/^\//,""):o.join("/");if(n===undefined||n===""&&i===undefined){const e=await w()(`https://api.github.com/repos/${r}/${s}`).catch((e=>e));if(e.statusCode!==200){return}const t=JSON.parse(e.body);return{username:r,name:s,branch:t["default_branch"],filePath:a}}const c=t?`${i}/${o.join("/")}`.replace(new RegExp(`/${a}|/$`),""):i;if(r&&s&&c&&n==="tree"){return{username:r,name:s,branch:c,filePath:a}}}function hasRepo({username:e,name:t,branch:r,filePath:s}){const n=`https://api.github.com/repos/${e}/${t}/contents`;const i=`${s?`/${s}`:""}/package.json`;return isUrlOk(n+i+`?ref=${r}`)}function existsInRepo(e){try{const t=new URL(e);return isUrlOk(t.href)}catch{return isUrlOk(`https://api.github.com/repos/vercel/next.js/contents/examples/${encodeURIComponent(e)}`)}}async function downloadTar(e){const t=(0,c.join)((0,R.tmpdir)(),`next.js-cna-example.temp-${Date.now()}`);await O(w().stream(e),(0,g.createWriteStream)(t));return t}async function downloadAndExtractRepo(e,{username:t,name:r,branch:s,filePath:n}){const i=await downloadTar(`https://codeload.github.com/${t}/${r}/tar.gz/${s}`);await E.x({file:i,cwd:e,strip:n?n.split("/").length+1:1,filter:e=>e.startsWith(`${r}-${s.replace(/\//g,"-")}${n?`/${n}/`:"/"}`)});await g.promises.unlink(i)}async function downloadAndExtractExample(e,t){if(t==="__internal-testing-retry"){throw new Error("This is an internal example for testing the CLI.")}const r=await downloadTar("https://codeload.github.com/vercel/next.js/tar.gz/canary");await E.x({file:r,cwd:e,strip:2+t.split("/").length,filter:e=>e.includes(`next.js-canary/examples/${t}/`)});await g.promises.unlink(r)}function makeDir(e,t={recursive:true}){return v().promises.mkdir(e,t)}var $=r(2081);function isInGitRepository(){try{(0,$.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(e){}return false}function isInMercurialRepository(){try{(0,$.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(e){}return false}function isDefaultBranchSet(){try{(0,$.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(e){}return false}function tryGitInit(e){let t=false;try{(0,$.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,$.execSync)("git init",{stdio:"ignore"});t=true;if(!isDefaultBranchSet()){(0,$.execSync)("git checkout -b main",{stdio:"ignore"})}(0,$.execSync)("git add -A",{stdio:"ignore"});(0,$.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(r){if(t){try{v().rmSync(l().join(e,".git"),{recursive:true,force:true})}catch(e){}}return false}}var T=r(4488);var A=r.n(T);function install(e,t,{packageManager:r,isOnline:n,devDependencies:i}){const o=[];const a=[];return new Promise(((c,l)=>{let u;let h=r;const d=r==="yarn";const p=r==="bun";if(t&&t.length){if(d){u=["add","--exact"];if(!n)u.push("--offline");u.push("--cwd",e);if(i)u.push("--dev");u.push(...t)}else if(p){u=["add","--exact"];u.push("--cwd",e);if(i)u.push("--development");u.push(...t)}else{u=["install","--save-exact"];u.push(i?"--save-dev":"--save");u.push(...t)}}else{u=["install"];if(!n){console.log((0,s.yellow)("You appear to be offline."));if(d){console.log((0,s.yellow)("Falling back to the local Yarn cache."));console.log();u.push("--offline")}else{console.log()}}}if(d){u.push(...a)}else{u.push(...o)}const m=A()(h,u,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});m.on("close",(e=>{if(e!==0){l({command:`${h} ${u.join(" ")}`});return}c()}))}))}function isFolderEmpty(e,t){const r=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const n=v().readdirSync(e).filter((e=>!r.includes(e))).filter((e=>!/\.iml$/.test(e)));if(n.length>0){console.log(`The directory ${(0,s.green)(t)} contains files that could conflict:`);console.log();for(const t of n){try{const r=v().lstatSync(l().join(e,t));if(r.isDirectory()){console.log(` ${(0,s.blue)(t)}/`)}else{console.log(` ${t}`)}}catch{console.log(` ${t}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}var C=r(9523);var k=r.n(C);var I=r(7310);var N=r.n(I);function getProxy(){if(process.env.https_proxy){return process.env.https_proxy}try{const e=(0,$.execSync)("npm config get https-proxy").toString().trim();return e!=="null"?e:undefined}catch(e){return}}function getOnline(){return new Promise((e=>{k().lookup("registry.yarnpkg.com",(t=>{if(!t){return e(true)}const r=getProxy();if(!r){return e(false)}const{hostname:s}=N().parse(r);if(!s){return e(false)}k().lookup(s,(t=>{e(t==null)}))}))}))}async function isWriteable(e){try{await v().promises.access(e,(v().constants||v()).W_OK);return true}catch(e){return false}}var D=r(8695);const identity=e=>e;const copy=async(e,t,{cwd:r,rename:s=identity,parents:n=true}={})=>{const i=typeof e==="string"?[e]:e;if(i.length===0||!t){throw new TypeError("`src` and `dest` are required")}const o=await(0,D.async)(i,{cwd:r,dot:true,absolute:false,stats:false});const a=r?l().resolve(r,t):t;return Promise.all(o.map((async e=>{const t=l().dirname(e);const i=s(l().basename(e));const o=r?l().resolve(r,e):e;const c=n?l().join(a,t,i):l().join(a,i);await v().promises.mkdir(l().dirname(c),{recursive:true});return v().promises.copyFile(o,c)})))};var L=r(8383);const getTemplateFile=({template:e,mode:t,file:s})=>r.ab+"templates/"+e+"/"+t+"/"+s;const M=["app","pages","styles"];const installTemplate=async({appName:e,root:t,packageManager:n,isOnline:i,template:o,mode:a,tailwind:c,eslint:u,srcDir:h,importAlias:d})=>{console.log((0,s.bold)(`Using ${n}.`));console.log("\nInitializing project with template:",o,"\n");const p=r.ab+"templates/"+o+"/"+a;const m=["**"];if(!u)m.push("!eslintrc.json");if(!c)m.push(a=="ts"?"tailwind.config.ts":"!tailwind.config.js","!postcss.config.js");await copy(m,t,{parents:true,cwd:p,rename(e){switch(e){case"gitignore":case"eslintrc.json":{return`.${e}`}case"README-template.md":{return"README.md"}default:{return e}}}});const y=l().join(t,a==="js"?"jsconfig.json":"tsconfig.json");await v().promises.writeFile(y,(await v().promises.readFile(y,"utf8")).replace(`"@/*": ["./*"]`,h?`"@/*": ["./src/*"]`:`"@/*": ["./*"]`).replace(`"@/*":`,`"${d}":`));if(d!=="@/*"){const e=await(0,D.async)("**/*",{cwd:t,dot:true,stats:false});const r=new L.Sema(8,{capacity:e.length});await Promise.all(e.map((async e=>{if(e==="tsconfig.json"||e==="jsconfig.json")return;await r.acquire();const s=l().join(t,e);if((await v().promises.stat(s)).isFile()){await v().promises.writeFile(s,(await v().promises.readFile(s,"utf8")).replace(`@/`,`${d.replace(/\*/g,"")}`))}await r.release()})))}if(h){await makeDir(l().join(t,"src"));await Promise.all(M.map((async e=>{await v().promises.rename(l().join(t,e),l().join(t,"src",e)).catch((e=>{if(e.code!=="ENOENT"){throw e}}))})));const e=o.startsWith("app");const r=l().join("src",e?"app":"pages",`${e?"page":"index"}.${a==="ts"?"tsx":"js"}`);await v().promises.writeFile(r,(await v().promises.readFile(r,"utf8")).replace(e?"app/page":"pages/index",e?"src/app/page":"src/pages/index"));if(c){const e=l().join(t,a==="ts"?"tailwind.config.ts":"tailwind.config.js");await v().promises.writeFile(e,(await v().promises.readFile(e,"utf8")).replace(/\.\/(\w+)\/\*\*\/\*\.\{js,ts,jsx,tsx,mdx\}/g,"./src/$1/**/*.{js,ts,jsx,tsx,mdx}"))}}const g={name:e,version:"0.1.0",private:true,scripts:{dev:"next dev",build:"next build",start:"next start",lint:"next lint"}};await v().promises.writeFile(l().join(t,"package.json"),JSON.stringify(g,null,2)+P().EOL);const b={packageManager:n,isOnline:i};const w=["react","react-dom",`next${process.env.NEXT_PRIVATE_TEST_VERSION?`@${process.env.NEXT_PRIVATE_TEST_VERSION}`:""}`];if(a==="ts"){w.push("typescript","@types/react","@types/node","@types/react-dom")}if(c){w.push("tailwindcss","postcss","autoprefixer")}if(u){w.push("eslint","eslint-config-next")}if(w.length){console.log();console.log("Installing dependencies:");for(const e of w){console.log(`- ${(0,s.cyan)(e)}`)}console.log();await install(t,w,b)}};class DownloadError extends Error{}async function createApp({appPath:e,packageManager:t,example:r,examplePath:n,typescript:i,tailwind:o,eslint:a,appRouter:c,srcDir:u,importAlias:h}){let d;const p=i?"ts":"js";const m=c?o?"app-tw":"app":o?"default-tw":"default";if(r){let e;try{e=new URL(r)}catch(e){if(e.code!=="ERR_INVALID_URL"){console.error(e);process.exit(1)}}if(e){if(e.origin!=="https://github.com"){console.error(`Invalid URL: ${(0,s.red)(`"${r}"`)}. Only GitHub repositories are supported. Please use a GitHub URL and try again.`);process.exit(1)}d=await getRepoInfo(e,n);if(!d){console.error(`Found invalid GitHub URL: ${(0,s.red)(`"${r}"`)}. Please fix the URL and try again.`);process.exit(1)}const t=await hasRepo(d);if(!t){console.error(`Could not locate the repository for ${(0,s.red)(`"${r}"`)}. Please check that the repository exists and try again.`);process.exit(1)}}else if(r!=="__internal-testing-retry"){const e=await existsInRepo(r);if(!e){console.error(`Could not locate an example named ${(0,s.red)(`"${r}"`)}. It could be due to the following:\n`,`1. Your spelling of example ${(0,s.red)(`"${r}"`)} might be incorrect.\n`,`2. You might not be connected to the internet or you are behind a proxy.`);process.exit(1)}}}const g=l().resolve(e);if(!await isWriteable(l().dirname(g))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const b=l().basename(g);await makeDir(g);if(!isFolderEmpty(g,b)){process.exit(1)}const w=t==="yarn";const E=!w||await getOnline();const S=process.cwd();console.log(`Creating a new Next.js app in ${(0,s.green)(g)}.`);console.log();process.chdir(g);const x=l().join(g,"package.json");let R=false;if(r){try{if(d){const e=d;console.log(`Downloading files from repo ${(0,s.cyan)(r)}. This might take a moment.`);console.log();await y()((()=>downloadAndExtractRepo(g,e)),{retries:3})}else{console.log(`Downloading files for example ${(0,s.cyan)(r)}. This might take a moment.`);console.log();await y()((()=>downloadAndExtractExample(g,r)),{retries:3})}}catch(e){function isErrorLike(e){return typeof e==="object"&&e!==null&&typeof e.message==="string"}throw new DownloadError(isErrorLike(e)?e.message:e+"")}const e=l().join(g,".gitignore");if(!v().existsSync(e)){v().copyFileSync(getTemplateFile({template:m,mode:p,file:"gitignore"}),e)}const n=l().join(g,"tsconfig.json");if(v().existsSync(n)){v().copyFileSync(getTemplateFile({template:m,mode:"ts",file:"next-env.d.ts"}),l().join(g,"next-env.d.ts"))}R=v().existsSync(x);if(R){console.log("Installing packages. This might take a couple of minutes.");console.log();await install(g,null,{packageManager:t,isOnline:E});console.log()}}else{await installTemplate({appName:b,root:g,template:m,mode:p,packageManager:t,isOnline:E,tailwind:o,eslint:a,srcDir:u,importAlias:h})}if(tryGitInit(g)){console.log("Initialized a git repository.");console.log()}let P;if(l().join(S,b)===e){P=b}else{P=e}console.log(`${(0,s.green)("Success!")} Created ${b} at ${e}`);if(R){console.log("Inside that directory, you can run several commands:");console.log();console.log((0,s.cyan)(` ${t} ${w?"":"run "}dev`));console.log(" Starts the development server.");console.log();console.log((0,s.cyan)(` ${t} ${w?"":"run "}build`));console.log(" Builds the app for production.");console.log();console.log((0,s.cyan)(` ${t} start`));console.log(" Runs the built app in production mode.");console.log();console.log("We suggest that you begin by typing:");console.log();console.log((0,s.cyan)(" cd"),P);console.log(` ${(0,s.cyan)(`${t} ${w?"":"run "}dev`)}`)}console.log()}function getPkgManager(){const e=process.env.npm_config_user_agent||"";if(e.startsWith("yarn")){return"yarn"}if(e.startsWith("pnpm")){return"pnpm"}if(e.startsWith("bun")){return"bun"}return"npm"}var j=r(2338);var F=r.n(j);function validateNpmName(e){const t=F()(e);if(t.validForNewPackages){return{valid:true}}return{valid:false,problems:[...t.errors||[],...t.warnings||[]]}}const U=JSON.parse('{"name":"create-next-app","version":"13.4.13","keywords":["react","next","next.js"],"description":"Create Next.js-powered React apps with one command","repository":{"type":"git","url":"https://github.com/vercel/next.js","directory":"packages/create-next-app"},"author":"Next.js Team <support@vercel.com>","license":"MIT","bin":{"create-next-app":"./dist/index.js"},"files":["dist"],"scripts":{"dev":"ncc build ./index.ts -w -o dist/","prerelease":"node ../../scripts/rm.mjs dist","release":"ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register","prepublishOnly":"cd ../../ && turbo run build","build":"pnpm release","lint-fix":"pnpm prettier -w --plugin prettier-plugin-tailwindcss \'templates/*-tw/{ts,js}/{app,pages}/**/*.{js,ts,tsx}\'"},"devDependencies":{"@types/async-retry":"1.4.2","@types/ci-info":"2.0.0","@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.0.1","@types/tar":"6.1.5","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","async-retry":"1.3.1","ci-info":"watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540","commander":"2.20.0","conf":"10.2.0","cross-spawn":"7.0.3","fast-glob":"3.3.1","got":"10.7.0","picocolors":"1.0.0","prettier-plugin-tailwindcss":"0.3.0","prompts":"2.1.0","tar":"6.1.15","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=16.8.0"}}');var B=r(7741);var H=r.n(B);let z="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=e=>{if(e.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const G=new(i().Command)(U.name).version(U.version).arguments("<project-directory>").usage(`${(0,s.green)("<project-directory>")} [options]`).action((e=>{z=e})).option("--ts, --typescript",`\n\n Initialize as a TypeScript project. (default)\n`).option("--js, --javascript",`\n\n Initialize as a JavaScript project.\n`).option("--tailwind",`\n\n Initialize with Tailwind CSS config. (default)\n`).option("--eslint",`\n\n Initialize with eslint config.\n`).option("--app",`\n\n Initialize as an App Router project.\n`).option("--src-dir",`\n\n Initialize inside a \`src/\` directory.\n`).option("--import-alias <alias-to-configure>",`\n\n Specify import alias to use (default "@/*").\n`).option("--use-npm",`\n\n Explicitly tell the CLI to bootstrap the application using npm\n`).option("--use-pnpm",`\n\n Explicitly tell the CLI to bootstrap the application using pnpm\n`).option("--use-yarn",`\n\n Explicitly tell the CLI to bootstrap the application using Yarn\n`).option("--use-bun",`\n\n Explicitly tell the CLI to bootstrap the application using Bun\n`).option("-e, --example [name]|[github-url]",`\n\n An example to bootstrap the app with. You can use an example name\n from the official Next.js repo or a GitHub URL. The URL can use\n any branch and/or subdirectory\n`).option("--example-path <path-to-example>",`\n\n In a rare case, your GitHub URL might contain a branch name with\n a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar).\n In this case, you must specify the path to the example separately:\n --example-path foo/bar\n`).option("--reset-preferences",`\n\n Explicitly tell the CLI to reset any stored preferences\n`).allowUnknownOption().parse(process.argv);const V=!!G.useNpm?"npm":!!G.usePnpm?"pnpm":!!G.useYarn?"yarn":!!G.useBun?"bun":getPkgManager();async function run(){const e=new(a())({projectName:"create-next-app"});if(G.resetPreferences){e.clear();console.log(`Preferences reset successfully`);return}if(typeof z==="string"){z=z.trim()}if(!z){const e=await h()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:e=>{const t=validateNpmName(l().basename(l().resolve(e)));if(t.valid){return true}return"Invalid project name: "+t.problems[0]}});if(typeof e.path==="string"){z=e.path.trim()}}if(!z){console.log("\nPlease specify the project directory:\n"+` ${(0,s.cyan)(G.name())} ${(0,s.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,s.cyan)(G.name())} ${(0,s.green)("my-next-app")}\n\n`+`Run ${(0,s.cyan)(`${G.name()} --help`)} to see all options.`);process.exit(1)}const t=l().resolve(z);const r=l().basename(t);const{valid:n,problems:i}=validateNpmName(r);if(!n){console.error(`Could not create a project called ${(0,s.red)(`"${r}"`)} because of npm naming restrictions:`);i.forEach((e=>console.error(` ${(0,s.red)((0,s.bold)("*"))} ${e}`)));process.exit(1)}if(G.example===true){console.error("Please provide an example name or url, otherwise remove the example option.");process.exit(1)}const o=l().resolve(t);const c=l().basename(o);const u=v().existsSync(o);if(u&&!isFolderEmpty(o,c)){process.exit(1)}const d=typeof G.example==="string"&&G.example.trim();const p=e.get("preferences")||{};if(!d){const e={typescript:true,eslint:true,tailwind:true,srcDir:false,importAlias:"@/*",customizeImportAlias:false};const getPrefOrDefault=t=>{var r;return(r=p[t])!==null&&r!==void 0?r:e[t]};if(!G.typescript&&!G.javascript){if(H().isCI){G.typescript=false;G.javascript=true}else{const e=(0,s.blue)("TypeScript");const{typescript:t}=await h()({type:"toggle",name:"typescript",message:`Would you like to use ${e}?`,initial:getPrefOrDefault("typescript"),active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});G.typescript=Boolean(t);G.javascript=!Boolean(t);p.typescript=Boolean(t)}}if(!process.argv.includes("--eslint")&&!process.argv.includes("--no-eslint")){if(H().isCI){G.eslint=true}else{const e=(0,s.blue)("ESLint");const{eslint:t}=await h()({onState:onPromptState,type:"toggle",name:"eslint",message:`Would you like to use ${e}?`,initial:getPrefOrDefault("eslint"),active:"Yes",inactive:"No"});G.eslint=Boolean(t);p.eslint=Boolean(t)}}if(!process.argv.includes("--tailwind")&&!process.argv.includes("--no-tailwind")){if(H().isCI){G.tailwind=false}else{const e=(0,s.blue)("Tailwind CSS");const{tailwind:t}=await h()({onState:onPromptState,type:"toggle",name:"tailwind",message:`Would you like to use ${e}?`,initial:getPrefOrDefault("tailwind"),active:"Yes",inactive:"No"});G.tailwind=Boolean(t);p.tailwind=Boolean(t)}}if(!process.argv.includes("--src-dir")&&!process.argv.includes("--no-src-dir")){if(H().isCI){G.srcDir=false}else{const e=(0,s.blue)("`src/` directory");const{srcDir:t}=await h()({onState:onPromptState,type:"toggle",name:"srcDir",message:`Would you like to use ${e}?`,initial:getPrefOrDefault("srcDir"),active:"Yes",inactive:"No"});G.srcDir=Boolean(t);p.srcDir=Boolean(t)}}if(!process.argv.includes("--app")&&!process.argv.includes("--no-app")){if(H().isCI){G.app=true}else{const e=(0,s.blue)("App Router");const{appRouter:t}=await h()({onState:onPromptState,type:"toggle",name:"appRouter",message:`Would you like to use ${e}? (recommended)`,initial:true,active:"Yes",inactive:"No"});G.app=Boolean(t)}}if(typeof G.importAlias!=="string"||!G.importAlias.length){if(H().isCI){G.importAlias="@/*"}else{const e=(0,s.blue)("import alias");const{customizeImportAlias:t}=await h()({onState:onPromptState,type:"toggle",name:"customizeImportAlias",message:`Would you like to customize the default ${e}?`,initial:getPrefOrDefault("customizeImportAlias"),active:"Yes",inactive:"No"});if(!t){G.importAlias="@/*"}else{const{importAlias:t}=await h()({onState:onPromptState,type:"text",name:"importAlias",message:`What ${e} would you like configured?`,initial:getPrefOrDefault("importAlias"),validate:e=>/.+\/\*/.test(e)?true:"Import alias must follow the pattern <prefix>/*"});G.importAlias=t;p.importAlias=t}}}}try{await createApp({appPath:t,packageManager:V,example:d&&d!=="default"?d:undefined,examplePath:G.examplePath,typescript:G.typescript,tailwind:G.tailwind,eslint:G.eslint,appRouter:G.app,srcDir:G.srcDir,importAlias:G.importAlias})}catch(e){if(!(e instanceof DownloadError)){throw e}const r=await h()({onState:onPromptState,type:"confirm",name:"builtin",message:`Could not download "${d}" because of a connectivity issue between your machine and GitHub.\n`+`Do you want to use the default template instead?`,initial:true});if(!r.builtin){throw e}await createApp({appPath:t,packageManager:V,typescript:G.typescript,eslint:G.eslint,tailwind:G.tailwind,appRouter:G.app,srcDir:G.srcDir,importAlias:G.importAlias})}e.set("preferences",p)}const q=p()(U).catch((()=>null));async function notifyUpdate(){try{const e=await q;if(e===null||e===void 0?void 0:e.latest){const e=V==="yarn"?"yarn global add create-next-app":V==="pnpm"?"pnpm add -g create-next-app":V==="bun"?"bun add -g create-next-app":"npm i -g create-next-app";console.log((0,s.yellow)((0,s.bold)("A new version of `create-next-app` is available!"))+"\n"+"You can update by running: "+(0,s.cyan)(e)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async e=>{console.log();console.log("Aborting installation.");if(e.command){console.log(` ${(0,s.cyan)(e.command)} has failed.`)}else{console.log((0,s.red)("Unexpected error. Please report it as a bug:")+"\n",e)}console.log();await notifyUpdate();process.exit(1)}))},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},7282:e=>{"use strict";e.exports=require("process")},4521:e=>{"use strict";e.exports=require("readline")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},7918:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},9520:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},3113:e=>{"use strict";e.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')},6107:e=>{"use strict";e.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitHub Actions","constant":"GITHUB_ACTIONS","env":"GITHUB_ACTIONS","pr":{"GITHUB_EVENT_NAME":"pull_request"}},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"ZEIT Now","constant":"ZEIT_NOW","env":"NOW_BUILDER"},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Nevercode","constant":"NEVERCODE","env":"NEVERCODE","pr":{"env":"NEVERCODE_PULL_REQUEST","ne":"false"}},{"name":"Render","constant":"RENDER","env":"RENDER","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={id:r,loaded:false,exports:{}};var i=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}n.loaded=true;return n.exports}(()=>{__nccwpck_require__.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;__nccwpck_require__.d(t,{a:t});return t}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(3250);module.exports=r})();