Close Open Privacy Scan
App Privacy Score
High risk · 436 finding(s)
Dependency score: 82 (Low risk)
bar_chart Score Breakdown
list Scan Summary
swap_horiz Confirmed data exfiltration in application code
External domains:
a#бa@bapi.github.comapi.github.com`;feross.orggithub.comgithub.com`;тест
repo/packages/babel-register/src/worker/cache.ts:13 → repo/packages/babel-register/src/worker/cache.ts:120repo/packages/babel-register/src/worker/cache.ts:13 → repo/packages/babel-register/src/worker/cache.ts:120repo/packages/babel-register/src/worker/cache.ts:13 → repo/packages/babel-register/src/worker/cache.ts:26repo/packages/babel-register/src/worker/cache.ts:13 → repo/packages/babel-register/src/worker/cache.ts:36repo/packages/babel-register/src/worker/cache.ts:13 → repo/packages/babel-register/src/worker/cache.ts:43repo/packages/babel-register/src/worker/cache.ts:13 → repo/packages/babel-register/src/worker/cache.ts:26repo/packages/babel-register/src/worker/cache.ts:13 → repo/packages/babel-register/src/worker/cache.ts:36repo/packages/babel-register/src/worker/cache.ts:13 → repo/packages/babel-register/src/worker/cache.ts:43</> First-Party Code
first-party (npm)
npm first-party await cacache.put(this.cacheDir, key, gzipSync(buf), {
algorithms: ["sha1"],
});
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
console.warn(
`Cache directory ${this.cacheDir} is a file, not a directory.`,
);
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
console.warn(`Failed to create cache directory ${this.cacheDir}`);
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
console.warn(
`Cache directory ${this.cacheDir} is not writable or readable.`,
);
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
expand_more 225 low-confidence finding(s)
fs.writeFileSync(path.join(dest, filename), result, { mode: 0o644 });
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.promises
.readFile(file, "utf-8")
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return fs.promises.writeFile(file, transformedCode);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.CIRCLECI
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.WATCH_SKIP_BUILD) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.CIRCLE_PR_NUMBER) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
versionSuffix = "+pr." + process.env.CIRCLE_PR_NUMBER;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const sourcemap = process.env.NODE_ENV === "production";
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.STRIP_BABEL_VERSION_FLAG &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
rollupDependencyCondition(bool(process.env.BABEL_9_BREAKING)),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.NODE_ENV
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
maxWorkers: process.env.CIRCLECI ? 1 : undefined,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
parserDts,
await formatCode(fs.readFileSync(parserDts, "utf8"), parserDts)
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await formatCode(fs.readFileSync(parserDts, "utf8"), parserDts)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFileSync(new URL(`${src}/package.json`, import.meta.url), "utf-8")
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFileSync(
new URL(`./packages/babel-standalone/package.json`, import.meta.url),
"utf-8"
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.WATCH_SKIP_BUILD ? watch : gulp.series("build-dev", watch)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
import e from"os";import t from"fs";import r from"path";import n from"util";import o from"stream";import i from"events";import s from"child_process";import a from"assert";import c from"buffer";import l from"node:path";import u from"node:module";import{statSync as d,readFileSync as p,appendFileSync as f,writeFileSync as m,createWriteStream as h,createReadStream as g,readdirSync as y,existsSync as b,mkdirSync as v}from"node:fs";import{fileURLToPath as w}from"node:url";import{ChildProcess as S,execFile as E,spawnSync as _,spawn as x}from"node:child_process";import{StringDecoder as A}from"node:string_decoder";import{debuglog as T,stripVTControlCharacters as O,inspect as R,promisify as C,callbackify as k,aborted as P}from"node:util";import I,{platform as D,hrtime as L,execPath as M,execArgv as N}from"node:process";import $ from"node:tty";import{setTimeout as j,scheduler as B,setImmediate as F}from"node:timers/promises";import{constants as H}from"node:os";import{once as U,addAbortListener as G,EventEmitter as W,on as V,setMaxListeners as K}from"node:events";import{serialize as q}from"node:v8";import{Transform as z,getDefaultHighWaterMark as X,Duplex as Y,Writable as Q,Readable as Z,PassThrough as J}from"node:stream";import{Buffer as ee}from"node:buffer";import{finished as te}from"node:stream/promises";var re="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oe,ie={},se={},ae={exports:{}},ce={},le={},ue={},de={};function pe(){if(oe)return de;return oe=1,Object.defineProperty(de,"__esModule",{value:!0}),de.splitWhen=de.flatten=void 0,de.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},de.splitWhen=function(e,t){const r=[[]];let n=0;for(const o of e)t(o)?(n++,r[n]=[]):r[n].push(o);return r},de}var fe,me={};function he(){if(fe)return me;return fe=1,Object.defineProperty(me,"__esModule",{value:!0}),me.isEnoentCodeError=void 0,me.isEnoentCodeError=function(e){return"ENOENT"===e.code},me}var ge,ye={};var be,ve={};function we(){if(be)return ve;be=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.convertPosixPathToPattern=ve.convertWindowsPathToPattern=ve.convertPathToPattern=ve.escapePosixPath=ve.escapeWindowsPath=ve.escape=ve.removeLeadingDotSegment=ve.makeAbsolute=ve.unixify=void 0;const t=r,n="win32"===e.platform(),o=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,i=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,s=/^\\\\([.?])/,a=/\\(?![!()+@[\]{}])/g;function c(e){return e.replace(i,"\\$2")}function l(e){return e.replace(o,"\\$2")}function u(e){return c(e).replace(s,"//$1").replace(a,"/")}function d(e){return l(e)}return ve.unixify=function(e){return e.replace(/\\/g,"/")},ve.makeAbsolute=function(e,r){return t.resolve(e,r)},ve.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e},ve.escape=n?c:l,ve.escapeWindowsPath=c,ve.escapePosixPath=l,ve.convertPathToPattern=n?u:d,ve.convertWindowsPathToPattern=u,ve.convertPosixPathToPattern=d,ve}var Se,Ee,_e,xe,Ae,Te,Oe={};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
*/function et(){if($e)return Ne;$e=1;const e=Je(),t=(r,i,s)=>{if(!1===e(r))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===i||r===i)return String(r);if(!1===e(i))throw new TypeError("toRegexRange: expected the second argument to be a number.");let a={relaxZeros:!0,...s};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let c=r+":"+i+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(t.cache.hasOwnProperty(c))return t.cache[c].result;let l=Math.min(r,i),u=Math.max(r,i);if(1===Math.abs(l-u)){let e=r+"|"+i;return a.capture?`(${e})`:!1===a.wrap?e:`(?:${e})`}let p=d(r)||d(i),f={min:r,max:i,a:l,b:u},m=[],h=[];if(p&&(f.isPadded=p,f.maxLen=String(f.max).length),l<0){h=n(u<0?Math.abs(u):1,Math.abs(l),f,a),l=f.a=0}return u>=0&&(m=n(l,u,f,a)),f.negatives=h,f.positives=m,f.result=function(e,t){let r=o(e,t,"-",!1)||[],n=o(t,e,"",!1)||[],i=o(e,t,"-?",!0)||[];return r.concat(i).concat(n).join("|")}(h,m),!0===a.capture?f.result=`(${f.result})`:!1!==a.wrap&&m.length+h.length>1&&(f.result=`(?:${f.result})`),t.cache[c]=f,f.result};function r(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=function(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}(e,t),o=n.length,i="",s=0;for(let e=0;e<o;e++){let[t,r]=n[e];t===r?i+=t:"0"!==t||"9"!==r?i+=u(t,r):s++}return s&&(i+=!0===r.shorthand?"\\d":"[0-9]"),{pattern:i,count:[s],digits:o}}function n(e,t,n,o){let s,u=function(e,t){let r=1,n=1,o=a(e,r),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),r+=1,o=a(e,r);for(o=c(t+1,n)-1;e<o&&o<=t;)s.add(o),n+=1,o=c(t+1,n)-1;return s=[...s],s.sort(i),s}(e,t),d=[],f=e;for(let e=0;e<u.length;e++){let t=u[e],i=r(String(f),String(t),o),a="";n.isPadded||!s||s.pattern!==i.pattern?(n.isPadded&&(a=p(t,n,o)),i.string=a+i.pattern+l(i.count),d.push(i),f=t+1,s=i):(s.count.length>1&&s.count.pop(),s.count.push(i.count[0]),s.string=s.pattern+l(s.count),f=t+1)}return d}function o(e,t,r,n,o){let i=[];for(let o of e){let{string:e}=o;n||s(t,"string",e)||i.push(r+e),n&&s(t,"string",e)&&i.push(r+e)}return i}function i(e,t){return e>t?1:t>e?-1:0}function s(e,t,r){return e.some(e=>e[t]===r)}function a(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function c(e,t){return e-e%Math.pow(10,t)}function l(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function u(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function d(e){return/^-?(0+)\d/.test(e)}function p(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),o=!1!==r.relaxZeros;switch(n){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${n}}`:`0{${n}}`}}return t.cache={},t.clearCache=()=>t.cache={},Ne=t}
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
*/function tt(){if(Be)return je;Be=1;const e=n,t=et(),r=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),o=e=>"number"==typeof e||"string"==typeof e&&""!==e,i=e=>Number.isInteger(+e),s=e=>{let t=`${e}`,r=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++r];);return r>0},a=(e,t,r)=>{if(t>0){let r="-"===e[0]?"-":"";r&&(e=e.slice(1)),e=r+e.padStart(r?t-1:t,"0")}return!1===r?String(e):e},c=(e,t)=>{let r="-"===e[0]?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},l=(e,r,n,o)=>{if(n)return t(e,r,{wrap:!1,...o});let i=String.fromCharCode(e);return e===r?i:`[${i}-${String.fromCharCode(r)}]`},u=(e,r,n)=>{if(Array.isArray(e)){let t=!0===n.wrap,r=n.capture?"":"?:";return t?`(${r}${e.join("|")})`:e.join("|")}return t(e,r,n)},d=(...t)=>new RangeError("Invalid range arguments: "+e.inspect(...t)),p=(e,t,r)=>{if(!0===r.strictRanges)throw d([e,t]);return[]},f=(e,t,r=1,n={})=>{let o=Number(e),i=Number(t);if(!Number.isInteger(o)||!Number.isInteger(i)){if(!0===n.strictRanges)throw d([e,t]);return[]}0===o&&(o=0),0===i&&(i=0);let p=o>i,f=String(e),m=String(t),h=String(r);r=Math.max(Math.abs(r),1);let g=s(f)||s(m)||s(h),y=g?Math.max(f.length,m.length,h.length):0,b=!1===g&&!1===((e,t,r)=>"string"==typeof e||"string"==typeof t||!0===r.stringify)(e,t,n),v=n.transform||(e=>t=>!0===e?Number(t):String(t))(b);if(n.toRegex&&1===r)return l(c(e,y),c(t,y),!0,n);let w={negatives:[],positives:[]},S=e=>w[e<0?"negatives":"positives"].push(Math.abs(e)),E=[],_=0;for(;p?o>=i:o<=i;)!0===n.toRegex&&r>1?S(o):E.push(a(v(o,_),y,b)),o=p?o-r:o+r,_++;return!0===n.toRegex?r>1?((e,t,r)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let n,o=t.capture?"":"?:",i="",s="";return e.positives.length&&(i=e.positives.map(e=>c(String(e),r)).join("|")),e.negatives.length&&(s=`-(${o}${e.negatives.map(e=>c(String(e),r)).join("|")})`),n=i&&s?`${i}|${s}`:i||s,t.wrap?`(${o}${n})`:n})(w,n,y):u(E,null,{wrap:!1,...n}):E},m=(e,t,n,s={})=>{if(null==t&&o(e))return[e];if(!o(e)||!o(t))return p(e,t,s);if("function"==typeof n)return m(e,t,1,{transform:n});if(r(n))return m(e,t,0,n);let a={...s};return!0===a.capture&&(a.wrap=!0),n=n||a.step||1,i(n)?i(e)&&i(t)?f(e,t,n,a):((e,t,r=1,n={})=>{if(!i(e)&&e.length>1||!i(t)&&t.length>1)return p(e,t,n);let o=n.transform||(e=>String.fromCharCode(e)),s=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),c=s>a,d=Math.min(s,a),f=Math.max(s,a);if(n.toRegex&&1===r)return l(d,f,!1,n);let m=[],h=0;for(;c?s>=a:s<=a;)m.push(o(s,h)),s=c?s-r:s+r,h++;return!0===n.toRegex?u(m,null,{wrap:!1,options:n}):m})(e,t,Math.max(Math.abs(n),1),a):null==n||r(n)?m(e,t,1,n):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(n,a)};return je=m}function rt(){if(qe)return Ke;qe=1;const e=Ze(),{MAX_LENGTH:t,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:o,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:s,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:f,CHAR_NO_BREAK_SPACE:m,CHAR_ZERO_WIDTH_NOBREAK_SPACE:h}=Ve?We:(Ve=1,We={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"});return Ke=(g,y={})=>{if("string"!=typeof g)throw new TypeError("Expected a string");const b=y||{},v="number"==typeof b.maxLength?Math.min(t,b.maxLength):t;if(g.length>v)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${v})`);const w={type:"root",input:g,nodes:[]},S=[w];let E=w,_=w,x=0;const A=g.length;let T,O=0,R=0;const C=()=>g[O++],k=e=>{if("text"===e.type&&"dot"===_.type&&(_.type="text"),!_||"text"!==_.type||"text"!==e.type)return E.nodes.push(e),e.parent=E,e.prev=_,_=e,e;_.value+=e.value};for(k({type:"bos"});O<A;)if(E=S[S.length-1],T=C(),T!==h&&T!==m)if(T!==r)if(T!==d){if(T===u){let e;for(x++;O<A&&(e=C());)if(T+=e,e!==u)if(e!==r){if(e===d&&(x--,0===x))break}else T+=C();else x++;k({type:"text",value:T});continue}if(T!==s)if(T!==a){if(T===p||T===f||T===n){const e=T;let t;for(!0!==y.keepQuotes&&(T="");O<A&&(t=C());)if(t!==r){if(t===e){!0===y.keepQuotes&&(T+=t);break}T+=t}else T+=t+C();k({type:"text",value:T});continue}if(T===c){R++;const e=_.value&&"$"===_.value.slice(-1)||!0===E.dollar;E=k({type:"brace",open:!0,close:!1,dollar:e,depth:R,commas:0,ranges:0,nodes:[]}),S.push(E),k({type:"open",value:T});continue}if(T===l){if("brace"!==E.type){k({type:"text",value:T});continue}const e="close";E=S.pop(),E.close=!0,k({type:e,value:T}),R--,E=S[S.length-1];continue}if(T===o&&R>0){if(E.ranges>0){E.ranges=0;const t=E.nodes.shift();E.nodes=[t,{type:"text",value:e(E)}]}k({type:"comma",value:T}),E.commas++}else{if(T===i&&R>0&&0===E.commas){const e=E.nodes;if(0===R||0===e.length){k({type:"text",value:T});continue}if("dot"===_.type){if(E.range=[],_.value+=T,_.type="range",3!==E.nodes.length&&5!==E.nodes.length){E.invalid=!0,E.ranges=0,_.type="text";continue}E.ranges++,E.args=[];continue}if("range"===_.type){e.pop();const t=e[e.length-1];t.value+=_.value+T,_=t,E.ranges--;continue}k({type:"dot",value:T});continue}k({type:"text",value:T})}}else{if("paren"!==E.type){k({type:"text",value:T});continue}E=S.pop(),k({type:"text",value:T}),E=S[S.length-1]}else E=k({type:"paren",nodes:[]}),S.push(E),k({type:"text",value:T})}else k({type:"text",value:"\\"+T});else k({type:"text",value:(y.keepEscaping?T:"")+C()});do{if(E=S.pop(),"root"!==E.type){E.nodes.forEach(e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});const e=S[S.length-1],t=e.nodes.indexOf(E);e.nodes.splice(t,1,...E.nodes)}}while(S.length>0);return k({type:"eos"}),w},Ke}function nt(){if(Xe)return ze;Xe=1;const e=Ze(),t=function(){if(He)return Fe;He=1;const e=tt(),t=Qe();return Fe=(r,n={})=>{const o=(r,i={})=>{const s=t.isInvalidBrace(i),a=!0===r.invalid&&!0===n.escapeInvalid,c=!0===s||!0===a,l=!0===n.escapeInvalid?"\\":"";let u="";if(!0===r.isOpen)return l+r.value;if(!0===r.isClose)return console.log("node.isClose",l,r.value),l+r.value;if("open"===r.type)return c?l+r.value:"(";if("close"===r.type)return c?l+r.value:")";if("comma"===r.type)return"comma"===r.prev.type?"":c?r.value:"|";if(r.value)return r.value;if(r.nodes&&r.ranges>0){const o=t.reduce(r.nodes),i=e(...o,{...n,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return o.length>1&&i.length>1?`(${i})`:i}if(r.nodes)for(const e of r.nodes)u+=o(e,r);return u};return o(r)},Fe}(),r=function(){if(Ge)return Ue;Ge=1;const e=tt(),t=Ze(),r=Qe(),n=(e="",t="",o=!1)=>{const i=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return o?r.flatten(t).map(e=>`{${e}}`):t;for(const r of e)if(Array.isArray(r))for(const e of r)i.push(n(e,t,o));else for(let e of t)!0===o&&"string"==typeof e&&(e=`{${e}}`),i.push(Array.isArray(e)?n(r,e,o):r+e);return r.flatten(i)};return Ue=(o,i={})=>{const s=void 0===i.rangeLimit?1e3:i.rangeLimit,a=(o,c={})=>{o.queue=[];let l=c,u=c.queue;for(;"brace"!==l.type&&"root"!==l.type&&l.parent;)l=l.parent,u=l.queue;if(o.invalid||o.dollar)return void u.push(n(u.pop(),t(o,i)));if("brace"===o.type&&!0!==o.invalid&&2===o.nodes.length)return void u.push(n(u.pop(),["{}"]));if(o.nodes&&o.ranges>0){const a=r.reduce(o.nodes);if(r.exceedsLimit(...a,i.step,s))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=e(...a,i);return 0===c.length&&(c=t(o,i)),u.push(n(u.pop(),c)),void(o.nodes=[])}const d=r.encloseBrace(o);let p=o.queue,f=o;for(;"brace"!==f.type&&"root"!==f.type&&f.parent;)f=f.parent,p=f.queue;for(let e=0;e<o.nodes.length;e++){const t=o.nodes[e];"comma"!==t.type||"brace"!==o.type?"close"!==t.type?t.value&&"open"!==t.type?p.push(n(p.pop(),t.value)):t.nodes&&a(t,o):u.push(n(u.pop(),p,d)):(1===e&&p.push(""),p.push(""))}return p};return r.flatten(a(o))},Ue}(),n=rt(),o=(e,t={})=>{let r=[];if(Array.isArray(e))for(const n of e){const e=o.create(n,t);Array.isArray(e)?r.push(...e):r.push(e)}else r=[].concat(o.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(r=[...new Set(r)]),r};return o.parse=(e,t={})=>n(e,t),o.stringify=(t,r={})=>e("string"==typeof t?o.parse(t,r):t,r),o.compile=(e,r={})=>("string"==typeof e&&(e=o.parse(e,r)),t(e,r)),o.expand=(e,t={})=>{"string"==typeof e&&(e=o.parse(e,t));let n=r(e,t);return!0===t.noempty&&(n=n.filter(Boolean)),!0===t.nodupes&&(n=[...new Set(n)]),n},o.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?o.compile(e,t):o.expand(e,t),ze=o}var ot,it,st,at,ct,lt,ut,dt,pt,ft,mt,ht,gt,yt,bt={};function vt(){if(it)return ot;it=1;const e=r,t="\\\\/",n=`[^${t}]`,o="\\.",i="\\/",s="[^/]",a=`(?:${i}|$)`,c=`(?:^|${i})`,l=`${o}{1,2}${a}`,u={DOT_LITERAL:o,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:i,ONE_CHAR:"(?=.)",QMARK:s,END_ANCHOR:a,DOTS_SLASH:l,NO_DOT:`(?!${o})`,NO_DOTS:`(?!${c}${l})`,NO_DOT_SLASH:`(?!${o}{0,1}${a})`,NO_DOTS_SLASH:`(?!${l})`,QMARK_NO_DOT:`[^.${i}]`,STAR:`${s}*?`,START_ANCHOR:c},d={...u,SLASH_LITERAL:`[${t}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${o}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${t}])${o}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`};return ot={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,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"},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:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},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:e.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?d:u}}function wt(){return st||(st=1,function(e){const t=r,n="win32"===process.platform,{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:a}=vt();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>s.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(a,"\\$1"),e.toPosixSlashes=e=>e.replace(o,"/"),e.removeBackslashes=e=>e.replace(i,e=>"\\"===e?"":e),e.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},e.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===n||"\\"===t.sep,e.escapeLast=(t,r,n)=>{const o=t.lastIndexOf(r,n);return-1===o?t:"\\"===t[o-1]?e.escapeLast(t,r,o-1):`${t.slice(0,o)}\\${t.slice(o)}`},e.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},e.wrapOutput=(e,t={},r={})=>{let n=`${r.contains?"":"^"}(?:${e})${r.contains?"":"$"}`;return!0===t.negated&&(n=`(?:^(?!${n}).*$)`),n}}(bt)),bt}function St(){if(ut)return lt;ut=1;const e=vt(),t=wt(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:s}=e,a=(e,r)=>{if("function"==typeof r.expandRange)return r.expandRange(...e,r);e.sort();const n=`[${e.join("-")}]`;try{new RegExp(n)}catch(r){return e.map(e=>t.escapeRegex(e)).join("..")}return n},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,l=e=>{const t=[];let r=0,n=0,o=0,i="",s=!1;for(const a of e)if(!0!==s)if("\\"!==a)if('"'!==a){if(0===o)if("["===a)r++;else if("]"===a&&r>0)r--;else if(0===r)if("("===a)n++;else if(")"===a&&n>0)n--;else if("|"===a&&0===n){t.push(i),i="";continue}i+=a}else o=1===o?0:1,i+=a;else i+=a,s=!0;else i+=a,s=!1;return t.push(i),t},u=e=>{let t=e.trim(),r=!0;for(;!0===r;)r=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),r=!0);if((e=>{let t=!1;for(const r of e)if(!0!==t)if("\\"!==r){if(/[?*+@!()[\]{}]/.test(r))return!1}else t=!0;else t=!1;return!0})(t))return t.replace(/\\(.)/g,"$1")},d=(e,t=!0)=>{if("+"!==e[0]&&"*"!==e[0]||"("!==e[1])return;let r=0,n=0,o=0,i=!1;for(let s=1;s<e.length;s++){const a=e[s];if(!0!==i)if("\\"!==a)if('"'!==a){if(1!==o)if("["!==a){if("]"===a&&r>0)r--;else if(!(r>0))if("("!==a){if(")"===a&&(n--,0===n)){if(!0===t&&s!==e.length-1)return;return{type:e[0],body:e.slice(2,s),end:s}}}else n++}else r++}else o=1===o?0:1;else i=!0;else i=!1}},p=e=>{let r=0;const n=[];for(;r<e.length;){const t=d(e.slice(r),!1);if(!t||"*"!==t.type)return;const o=l(t.body).map(e=>e.trim());if(1!==o.length)return;const i=u(o[0]);if(!i||1!==i.length)return;n.push(i),r+=t.end+1}if(n.length<1)return;return`${1===n.length?t.escapeRegex(n[0]):`[${n.map(e=>t.escapeRegex(e)).join("")}]`}*`},f=e=>{let t=0,r=e.trim(),n=d(r);for(;n;)t++,r=n.body.trim(),n=d(r);return t},m=(t,r)=>{if(!1===r.maxExtglobRecursion)return{risky:!1};const n="number"==typeof r.maxExtglobRecursion?r.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,o=l(t).map(e=>e.trim());if(o.length>1&&(o.some(e=>""===e)||o.some(e=>/^[*?]+$/.test(e))||(e=>{const t=e.map(u).filter(Boolean);for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++){const n=t[e],o=t[r],i=n[0];if(i&&n===i.repeat(n.length)&&o===i.repeat(o.length)&&(n===o||n.startsWith(o)||o.startsWith(n)))return!0}return!1})(o)))return{risky:!0};for(const e of o){const t=p(e);if(t)return{risky:!0,safeOutput:t};if(f(e)>n)return{risky:!0}}return{risky:!1}},h=(l,u)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=s[l]||l;const d={...u},p="number"==typeof d.maxLength?Math.min(r,d.maxLength):r;let f=l.length;if(f>p)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${p}`);const g={type:"bos",value:"",output:d.prepend||""},y=[g],b=d.capture?"":"?:",v=t.isWindows(u),w=e.globChars(v),S=e.extglobChars(w),{DOT_LITERAL:E,PLUS_LITERAL:_,SLASH_LITERAL:x,ONE_CHAR:A,DOTS_SLASH:T,NO_DOT:O,NO_DOT_SLASH:R,NO_DOTS_SLASH:C,QMARK:k,QMARK_NO_DOT:P,STAR:I,START_ANCHOR:D}=w,L=e=>`(${b}(?:(?!${D}${e.dot?T:E}).)*?)`,M=d.dot?"":O,N=d.dot?k:P;let $=!0===d.bash?L(d):I;d.capture&&($=`(${$})`),"boolean"==typeof d.noext&&(d.noextglob=d.noext);const j={input:l,index:-1,start:0,dot:!0===d.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};l=t.removePrefix(l,j),f=l.length;const B=[],F=[],H=[];let U,G=g;const W=()=>j.index===f-1,V=j.peek=(e=1)=>l[j.index+e],K=j.advance=()=>l[++j.index]||"",q=()=>l.slice(j.index+1),z=(e="",t=0)=>{j.consumed+=e,j.index+=t},X=e=>{j.output+=null!=e.output?e.output:e.value,z(e.value)},Y=()=>{let e=1;for(;"!"===V()&&("("!==V(2)||"?"===V(3));)K(),j.start++,e++;return e%2!=0&&(j.negated=!0,j.start++,!0)},Q=e=>{j[e]++,H.push(e)},Z=e=>{j[e]--,H.pop()},J=e=>{if("globstar"===G.type){const t=j.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||B.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(j.output=j.output.slice(0,-G.output.length),G.type="star",G.value="*",G.output=$,j.output+=G.output)}if(B.length&&"paren"!==e.type&&(B[B.length-1].inner+=e.value),(e.value||e.output)&&X(e),G&&"text"===G.type&&"text"===e.type)return G.value+=e.value,void(G.output=(G.output||"")+e.value);e.prev=G,y.push(e),G=e},ee=(e,t)=>{const r={...S[t],conditions:1,inner:""};r.prev=G,r.parens=j.parens,r.output=j.output,r.startIndex=j.index,r.tokensIndex=y.length;const n=(d.capture?"(":"")+r.open;Q("parens"),J({type:e,value:t,output:j.output?"":A}),J({type:"paren",extglob:!0,value:K(),output:n}),B.push(r)},te=e=>{const r=l.slice(e.startIndex,j.index+1),n=l.slice(e.startIndex+2,j.index),o=m(n,d);if(("plus"===e.type||"star"===e.type)&&o.risky){const n=o.safeOutput?(e.output?"":A)+(d.capture?`(${o.safeOutput})`:o.safeOutput):void 0,i=y[e.tokensIndex];i.type="text",i.value=r,i.output=n||t.escapeRegex(r);for(let t=e.tokensIndex+1;t<y.length;t++)y[t].value="",y[t].output="",delete y[t].suffix;return j.output=e.output+i.output,j.backtrack=!0,J({type:"paren",extglob:!0,value:U,output:""}),void Z("parens")}let i,s=e.close+(d.capture?")":"");if("negate"===e.type){let t=$;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(t=L(d)),(t!==$||W()||/^\)+$/.test(q()))&&(s=e.close=`)$))${t}`),e.inner.includes("*")&&(i=q())&&/^\.[^\\/.]+$/.test(i)){const r=h(i,{...u,fastpaths:!1}).output;s=e.close=`)${r})${t})`}"bos"===e.prev.type&&(j.negatedExtglob=!0)}J({type:"paren",extglob:!0,value:U,output:s}),Z("parens")};if(!1!==d.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,r=l.replace(i,(t,r,n,o,i,s)=>"\\"===o?(e=!0,t):"?"===o?r?r+o+(i?k.repeat(i.length):""):0===s?N+(i?k.repeat(i.length):""):k.repeat(n.length):"."===o?E.repeat(n.length):"*"===o?r?r+o+(i?$:""):$:r?t:`\\${t}`);return!0===e&&(r=!0===d.unescape?r.replace(/\\/g,""):r.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),r===l&&!0===d.contains?(j.output=l,j):(j.output=t.wrapOutput(r,j,u),j)}for(;!W();){if(U=K(),"\0"===U)continue;if("\\"===U){const e=V();if("/"===e&&!0!==d.bash)continue;if("."===e||";"===e)continue;if(!e){U+="\\",J({type:"text",value:U});continue}const t=/^\\+/.exec(q());let r=0;if(t&&t[0].length>2&&(r=t[0].length,j.index+=r,r%2!=0&&(U+="\\")),!0===d.unescape?U=K():U+=K(),0===j.brackets){J({type:"text",value:U});continue}}if(j.brackets>0&&("]"!==U||"["===G.value||"[^"===G.value)){if(!1!==d.posix&&":"===U){const e=G.value.slice(1);if(e.includes("[")&&(G.posix=!0,e.includes(":"))){const e=G.value.lastIndexOf("["),t=G.value.slice(0,e),r=G.value.slice(e+2),o=n[r];if(o){G.value=t+o,j.backtrack=!0,K(),g.output||1!==y.indexOf(G)||(g.output=A);continue}}}("["===U&&":"!==V()||"-"===U&&"]"===V())&&(U=`\\${U}`),"]"!==U||"["!==G.value&&"[^"!==G.value||(U=`\\${U}`),!0===d.posix&&"!"===U&&"["===G.value&&(U="^"),G.value+=U,X({value:U});continue}if(1===j.quotes&&'"'!==U){U=t.escapeRegex(U),G.value+=U,X({value:U});continue}if('"'===U){j.quotes=1===j.quotes?0:1,!0===d.keepQuotes&&J({type:"text",value:U});continue}if("("===U){Q("parens"),J({type:"paren",value:U});continue}if(")"===U){if(0===j.parens&&!0===d.strictBrackets)throw new SyntaxError(c("opening","("));const e=B[B.length-1];if(e&&j.parens===e.parens+1){te(B.pop());continue}J({type:"paren",value:U,output:j.parens?")":"\\)"}),Z("parens");continue}if("["===U){if(!0!==d.nobracket&&q().includes("]"))Q("brackets");else{if(!0!==d.nobracket&&!0===d.strictBrackets)throw new SyntaxError(c("closing","]"));U=`\\${U}`}J({type:"bracket",value:U});continue}if("]"===U){if(!0===d.nobracket||G&&"bracket"===G.type&&1===G.value.length){J({type:"text",value:U,output:`\\${U}`});continue}if(0===j.brackets){if(!0===d.strictBrackets)throw new SyntaxError(c("opening","["));J({type:"text",value:U,output:`\\${U}`});continue}Z("brackets");const e=G.value.slice(1);if(!0===G.posix||"^"!==e[0]||e.includes("/")||(U=`/${U}`),G.value+=U,X({value:U}),!1===d.literalBrackets||t.hasRegexChars(e))continue;const r=t.escapeRegex(G.value);if(j.output=j.output.slice(0,-G.value.length),!0===d.literalBrackets){j.output+=r,G.value=r;continue}G.value=`(${b}${r}|${G.value})`,j.output+=G.value;continue}if("{"===U&&!0!==d.nobrace){Q("braces");const e={type:"brace",value:U,output:"(",outputIndex:j.output.length,tokensIndex:j.tokens.length};F.push(e),J(e);continue}if("}"===U){const e=F[F.length-1];if(!0===d.nobrace||!e){J({type:"text",value:U,output:U});continue}let t=")";if(!0===e.dots){const e=y.slice(),r=[];for(let t=e.length-1;t>=0&&(y.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&r.unshift(e[t].value);t=a(r,d),j.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const r=j.output.slice(0,e.outputIndex),n=j.tokens.slice(e.tokensIndex);e.value=e.output="\\{",U=t="\\}",j.output=r;for(const e of n)j.output+=e.output||e.value}J({type:"brace",value:U,output:t}),Z("braces"),F.pop();continue}if("|"===U){B.length>0&&B[B.length-1].conditions++,J({type:"text",value:U});continue}if(","===U){let e=U;const t=F[F.length-1];t&&"braces"===H[H.length-1]&&(t.comma=!0,e="|"),J({type:"comma",value:U,output:e});continue}if("/"===U){if("dot"===G.type&&j.index===j.start+1){j.start=j.index+1,j.consumed="",j.output="",y.pop(),G=g;continue}J({type:"slash",value:U,output:x});continue}if("."===U){if(j.braces>0&&"dot"===G.type){"."===G.value&&(G.output=E);const e=F[F.length-1];G.type="dots",G.output+=U,G.value+=U,e.dots=!0;continue}if(j.braces+j.parens===0&&"bos"!==G.type&&"slash"!==G.type){J({type:"text",value:U,output:E});continue}J({type:"dot",value:U,output:E});continue}if("?"===U){if(!(G&&"("===G.value)&&!0!==d.noextglob&&"("===V()&&"?"!==V(2)){ee("qmark",U);continue}if(G&&"paren"===G.type){const e=V();let r=U;if("<"===e&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===G.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(q()))&&(r=`\\${U}`),J({type:"text",value:U,output:r});continue}if(!0!==d.dot&&("slash"===G.type||"bos"===G.type)){J({type:"qmark",value:U,output:P});continue}J({type:"qmark",value:U,output:k});continue}if("!"===U){if(!0!==d.noextglob&&"("===V()&&("?"!==V(2)||!/[!=<:]/.test(V(3)))){ee("negate",U);continue}if(!0!==d.nonegate&&0===j.index){Y();continue}}if("+"===U){if(!0!==d.noextglob&&"("===V()&&"?"!==V(2)){ee("plus",U);continue}if(G&&"("===G.value||!1===d.regex){J({type:"plus",value:U,output:_});continue}if(G&&("bracket"===G.type||"paren"===G.type||"brace"===G.type)||j.parens>0){J({type:"plus",value:U});continue}J({type:"plus",value:_});continue}if("@"===U){if(!0!==d.noextglob&&"("===V()&&"?"!==V(2)){J({type:"at",extglob:!0,value:U,output:""});continue}J({type:"text",value:U});continue}if("*"!==U){"$"!==U&&"^"!==U||(U=`\\${U}`);const e=o.exec(q());e&&(U+=e[0],j.index+=e[0].length),J({type:"text",value:U});continue}if(G&&("globstar"===G.type||!0===G.star)){G.type="star",G.star=!0,G.value+=U,G.output=$,j.backtrack=!0,j.globstar=!0,z(U);continue}let e=q();if(!0!==d.noextglob&&/^\([^?]/.test(e)){ee("star",U);continue}if("star"===G.type){if(!0===d.noglobstar){z(U);continue}const t=G.prev,r=t.prev,n="slash"===t.type||"bos"===t.type,o=r&&("star"===r.type||"globstar"===r.type);if(!0===d.bash&&(!n||e[0]&&"/"!==e[0])){J({type:"star",value:U,output:""});continue}const i=j.braces>0&&("comma"===t.type||"brace"===t.type),s=B.length&&("pipe"===t.type||"paren"===t.type);if(!n&&"paren"!==t.type&&!i&&!s){J({type:"star",value:U,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[j.index+4];if(t&&"/"!==t)break;e=e.slice(3),z("/**",3)}if("bos"===t.type&&W()){G.type="globstar",G.value+=U,G.output=L(d),j.output=G.output,j.globstar=!0,z(U);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!o&&W()){j.output=j.output.slice(0,-(t.output+G.output).length),t.output=`(?:${t.output}`,G.type="globstar",G.output=L(d)+(d.strictSlashes?")":"|$)"),G.value+=U,j.globstar=!0,j.output+=t.output+G.output,z(U);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const r=void 0!==e[1]?"|$":"";j.output=j.output.slice(0,-(t.output+G.output).length),t.output=`(?:${t.output}`,G.type="globstar",G.output=`${L(d)}${x}|${x}${r})`,G.value+=U,j.output+=t.output+G.output,j.globstar=!0,z(U+K()),J({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){G.type="globstar",G.value+=U,G.output=`(?:^|${x}|${L(d)}${x})`,j.output=G.output,j.globstar=!0,z(U+K()),J({type:"slash",value:"/",output:""});continue}j.output=j.output.slice(0,-G.output.length),G.type="globstar",G.output=L(d),G.value+=U,j.output+=G.output,j.globstar=!0,z(U);continue}const r={type:"star",value:U,output:$};!0!==d.bash?!G||"bracket"!==G.type&&"paren"!==G.type||!0!==d.regex?(j.index!==j.start&&"slash"!==G.type&&"dot"!==G.type||("dot"===G.type?(j.output+=R,G.output+=R):!0===d.dot?(j.output+=C,G.output+=C):(j.output+=M,G.output+=M),"*"!==V()&&(j.output+=A,G.output+=A)),J(r)):(r.output=U,J(r)):(r.output=".*?","bos"!==G.type&&"slash"!==G.type||(r.output=M+r.output),J(r))}for(;j.brackets>0;){if(!0===d.strictBrackets)throw new SyntaxError(c("closing","]"));j.output=t.escapeLast(j.output,"["),Z("brackets")}for(;j.parens>0;){if(!0===d.strictBrackets)throw new SyntaxError(c("closing",")"));j.output=t.escapeLast(j.output,"("),Z("parens")}for(;j.braces>0;){if(!0===d.strictBrackets)throw new SyntaxError(c("closing","}"));j.output=t.escapeLast(j.output,"{"),Z("braces")}if(!0===d.strictSlashes||"star"!==G.type&&"bracket"!==G.type||J({type:"maybe_slash",value:"",output:`${x}?`}),!0===j.backtrack){j.output="";for(const e of j.tokens)j.output+=null!=e.output?e.output:e.value,e.suffix&&(j.output+=e.suffix)}return j};return h.fastpaths=(n,o)=>{const i={...o},a="number"==typeof i.maxLength?Math.min(r,i.maxLength):r,c=n.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);n=s[n]||n;const l=t.isWindows(o),{DOT_LITERAL:u,SLASH_LITERAL:d,ONE_CHAR:p,DOTS_SLASH:f,NO_DOT:m,NO_DOTS:h,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:b}=e.globChars(l),v=i.dot?h:m,w=i.dot?g:m,S=i.capture?"":"?:";let E=!0===i.bash?".*?":y;i.capture&&(E=`(${E})`);const _=e=>!0===e.noglobstar?E:`(${S}(?:(?!${b}${e.dot?f:u}).)*?)`,x=e=>{switch(e){case"*":return`${v}${p}${E}`;case".*":return`${u}${p}${E}`;case"*.*":return`${v}${E}${u}${p}${E}`;case"*/*":return`${v}${E}${d}${p}${w}${E}`;case"**":return v+_(i);case"**/*":return`(?:${v}${_(i)}${d})?${w}${p}${E}`;case"**/*.*":return`(?:${v}${_(i)}${d})?${w}${E}${u}${p}${E}`;case"**/.*":return`(?:${v}${_(i)}${d})?${u}${p}${E}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=x(t[1]);if(!r)return;return r+u+t[2]}}},A=t.removePrefix(n,{negated:!1,prefix:""});let T=x(A);return T&&!0!==i.strictSlashes&&(T+=`${d}?`),T},lt=h}function Et(){if(pt)return dt;pt=1;const e=r,t=function(){if(ct)return at;ct=1;const e=wt(),{CHAR_ASTERISK:t,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:o,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:d,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:f,CHAR_RIGHT_PARENTHESES:m,CHAR_RIGHT_SQUARE_BRACKET:h}=vt(),g=e=>e===a||e===n,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return at=(b,v)=>{const w=v||{},S=b.length-1,E=!0===w.parts||!0===w.scanToEnd,_=[],x=[],A=[];let T,O,R=b,C=-1,k=0,P=0,I=!1,D=!1,L=!1,M=!1,N=!1,$=!1,j=!1,B=!1,F=!1,H=!1,U=0,G={value:"",depth:0,isGlob:!1};const W=()=>C>=S,V=()=>R.charCodeAt(C+1),K=()=>(T=O,R.charCodeAt(++C));for(;C<S;){let e;if(O=K(),O!==n){if(!0===$||O===c){for(U++;!0!==W()&&(O=K());)if(O!==n)if(O!==c){if(!0!==$&&O===i&&(O=K())===i){if(I=G.isBrace=!0,L=G.isGlob=!0,H=!0,!0===E)continue;break}if(!0!==$&&O===o){if(I=G.isBrace=!0,L=G.isGlob=!0,H=!0,!0===E)continue;break}if(O===f&&(U--,0===U)){$=!1,I=G.isBrace=!0,H=!0;break}}else U++;else j=G.backslashes=!0,K();if(!0===E)continue;break}if(O!==a){if(!0!==w.noext&&!0==(O===d||O===r||O===t||O===p||O===s)&&V()===l){if(L=G.isGlob=!0,M=G.isExtglob=!0,H=!0,O===s&&C===k&&(F=!0),!0===E){for(;!0!==W()&&(O=K());)if(O!==n){if(O===m){L=G.isGlob=!0,H=!0;break}}else j=G.backslashes=!0,O=K();continue}break}if(O===t){if(T===t&&(N=G.isGlobstar=!0),L=G.isGlob=!0,H=!0,!0===E)continue;break}if(O===p){if(L=G.isGlob=!0,H=!0,!0===E)continue;break}if(O===u){for(;!0!==W()&&(e=K());)if(e!==n){if(e===h){D=G.isBracket=!0,L=G.isGlob=!0,H=!0;break}}else j=G.backslashes=!0,K();if(!0===E)continue;break}if(!0===w.nonegate||O!==s||C!==k){if(!0!==w.noparen&&O===l){if(L=G.isGlob=!0,!0===E){for(;!0!==W()&&(O=K());)if(O!==l){if(O===m){H=!0;break}}else j=G.backslashes=!0,O=K();continue}break}if(!0===L){if(H=!0,!0===E)continue;break}}else B=G.negated=!0,k++}else{if(_.push(C),x.push(G),G={value:"",depth:0,isGlob:!1},!0===H)continue;if(T===i&&C===k+1){k+=2;continue}P=C+1}}else j=G.backslashes=!0,O=K(),O===c&&($=!0)}!0===w.noext&&(M=!1,L=!1);let q=R,z="",X="";k>0&&(z=R.slice(0,k),R=R.slice(k),P-=k),q&&!0===L&&P>0?(q=R.slice(0,P),X=R.slice(P)):!0===L?(q="",X=R):q=R,q&&""!==q&&"/"!==q&&q!==R&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===w.unescape&&(X&&(X=e.removeBackslashes(X)),q&&!0===j&&(q=e.removeBackslashes(q)));const Y={prefix:z,input:b,start:k,base:q,glob:X,isBrace:I,isBracket:D,isGlob:L,isExtglob:M,isGlobstar:N,negated:B,negatedExtglob:F};if(!0===w.tokens&&(Y.maxDepth=0,g(O)||x.push(G),Y.tokens=x),!0===w.parts||!0===w.tokens){let e;for(let t=0;t<_.length;t++){const r=e?e+1:k,n=_[t],o=b.slice(r,n);w.tokens&&(0===t&&0!==k?(x[t].isPrefix=!0,x[t].value=z):x[t].value=o,y(x[t]),Y.maxDepth+=x[t].depth),0===t&&""===o||A.push(o),e=n}if(e&&e+1<b.length){const t=b.slice(e+1);A.push(t),w.tokens&&(x[x.length-1].value=t,y(x[x.length-1]),Y.maxDepth+=x[x.length-1].depth)}Y.slashes=_,Y.parts=A}return Y},at}(),n=St(),o=wt(),i=vt(),s=(e,t,r=!1)=>{if(Array.isArray(e)){const n=e.map(e=>s(e,t,r)),o=e=>{for(const t of n){const r=t(e);if(r)return r}return!1};return o}const n=(i=e)&&"object"==typeof i&&!Array.isArray(i)&&e.tokens&&e.input;var i;if(""===e||"string"!=typeof e&&!n)throw new TypeError("Expected pattern to be a non-empty string");const a=t||{},c=o.isWindows(t),l=n?s.compileRe(e,t):s.makeRe(e,t,!1,!0),u=l.state;delete l.state;let d=()=>!1;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};d=s(a.ignore,e,r)}const p=(r,n=!1)=>{const{isMatch:o,match:i,output:p}=s.test(r,l,t,{glob:e,posix:c}),f={glob:e,state:u,regex:l,posix:c,input:r,output:p,match:i,isMatch:o};return"function"==typeof a.onResult&&a.onResult(f),!1===o?(f.isMatch=!1,!!n&&f):d(r)?("function"==typeof a.onIgnore&&a.onIgnore(f),f.isMatch=!1,!!n&&f):("function"==typeof a.onMatch&&a.onMatch(f),!n||f)};return r&&(p.state=u),p};return s.test=(e,t,r,{glob:n,posix:i}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=r||{},c=a.format||(i?o.toPosixSlashes:null);let l=e===n,u=l&&c?c(e):e;return!1===l&&(u=c?c(e):e,l=u===n),!1!==l&&!0!==a.capture||(l=!0===a.matchBase||!0===a.basename?s.matchBase(e,t,r,i):t.exec(u)),{isMatch:Boolean(l),match:l,output:u}},s.matchBase=(t,r,n,i=o.isWindows(n))=>(r instanceof RegExp?r:s.makeRe(r,n)).test(e.basename(t)),s.isMatch=(e,t,r)=>s(t,r)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):n(e,{...t,fastpaths:!1}),s.scan=(e,r)=>t(e,r),s.compileRe=(e,t,r=!1,n=!1)=>{if(!0===r)return e.output;const o=t||{},i=o.contains?"":"^",a=o.contains?"":"$";let c=`${i}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const l=s.toRegex(c,t);return!0===n&&(l.state=e),l},s.makeRe=(e,t={},r=!1,o=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(i.output=n.fastpaths(e,t)),i.output||(i=n(e,t)),s.compileRe(i,t,r,o)},s.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},s.constants=i,dt=s}function _t(){return mt?ft:(mt=1,ft=Et())}function xt(){if(yt)return Oe;yt=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.isAbsolute=Oe.partitionAbsoluteAndRelative=Oe.removeDuplicateSlashes=Oe.matchAny=Oe.convertPatternsToRe=Oe.makeRe=Oe.getPatternParts=Oe.expandBraceExpansion=Oe.expandPatternsWithBraceExpansion=Oe.isAffectDepthOfReadingPattern=Oe.endsWithSlashGlobStar=Oe.hasGlobStar=Oe.getBaseDirectory=Oe.isPatternRelatedToParentDirectory=Oe.getPatternsOutsideCurrentDirectory=Oe.getPatternsInsideCurrentDirectory=Oe.getPositivePatterns=Oe.getNegativePatterns=Oe.isPositivePattern=Oe.isNegativePattern=Oe.convertToNegativePattern=Oe.convertToPositivePattern=Oe.isDynamicPattern=Oe.isStaticPattern=void 0;const e=r,t=ke(),o=function(){if(gt)return ht;gt=1;const e=n,t=nt(),r=_t(),o=wt(),i=e=>""===e||"./"===e,s=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},a=(e,t,n)=>{t=[].concat(t),e=[].concat(e);let o=new Set,i=new Set,s=new Set,a=0,c=e=>{s.add(e.output),n&&n.onResult&&n.onResult(e)};for(let s=0;s<t.length;s++){let l=r(String(t[s]),{...n,onResult:c},!0),u=l.state.negated||l.state.negatedExtglob;u&&a++;for(let t of e){let e=l(t,!0);(u?!e.isMatch:e.isMatch)&&(u?o.add(e.output):(o.delete(e.output),i.add(e.output)))}}let l=(a===t.length?[...s]:[...i]).filter(e=>!o.has(e));if(n&&0===l.length){if(!0===n.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===n.nonull||!0===n.nullglob)return n.unescape?t.map(e=>e.replace(/\\/g,"")):t}return l};return a.match=a,a.matcher=(e,t)=>r(e,t),a.any=a.isMatch=(e,t,n)=>r(t,n)(e),a.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],i=new Set(a(e,t,{...r,onResult:e=>{r.onResult&&r.onResult(e),o.push(e.output)}}));for(let e of o)i.has(e)||n.add(e);return[...n]},a.contains=(t,r,n)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);if(Array.isArray(r))return r.some(e=>a.contains(t,e,n));if("string"==typeof r){if(i(t)||i(r))return!1;if(t.includes(r)||t.startsWith("./")&&t.slice(2).includes(r))return!0}return a.isMatch(t,r,{...n,contains:!0})},a.matchKeys=(e,t,r)=>{if(!o.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=a(Object.keys(e),t,r),i={};for(let t of n)i[t]=e[t];return i},a.some=(e,t,n)=>{let o=[].concat(e);for(let e of[].concat(t)){let t=r(String(e),n);if(o.some(e=>t(e)))return!0}return!1},a.every=(e,t,n)=>{let o=[].concat(e);for(let e of[].concat(t)){let t=r(String(e),n);if(!o.every(e=>t(e)))return!1}return!0},a.all=(t,n,o)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);return[].concat(n).every(e=>r(e,o)(t))},a.capture=(e,t,n)=>{let i=o.isWindows(n),s=r.makeRe(String(e),{...n,capture:!0}).exec(i?o.toPosixSlashes(t):t);if(s)return s.slice(1).map(e=>void 0===e?"":e)},a.makeRe=(...e)=>r.makeRe(...e),a.scan=(...e)=>r.scan(...e),a.parse=(e,n)=>{let o=[];for(let i of[].concat(e||[]))for(let e of t(String(i),n))o.push(r.parse(e,n));return o},a.braces=(e,r)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return r&&!0===r.nobrace||!s(e)?[e]:t(e,r)},a.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return a.braces(e,{...t,expand:!0})},a.hasBraces=s,ht=a}(),i=/[*?]|^!/,s=/\[[^[]*]/,a=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,c=/[!*+?@]\([^(]*\)/,l=/,|\.\./,u=/(?!^)\/{2,}/g;function d(e,t={}){return!p(e,t)}function p(e,t={}){return""!==e&&(!(!1!==t.caseSensitiveMatch&&!e.includes("\\"))||(!!(i.test(e)||s.test(e)||a.test(e))||(!(!1===t.extglob||!c.test(e))||!(!1===t.braceExpansion||!function(e){const t=e.indexOf("{");if(-1===t)return!1;const r=e.indexOf("}",t+1);if(-1===r)return!1;const n=e.slice(t,r);return l.test(n)}(e)))))}function f(e){return e.startsWith("!")&&"("!==e[1]}function m(e){return!f(e)}function h(e){return e.startsWith("..")||e.startsWith("./..")}function g(e){return e.endsWith("/**")}function y(e){const t=o.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((e,t)=>e.length-t.length),t.filter(e=>""!==e)}function b(e,t){return o.makeRe(e,t)}function v(t){return e.isAbsolute(t)}return Oe.isStaticPattern=d,Oe.isDynamicPattern=p,Oe.convertToPositivePattern=function(e){return f(e)?e.slice(1):e},Oe.convertToNegativePattern=function(e){return"!"+e},Oe.isNegativePattern=f,Oe.isPositivePattern=m,Oe.getNegativePatterns=function(e){return e.filter(f)},Oe.getPositivePatterns=function(e){return e.filter(m)},Oe.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!h(e))},Oe.getPatternsOutsideCurrentDirectory=function(e){return e.filter(h)},Oe.isPatternRelatedToParentDirectory=h,Oe.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},Oe.hasGlobStar=function(e){return e.includes("**")},Oe.endsWithSlashGlobStar=g,Oe.isAffectDepthOfReadingPattern=function(t){const r=e.basename(t);return g(t)||d(r)},Oe.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(y(t)),[])},Oe.expandBraceExpansion=y,Oe.getPatternParts=function(e,t){let{parts:r}=o.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===r.length&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r},Oe.makeRe=b,Oe.convertPatternsToRe=function(e,t){return e.map(e=>b(e,t))},Oe.matchAny=function(e,t){return t.some(t=>t.test(e))},Oe.removeDuplicateSlashes=function(e){return e.replace(u,"/")},Oe.partitionAbsoluteAndRelative=function(e){const t=[],r=[];for(const n of e)v(n)?t.push(n):r.push(n);return[t,r]},Oe.isAbsolute=v,Oe}var At,Tt,Ot,Rt={};function Ct(){if(Tt)return At;Tt=1;const e=o.PassThrough,t=Array.prototype.slice;function r(t,n){if(Array.isArray(t))for(let e=0,o=t.length;e<o;e++)t[e]=r(t[e],n);else{if(!t._readableState&&t.pipe&&(t=t.pipe(e(n))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}return At=function(){const n=[],o=t.call(arguments);let i=!1,s=o[o.length-1];s&&!Array.isArray(s)&&null==s.pipe?o.pop():s={};const a=!1!==s.end,c=!0===s.pipeError;null==s.objectMode&&(s.objectMode=!0);null==s.highWaterMark&&(s.highWaterMark=65536);const l=e(s);function u(){for(let e=0,t=arguments.length;e<t;e++)n.push(r(arguments[e],s));return d(),this}function d(){if(i)return;i=!0;let e=n.shift();if(!e)return void process.nextTick(p);Array.isArray(e)||(e=[e]);let t=e.length+1;function r(){--t>0||(i=!1,d())}function o(e){function t(){e.removeListener("merge2UnpipeEnd",t),e.removeListener("end",t),c&&e.removeListener("error",n),r()}function n(e){l.emit("error",e)}if(e._readableState.endEmitted)return r();e.on("merge2UnpipeEnd",t),e.on("end",t),c&&e.on("error",n),e.pipe(l,{end:!1}),e.resume()}for(let t=0;t<e.length;t++)o(e[t]);r()}function p(){i=!1,l.emit("queueDrain"),a&&l.end()}l.setMaxListeners(0),l.add=u,l.on("unpipe",function(e){e.emit("merge2UnpipeEnd")}),o.length&&u.apply(null,o);return l},At}var kt,Pt,It,Dt={};function Lt(){if(kt)return Dt;return kt=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.isEmpty=Dt.isString=void 0,Dt.isString=function(e){return"string"==typeof e},Dt.isEmpty=function(e){return""===e},Dt}function Mt(){if(Pt)return ue;Pt=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.string=ue.stream=ue.pattern=ue.path=ue.fs=ue.errno=ue.array=void 0;const e=pe();ue.array=e;const t=he();ue.errno=t;const r=function(){if(ge)return ye;ge=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return ye.createDirentFromStats=function(t,r){return new e(t,r)},ye}();ue.fs=r;const n=we();ue.path=n;const o=xt();ue.pattern=o;const i=function(){if(Ot)return Rt;Ot=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.merge=void 0;const e=Ct();function t(e){e.forEach(e=>e.emit("close"))}return Rt.merge=function(r){const n=e(r);return r.forEach(e=>{e.once("error",e=>n.emit("error",e))}),n.once("close",()=>t(r)),n.once("end",()=>t(r)),n},Rt}();ue.stream=i;const s=Lt();return ue.string=s,ue}var Nt,$t={},jt={},Bt={},Ft={},Ht={},Ut={},Gt={},Wt={},Vt={};function Kt(){if(Nt)return Vt;function e(e,t){e(t)}function t(e,t){e(null,t)}return Nt=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.read=void 0,Vt.read=function(r,n,o){n.fs.lstat(r,(i,s)=>{null===i?s.isSymbolicLink()&&n.followSymbolicLink?n.fs.stat(r,(r,i)=>{if(null!==r)return n.throwErrorOnBrokenSymbolicLink?void e(o,r):void t(o,s);n.markSymbolicLink&&(i.isSymbolicLink=()=>!0),t(o,i)}):t(o,s):e(o,i)})},Vt}var qt,zt={};var Xt,Yt,Qt,Zt,Jt,er,tr,rr={},nr={};function or(){if(Yt)return rr;Yt=1,Object.defineProperty(rr,"__esModule",{value:!0});const e=(Xt||(Xt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(nr)),nr);return rr.default=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return null!=e?e:t}},rr}function ir(){if(Qt)return Wt;Qt=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.statSync=Wt.stat=Wt.Settings=void 0;const e=Kt(),t=(qt||(qt=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.read=void 0,zt.read=function(e,t){const r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{const r=t.fs.statSync(e);return t.markSymbolicLink&&(r.isSymbolicLink=()=>!0),r}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw e}}),zt),r=or();function n(e={}){return e instanceof r.default?e:new r.default(e)}return Wt.Settings=r.default,Wt.stat=function(t,r,o){"function"!=typeof r?e.read(t,n(r),o):e.read(t,n(),r)},Wt.statSync=function(e,r){const o=n(r);return t.read(e,o)},Wt}
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
*/function tt(){if(Be)return je;Be=1;const e=n,t=et(),r=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),o=e=>"number"==typeof e||"string"==typeof e&&""!==e,i=e=>Number.isInteger(+e),s=e=>{let t=`${e}`,r=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++r];);return r>0},a=(e,t,r)=>{if(t>0){let r="-"===e[0]?"-":"";r&&(e=e.slice(1)),e=r+e.padStart(r?t-1:t,"0")}return!1===r?String(e):e},c=(e,t)=>{let r="-"===e[0]?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},l=(e,r,n,o)=>{if(n)return t(e,r,{wrap:!1,...o});let i=String.fromCharCode(e);return e===r?i:`[${i}-${String.fromCharCode(r)}]`},u=(e,r,n)=>{if(Array.isArray(e)){let t=!0===n.wrap,r=n.capture?"":"?:";return t?`(${r}${e.join("|")})`:e.join("|")}return t(e,r,n)},d=(...t)=>new RangeError("Invalid range arguments: "+e.inspect(...t)),p=(e,t,r)=>{if(!0===r.strictRanges)throw d([e,t]);return[]},f=(e,t,r=1,n={})=>{let o=Number(e),i=Number(t);if(!Number.isInteger(o)||!Number.isInteger(i)){if(!0===n.strictRanges)throw d([e,t]);return[]}0===o&&(o=0),0===i&&(i=0);let p=o>i,f=String(e),m=String(t),h=String(r);r=Math.max(Math.abs(r),1);let g=s(f)||s(m)||s(h),y=g?Math.max(f.length,m.length,h.length):0,b=!1===g&&!1===((e,t,r)=>"string"==typeof e||"string"==typeof t||!0===r.stringify)(e,t,n),v=n.transform||(e=>t=>!0===e?Number(t):String(t))(b);if(n.toRegex&&1===r)return l(c(e,y),c(t,y),!0,n);let w={negatives:[],positives:[]},S=e=>w[e<0?"negatives":"positives"].push(Math.abs(e)),E=[],_=0;for(;p?o>=i:o<=i;)!0===n.toRegex&&r>1?S(o):E.push(a(v(o,_),y,b)),o=p?o-r:o+r,_++;return!0===n.toRegex?r>1?((e,t,r)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let n,o=t.capture?"":"?:",i="",s="";return e.positives.length&&(i=e.positives.map(e=>c(String(e),r)).join("|")),e.negatives.length&&(s=`-(${o}${e.negatives.map(e=>c(String(e),r)).join("|")})`),n=i&&s?`${i}|${s}`:i||s,t.wrap?`(${o}${n})`:n})(w,n,y):u(E,null,{wrap:!1,...n}):E},m=(e,t,n,s={})=>{if(null==t&&o(e))return[e];if(!o(e)||!o(t))return p(e,t,s);if("function"==typeof n)return m(e,t,1,{transform:n});if(r(n))return m(e,t,0,n);let a={...s};return!0===a.capture&&(a.wrap=!0),n=n||a.step||1,i(n)?i(e)&&i(t)?f(e,t,n,a):((e,t,r=1,n={})=>{if(!i(e)&&e.length>1||!i(t)&&t.length>1)return p(e,t,n);let o=n.transform||(e=>String.fromCharCode(e)),s=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),c=s>a,d=Math.min(s,a),f=Math.max(s,a);if(n.toRegex&&1===r)return l(d,f,!1,n);let m=[],h=0;for(;c?s>=a:s<=a;)m.push(o(s,h)),s=c?s-r:s+r,h++;return!0===n.toRegex?u(m,null,{wrap:!1,options:n}):m})(e,t,Math.max(Math.abs(n),1),a):null==n||r(n)?m(e,t,1,n):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(n,a)};return je=m}function rt(){if(qe)return Ke;qe=1;const e=Ze(),{MAX_LENGTH:t,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:o,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:s,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:f,CHAR_NO_BREAK_SPACE:m,CHAR_ZERO_WIDTH_NOBREAK_SPACE:h}=Ve?We:(Ve=1,We={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"});return Ke=(g,y={})=>{if("string"!=typeof g)throw new TypeError("Expected a string");const b=y||{},v="number"==typeof b.maxLength?Math.min(t,b.maxLength):t;if(g.length>v)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${v})`);const w={type:"root",input:g,nodes:[]},S=[w];let E=w,_=w,x=0;const A=g.length;let T,O=0,R=0;const C=()=>g[O++],k=e=>{if("text"===e.type&&"dot"===_.type&&(_.type="text"),!_||"text"!==_.type||"text"!==e.type)return E.nodes.push(e),e.parent=E,e.prev=_,_=e,e;_.value+=e.value};for(k({type:"bos"});O<A;)if(E=S[S.length-1],T=C(),T!==h&&T!==m)if(T!==r)if(T!==d){if(T===u){let e;for(x++;O<A&&(e=C());)if(T+=e,e!==u)if(e!==r){if(e===d&&(x--,0===x))break}else T+=C();else x++;k({type:"text",value:T});continue}if(T!==s)if(T!==a){if(T===p||T===f||T===n){const e=T;let t;for(!0!==y.keepQuotes&&(T="");O<A&&(t=C());)if(t!==r){if(t===e){!0===y.keepQuotes&&(T+=t);break}T+=t}else T+=t+C();k({type:"text",value:T});continue}if(T===c){R++;const e=_.value&&"$"===_.value.slice(-1)||!0===E.dollar;E=k({type:"brace",open:!0,close:!1,dollar:e,depth:R,commas:0,ranges:0,nodes:[]}),S.push(E),k({type:"open",value:T});continue}if(T===l){if("brace"!==E.type){k({type:"text",value:T});continue}const e="close";E=S.pop(),E.close=!0,k({type:e,value:T}),R--,E=S[S.length-1];continue}if(T===o&&R>0){if(E.ranges>0){E.ranges=0;const t=E.nodes.shift();E.nodes=[t,{type:"text",value:e(E)}]}k({type:"comma",value:T}),E.commas++}else{if(T===i&&R>0&&0===E.commas){const e=E.nodes;if(0===R||0===e.length){k({type:"text",value:T});continue}if("dot"===_.type){if(E.range=[],_.value+=T,_.type="range",3!==E.nodes.length&&5!==E.nodes.length){E.invalid=!0,E.ranges=0,_.type="text";continue}E.ranges++,E.args=[];continue}if("range"===_.type){e.pop();const t=e[e.length-1];t.value+=_.value+T,_=t,E.ranges--;continue}k({type:"dot",value:T});continue}k({type:"text",value:T})}}else{if("paren"!==E.type){k({type:"text",value:T});continue}E=S.pop(),k({type:"text",value:T}),E=S[S.length-1]}else E=k({type:"paren",nodes:[]}),S.push(E),k({type:"text",value:T})}else k({type:"text",value:"\\"+T});else k({type:"text",value:(y.keepEscaping?T:"")+C()});do{if(E=S.pop(),"root"!==E.type){E.nodes.forEach(e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});const e=S[S.length-1],t=e.nodes.indexOf(E);e.nodes.splice(t,1,...E.nodes)}}while(S.length>0);return k({type:"eos"}),w},Ke}function nt(){if(Xe)return ze;Xe=1;const e=Ze(),t=function(){if(He)return Fe;He=1;const e=tt(),t=Qe();return Fe=(r,n={})=>{const o=(r,i={})=>{const s=t.isInvalidBrace(i),a=!0===r.invalid&&!0===n.escapeInvalid,c=!0===s||!0===a,l=!0===n.escapeInvalid?"\\":"";let u="";if(!0===r.isOpen)return l+r.value;if(!0===r.isClose)return console.log("node.isClose",l,r.value),l+r.value;if("open"===r.type)return c?l+r.value:"(";if("close"===r.type)return c?l+r.value:")";if("comma"===r.type)return"comma"===r.prev.type?"":c?r.value:"|";if(r.value)return r.value;if(r.nodes&&r.ranges>0){const o=t.reduce(r.nodes),i=e(...o,{...n,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return o.length>1&&i.length>1?`(${i})`:i}if(r.nodes)for(const e of r.nodes)u+=o(e,r);return u};return o(r)},Fe}(),r=function(){if(Ge)return Ue;Ge=1;const e=tt(),t=Ze(),r=Qe(),n=(e="",t="",o=!1)=>{const i=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return o?r.flatten(t).map(e=>`{${e}}`):t;for(const r of e)if(Array.isArray(r))for(const e of r)i.push(n(e,t,o));else for(let e of t)!0===o&&"string"==typeof e&&(e=`{${e}}`),i.push(Array.isArray(e)?n(r,e,o):r+e);return r.flatten(i)};return Ue=(o,i={})=>{const s=void 0===i.rangeLimit?1e3:i.rangeLimit,a=(o,c={})=>{o.queue=[];let l=c,u=c.queue;for(;"brace"!==l.type&&"root"!==l.type&&l.parent;)l=l.parent,u=l.queue;if(o.invalid||o.dollar)return void u.push(n(u.pop(),t(o,i)));if("brace"===o.type&&!0!==o.invalid&&2===o.nodes.length)return void u.push(n(u.pop(),["{}"]));if(o.nodes&&o.ranges>0){const a=r.reduce(o.nodes);if(r.exceedsLimit(...a,i.step,s))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=e(...a,i);return 0===c.length&&(c=t(o,i)),u.push(n(u.pop(),c)),void(o.nodes=[])}const d=r.encloseBrace(o);let p=o.queue,f=o;for(;"brace"!==f.type&&"root"!==f.type&&f.parent;)f=f.parent,p=f.queue;for(let e=0;e<o.nodes.length;e++){const t=o.nodes[e];"comma"!==t.type||"brace"!==o.type?"close"!==t.type?t.value&&"open"!==t.type?p.push(n(p.pop(),t.value)):t.nodes&&a(t,o):u.push(n(u.pop(),p,d)):(1===e&&p.push(""),p.push(""))}return p};return r.flatten(a(o))},Ue}(),n=rt(),o=(e,t={})=>{let r=[];if(Array.isArray(e))for(const n of e){const e=o.create(n,t);Array.isArray(e)?r.push(...e):r.push(e)}else r=[].concat(o.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(r=[...new Set(r)]),r};return o.parse=(e,t={})=>n(e,t),o.stringify=(t,r={})=>e("string"==typeof t?o.parse(t,r):t,r),o.compile=(e,r={})=>("string"==typeof e&&(e=o.parse(e,r)),t(e,r)),o.expand=(e,t={})=>{"string"==typeof e&&(e=o.parse(e,t));let n=r(e,t);return!0===t.noempty&&(n=n.filter(Boolean)),!0===t.nodupes&&(n=[...new Set(n)]),n},o.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?o.compile(e,t):o.expand(e,t),ze=o}var ot,it,st,at,ct,lt,ut,dt,pt,ft,mt,ht,gt,yt,bt={};function vt(){if(it)return ot;it=1;const e=r,t="\\\\/",n=`[^${t}]`,o="\\.",i="\\/",s="[^/]",a=`(?:${i}|$)`,c=`(?:^|${i})`,l=`${o}{1,2}${a}`,u={DOT_LITERAL:o,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:i,ONE_CHAR:"(?=.)",QMARK:s,END_ANCHOR:a,DOTS_SLASH:l,NO_DOT:`(?!${o})`,NO_DOTS:`(?!${c}${l})`,NO_DOT_SLASH:`(?!${o}{0,1}${a})`,NO_DOTS_SLASH:`(?!${l})`,QMARK_NO_DOT:`[^.${i}]`,STAR:`${s}*?`,START_ANCHOR:c},d={...u,SLASH_LITERAL:`[${t}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${o}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${t}])${o}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`};return ot={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,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"},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:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},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:e.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?d:u}}function wt(){return st||(st=1,function(e){const t=r,n="win32"===process.platform,{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:a}=vt();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>s.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(a,"\\$1"),e.toPosixSlashes=e=>e.replace(o,"/"),e.removeBackslashes=e=>e.replace(i,e=>"\\"===e?"":e),e.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},e.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===n||"\\"===t.sep,e.escapeLast=(t,r,n)=>{const o=t.lastIndexOf(r,n);return-1===o?t:"\\"===t[o-1]?e.escapeLast(t,r,o-1):`${t.slice(0,o)}\\${t.slice(o)}`},e.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},e.wrapOutput=(e,t={},r={})=>{let n=`${r.contains?"":"^"}(?:${e})${r.contains?"":"$"}`;return!0===t.negated&&(n=`(?:^(?!${n}).*$)`),n}}(bt)),bt}function St(){if(ut)return lt;ut=1;const e=vt(),t=wt(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:s}=e,a=(e,r)=>{if("function"==typeof r.expandRange)return r.expandRange(...e,r);e.sort();const n=`[${e.join("-")}]`;try{new RegExp(n)}catch(r){return e.map(e=>t.escapeRegex(e)).join("..")}return n},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,l=e=>{const t=[];let r=0,n=0,o=0,i="",s=!1;for(const a of e)if(!0!==s)if("\\"!==a)if('"'!==a){if(0===o)if("["===a)r++;else if("]"===a&&r>0)r--;else if(0===r)if("("===a)n++;else if(")"===a&&n>0)n--;else if("|"===a&&0===n){t.push(i),i="";continue}i+=a}else o=1===o?0:1,i+=a;else i+=a,s=!0;else i+=a,s=!1;return t.push(i),t},u=e=>{let t=e.trim(),r=!0;for(;!0===r;)r=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),r=!0);if((e=>{let t=!1;for(const r of e)if(!0!==t)if("\\"!==r){if(/[?*+@!()[\]{}]/.test(r))return!1}else t=!0;else t=!1;return!0})(t))return t.replace(/\\(.)/g,"$1")},d=(e,t=!0)=>{if("+"!==e[0]&&"*"!==e[0]||"("!==e[1])return;let r=0,n=0,o=0,i=!1;for(let s=1;s<e.length;s++){const a=e[s];if(!0!==i)if("\\"!==a)if('"'!==a){if(1!==o)if("["!==a){if("]"===a&&r>0)r--;else if(!(r>0))if("("!==a){if(")"===a&&(n--,0===n)){if(!0===t&&s!==e.length-1)return;return{type:e[0],body:e.slice(2,s),end:s}}}else n++}else r++}else o=1===o?0:1;else i=!0;else i=!1}},p=e=>{let r=0;const n=[];for(;r<e.length;){const t=d(e.slice(r),!1);if(!t||"*"!==t.type)return;const o=l(t.body).map(e=>e.trim());if(1!==o.length)return;const i=u(o[0]);if(!i||1!==i.length)return;n.push(i),r+=t.end+1}if(n.length<1)return;return`${1===n.length?t.escapeRegex(n[0]):`[${n.map(e=>t.escapeRegex(e)).join("")}]`}*`},f=e=>{let t=0,r=e.trim(),n=d(r);for(;n;)t++,r=n.body.trim(),n=d(r);return t},m=(t,r)=>{if(!1===r.maxExtglobRecursion)return{risky:!1};const n="number"==typeof r.maxExtglobRecursion?r.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,o=l(t).map(e=>e.trim());if(o.length>1&&(o.some(e=>""===e)||o.some(e=>/^[*?]+$/.test(e))||(e=>{const t=e.map(u).filter(Boolean);for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++){const n=t[e],o=t[r],i=n[0];if(i&&n===i.repeat(n.length)&&o===i.repeat(o.length)&&(n===o||n.startsWith(o)||o.startsWith(n)))return!0}return!1})(o)))return{risky:!0};for(const e of o){const t=p(e);if(t)return{risky:!0,safeOutput:t};if(f(e)>n)return{risky:!0}}return{risky:!1}},h=(l,u)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=s[l]||l;const d={...u},p="number"==typeof d.maxLength?Math.min(r,d.maxLength):r;let f=l.length;if(f>p)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${p}`);const g={type:"bos",value:"",output:d.prepend||""},y=[g],b=d.capture?"":"?:",v=t.isWindows(u),w=e.globChars(v),S=e.extglobChars(w),{DOT_LITERAL:E,PLUS_LITERAL:_,SLASH_LITERAL:x,ONE_CHAR:A,DOTS_SLASH:T,NO_DOT:O,NO_DOT_SLASH:R,NO_DOTS_SLASH:C,QMARK:k,QMARK_NO_DOT:P,STAR:I,START_ANCHOR:D}=w,L=e=>`(${b}(?:(?!${D}${e.dot?T:E}).)*?)`,M=d.dot?"":O,N=d.dot?k:P;let $=!0===d.bash?L(d):I;d.capture&&($=`(${$})`),"boolean"==typeof d.noext&&(d.noextglob=d.noext);const j={input:l,index:-1,start:0,dot:!0===d.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};l=t.removePrefix(l,j),f=l.length;const B=[],F=[],H=[];let U,G=g;const W=()=>j.index===f-1,V=j.peek=(e=1)=>l[j.index+e],K=j.advance=()=>l[++j.index]||"",q=()=>l.slice(j.index+1),z=(e="",t=0)=>{j.consumed+=e,j.index+=t},X=e=>{j.output+=null!=e.output?e.output:e.value,z(e.value)},Y=()=>{let e=1;for(;"!"===V()&&("("!==V(2)||"?"===V(3));)K(),j.start++,e++;return e%2!=0&&(j.negated=!0,j.start++,!0)},Q=e=>{j[e]++,H.push(e)},Z=e=>{j[e]--,H.pop()},J=e=>{if("globstar"===G.type){const t=j.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||B.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(j.output=j.output.slice(0,-G.output.length),G.type="star",G.value="*",G.output=$,j.output+=G.output)}if(B.length&&"paren"!==e.type&&(B[B.length-1].inner+=e.value),(e.value||e.output)&&X(e),G&&"text"===G.type&&"text"===e.type)return G.value+=e.value,void(G.output=(G.output||"")+e.value);e.prev=G,y.push(e),G=e},ee=(e,t)=>{const r={...S[t],conditions:1,inner:""};r.prev=G,r.parens=j.parens,r.output=j.output,r.startIndex=j.index,r.tokensIndex=y.length;const n=(d.capture?"(":"")+r.open;Q("parens"),J({type:e,value:t,output:j.output?"":A}),J({type:"paren",extglob:!0,value:K(),output:n}),B.push(r)},te=e=>{const r=l.slice(e.startIndex,j.index+1),n=l.slice(e.startIndex+2,j.index),o=m(n,d);if(("plus"===e.type||"star"===e.type)&&o.risky){const n=o.safeOutput?(e.output?"":A)+(d.capture?`(${o.safeOutput})`:o.safeOutput):void 0,i=y[e.tokensIndex];i.type="text",i.value=r,i.output=n||t.escapeRegex(r);for(let t=e.tokensIndex+1;t<y.length;t++)y[t].value="",y[t].output="",delete y[t].suffix;return j.output=e.output+i.output,j.backtrack=!0,J({type:"paren",extglob:!0,value:U,output:""}),void Z("parens")}let i,s=e.close+(d.capture?")":"");if("negate"===e.type){let t=$;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(t=L(d)),(t!==$||W()||/^\)+$/.test(q()))&&(s=e.close=`)$))${t}`),e.inner.includes("*")&&(i=q())&&/^\.[^\\/.]+$/.test(i)){const r=h(i,{...u,fastpaths:!1}).output;s=e.close=`)${r})${t})`}"bos"===e.prev.type&&(j.negatedExtglob=!0)}J({type:"paren",extglob:!0,value:U,output:s}),Z("parens")};if(!1!==d.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,r=l.replace(i,(t,r,n,o,i,s)=>"\\"===o?(e=!0,t):"?"===o?r?r+o+(i?k.repeat(i.length):""):0===s?N+(i?k.repeat(i.length):""):k.repeat(n.length):"."===o?E.repeat(n.length):"*"===o?r?r+o+(i?$:""):$:r?t:`\\${t}`);return!0===e&&(r=!0===d.unescape?r.replace(/\\/g,""):r.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),r===l&&!0===d.contains?(j.output=l,j):(j.output=t.wrapOutput(r,j,u),j)}for(;!W();){if(U=K(),"\0"===U)continue;if("\\"===U){const e=V();if("/"===e&&!0!==d.bash)continue;if("."===e||";"===e)continue;if(!e){U+="\\",J({type:"text",value:U});continue}const t=/^\\+/.exec(q());let r=0;if(t&&t[0].length>2&&(r=t[0].length,j.index+=r,r%2!=0&&(U+="\\")),!0===d.unescape?U=K():U+=K(),0===j.brackets){J({type:"text",value:U});continue}}if(j.brackets>0&&("]"!==U||"["===G.value||"[^"===G.value)){if(!1!==d.posix&&":"===U){const e=G.value.slice(1);if(e.includes("[")&&(G.posix=!0,e.includes(":"))){const e=G.value.lastIndexOf("["),t=G.value.slice(0,e),r=G.value.slice(e+2),o=n[r];if(o){G.value=t+o,j.backtrack=!0,K(),g.output||1!==y.indexOf(G)||(g.output=A);continue}}}("["===U&&":"!==V()||"-"===U&&"]"===V())&&(U=`\\${U}`),"]"!==U||"["!==G.value&&"[^"!==G.value||(U=`\\${U}`),!0===d.posix&&"!"===U&&"["===G.value&&(U="^"),G.value+=U,X({value:U});continue}if(1===j.quotes&&'"'!==U){U=t.escapeRegex(U),G.value+=U,X({value:U});continue}if('"'===U){j.quotes=1===j.quotes?0:1,!0===d.keepQuotes&&J({type:"text",value:U});continue}if("("===U){Q("parens"),J({type:"paren",value:U});continue}if(")"===U){if(0===j.parens&&!0===d.strictBrackets)throw new SyntaxError(c("opening","("));const e=B[B.length-1];if(e&&j.parens===e.parens+1){te(B.pop());continue}J({type:"paren",value:U,output:j.parens?")":"\\)"}),Z("parens");continue}if("["===U){if(!0!==d.nobracket&&q().includes("]"))Q("brackets");else{if(!0!==d.nobracket&&!0===d.strictBrackets)throw new SyntaxError(c("closing","]"));U=`\\${U}`}J({type:"bracket",value:U});continue}if("]"===U){if(!0===d.nobracket||G&&"bracket"===G.type&&1===G.value.length){J({type:"text",value:U,output:`\\${U}`});continue}if(0===j.brackets){if(!0===d.strictBrackets)throw new SyntaxError(c("opening","["));J({type:"text",value:U,output:`\\${U}`});continue}Z("brackets");const e=G.value.slice(1);if(!0===G.posix||"^"!==e[0]||e.includes("/")||(U=`/${U}`),G.value+=U,X({value:U}),!1===d.literalBrackets||t.hasRegexChars(e))continue;const r=t.escapeRegex(G.value);if(j.output=j.output.slice(0,-G.value.length),!0===d.literalBrackets){j.output+=r,G.value=r;continue}G.value=`(${b}${r}|${G.value})`,j.output+=G.value;continue}if("{"===U&&!0!==d.nobrace){Q("braces");const e={type:"brace",value:U,output:"(",outputIndex:j.output.length,tokensIndex:j.tokens.length};F.push(e),J(e);continue}if("}"===U){const e=F[F.length-1];if(!0===d.nobrace||!e){J({type:"text",value:U,output:U});continue}let t=")";if(!0===e.dots){const e=y.slice(),r=[];for(let t=e.length-1;t>=0&&(y.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&r.unshift(e[t].value);t=a(r,d),j.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const r=j.output.slice(0,e.outputIndex),n=j.tokens.slice(e.tokensIndex);e.value=e.output="\\{",U=t="\\}",j.output=r;for(const e of n)j.output+=e.output||e.value}J({type:"brace",value:U,output:t}),Z("braces"),F.pop();continue}if("|"===U){B.length>0&&B[B.length-1].conditions++,J({type:"text",value:U});continue}if(","===U){let e=U;const t=F[F.length-1];t&&"braces"===H[H.length-1]&&(t.comma=!0,e="|"),J({type:"comma",value:U,output:e});continue}if("/"===U){if("dot"===G.type&&j.index===j.start+1){j.start=j.index+1,j.consumed="",j.output="",y.pop(),G=g;continue}J({type:"slash",value:U,output:x});continue}if("."===U){if(j.braces>0&&"dot"===G.type){"."===G.value&&(G.output=E);const e=F[F.length-1];G.type="dots",G.output+=U,G.value+=U,e.dots=!0;continue}if(j.braces+j.parens===0&&"bos"!==G.type&&"slash"!==G.type){J({type:"text",value:U,output:E});continue}J({type:"dot",value:U,output:E});continue}if("?"===U){if(!(G&&"("===G.value)&&!0!==d.noextglob&&"("===V()&&"?"!==V(2)){ee("qmark",U);continue}if(G&&"paren"===G.type){const e=V();let r=U;if("<"===e&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===G.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(q()))&&(r=`\\${U}`),J({type:"text",value:U,output:r});continue}if(!0!==d.dot&&("slash"===G.type||"bos"===G.type)){J({type:"qmark",value:U,output:P});continue}J({type:"qmark",value:U,output:k});continue}if("!"===U){if(!0!==d.noextglob&&"("===V()&&("?"!==V(2)||!/[!=<:]/.test(V(3)))){ee("negate",U);continue}if(!0!==d.nonegate&&0===j.index){Y();continue}}if("+"===U){if(!0!==d.noextglob&&"("===V()&&"?"!==V(2)){ee("plus",U);continue}if(G&&"("===G.value||!1===d.regex){J({type:"plus",value:U,output:_});continue}if(G&&("bracket"===G.type||"paren"===G.type||"brace"===G.type)||j.parens>0){J({type:"plus",value:U});continue}J({type:"plus",value:_});continue}if("@"===U){if(!0!==d.noextglob&&"("===V()&&"?"!==V(2)){J({type:"at",extglob:!0,value:U,output:""});continue}J({type:"text",value:U});continue}if("*"!==U){"$"!==U&&"^"!==U||(U=`\\${U}`);const e=o.exec(q());e&&(U+=e[0],j.index+=e[0].length),J({type:"text",value:U});continue}if(G&&("globstar"===G.type||!0===G.star)){G.type="star",G.star=!0,G.value+=U,G.output=$,j.backtrack=!0,j.globstar=!0,z(U);continue}let e=q();if(!0!==d.noextglob&&/^\([^?]/.test(e)){ee("star",U);continue}if("star"===G.type){if(!0===d.noglobstar){z(U);continue}const t=G.prev,r=t.prev,n="slash"===t.type||"bos"===t.type,o=r&&("star"===r.type||"globstar"===r.type);if(!0===d.bash&&(!n||e[0]&&"/"!==e[0])){J({type:"star",value:U,output:""});continue}const i=j.braces>0&&("comma"===t.type||"brace"===t.type),s=B.length&&("pipe"===t.type||"paren"===t.type);if(!n&&"paren"!==t.type&&!i&&!s){J({type:"star",value:U,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[j.index+4];if(t&&"/"!==t)break;e=e.slice(3),z("/**",3)}if("bos"===t.type&&W()){G.type="globstar",G.value+=U,G.output=L(d),j.output=G.output,j.globstar=!0,z(U);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!o&&W()){j.output=j.output.slice(0,-(t.output+G.output).length),t.output=`(?:${t.output}`,G.type="globstar",G.output=L(d)+(d.strictSlashes?")":"|$)"),G.value+=U,j.globstar=!0,j.output+=t.output+G.output,z(U);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const r=void 0!==e[1]?"|$":"";j.output=j.output.slice(0,-(t.output+G.output).length),t.output=`(?:${t.output}`,G.type="globstar",G.output=`${L(d)}${x}|${x}${r})`,G.value+=U,j.output+=t.output+G.output,j.globstar=!0,z(U+K()),J({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){G.type="globstar",G.value+=U,G.output=`(?:^|${x}|${L(d)}${x})`,j.output=G.output,j.globstar=!0,z(U+K()),J({type:"slash",value:"/",output:""});continue}j.output=j.output.slice(0,-G.output.length),G.type="globstar",G.output=L(d),G.value+=U,j.output+=G.output,j.globstar=!0,z(U);continue}const r={type:"star",value:U,output:$};!0!==d.bash?!G||"bracket"!==G.type&&"paren"!==G.type||!0!==d.regex?(j.index!==j.start&&"slash"!==G.type&&"dot"!==G.type||("dot"===G.type?(j.output+=R,G.output+=R):!0===d.dot?(j.output+=C,G.output+=C):(j.output+=M,G.output+=M),"*"!==V()&&(j.output+=A,G.output+=A)),J(r)):(r.output=U,J(r)):(r.output=".*?","bos"!==G.type&&"slash"!==G.type||(r.output=M+r.output),J(r))}for(;j.brackets>0;){if(!0===d.strictBrackets)throw new SyntaxError(c("closing","]"));j.output=t.escapeLast(j.output,"["),Z("brackets")}for(;j.parens>0;){if(!0===d.strictBrackets)throw new SyntaxError(c("closing",")"));j.output=t.escapeLast(j.output,"("),Z("parens")}for(;j.braces>0;){if(!0===d.strictBrackets)throw new SyntaxError(c("closing","}"));j.output=t.escapeLast(j.output,"{"),Z("braces")}if(!0===d.strictSlashes||"star"!==G.type&&"bracket"!==G.type||J({type:"maybe_slash",value:"",output:`${x}?`}),!0===j.backtrack){j.output="";for(const e of j.tokens)j.output+=null!=e.output?e.output:e.value,e.suffix&&(j.output+=e.suffix)}return j};return h.fastpaths=(n,o)=>{const i={...o},a="number"==typeof i.maxLength?Math.min(r,i.maxLength):r,c=n.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);n=s[n]||n;const l=t.isWindows(o),{DOT_LITERAL:u,SLASH_LITERAL:d,ONE_CHAR:p,DOTS_SLASH:f,NO_DOT:m,NO_DOTS:h,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:b}=e.globChars(l),v=i.dot?h:m,w=i.dot?g:m,S=i.capture?"":"?:";let E=!0===i.bash?".*?":y;i.capture&&(E=`(${E})`);const _=e=>!0===e.noglobstar?E:`(${S}(?:(?!${b}${e.dot?f:u}).)*?)`,x=e=>{switch(e){case"*":return`${v}${p}${E}`;case".*":return`${u}${p}${E}`;case"*.*":return`${v}${E}${u}${p}${E}`;case"*/*":return`${v}${E}${d}${p}${w}${E}`;case"**":return v+_(i);case"**/*":return`(?:${v}${_(i)}${d})?${w}${p}${E}`;case"**/*.*":return`(?:${v}${_(i)}${d})?${w}${E}${u}${p}${E}`;case"**/.*":return`(?:${v}${_(i)}${d})?${u}${p}${E}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=x(t[1]);if(!r)return;return r+u+t[2]}}},A=t.removePrefix(n,{negated:!1,prefix:""});let T=x(A);return T&&!0!==i.strictSlashes&&(T+=`${d}?`),T},lt=h}function Et(){if(pt)return dt;pt=1;const e=r,t=function(){if(ct)return at;ct=1;const e=wt(),{CHAR_ASTERISK:t,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:o,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:d,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:f,CHAR_RIGHT_PARENTHESES:m,CHAR_RIGHT_SQUARE_BRACKET:h}=vt(),g=e=>e===a||e===n,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return at=(b,v)=>{const w=v||{},S=b.length-1,E=!0===w.parts||!0===w.scanToEnd,_=[],x=[],A=[];let T,O,R=b,C=-1,k=0,P=0,I=!1,D=!1,L=!1,M=!1,N=!1,$=!1,j=!1,B=!1,F=!1,H=!1,U=0,G={value:"",depth:0,isGlob:!1};const W=()=>C>=S,V=()=>R.charCodeAt(C+1),K=()=>(T=O,R.charCodeAt(++C));for(;C<S;){let e;if(O=K(),O!==n){if(!0===$||O===c){for(U++;!0!==W()&&(O=K());)if(O!==n)if(O!==c){if(!0!==$&&O===i&&(O=K())===i){if(I=G.isBrace=!0,L=G.isGlob=!0,H=!0,!0===E)continue;break}if(!0!==$&&O===o){if(I=G.isBrace=!0,L=G.isGlob=!0,H=!0,!0===E)continue;break}if(O===f&&(U--,0===U)){$=!1,I=G.isBrace=!0,H=!0;break}}else U++;else j=G.backslashes=!0,K();if(!0===E)continue;break}if(O!==a){if(!0!==w.noext&&!0==(O===d||O===r||O===t||O===p||O===s)&&V()===l){if(L=G.isGlob=!0,M=G.isExtglob=!0,H=!0,O===s&&C===k&&(F=!0),!0===E){for(;!0!==W()&&(O=K());)if(O!==n){if(O===m){L=G.isGlob=!0,H=!0;break}}else j=G.backslashes=!0,O=K();continue}break}if(O===t){if(T===t&&(N=G.isGlobstar=!0),L=G.isGlob=!0,H=!0,!0===E)continue;break}if(O===p){if(L=G.isGlob=!0,H=!0,!0===E)continue;break}if(O===u){for(;!0!==W()&&(e=K());)if(e!==n){if(e===h){D=G.isBracket=!0,L=G.isGlob=!0,H=!0;break}}else j=G.backslashes=!0,K();if(!0===E)continue;break}if(!0===w.nonegate||O!==s||C!==k){if(!0!==w.noparen&&O===l){if(L=G.isGlob=!0,!0===E){for(;!0!==W()&&(O=K());)if(O!==l){if(O===m){H=!0;break}}else j=G.backslashes=!0,O=K();continue}break}if(!0===L){if(H=!0,!0===E)continue;break}}else B=G.negated=!0,k++}else{if(_.push(C),x.push(G),G={value:"",depth:0,isGlob:!1},!0===H)continue;if(T===i&&C===k+1){k+=2;continue}P=C+1}}else j=G.backslashes=!0,O=K(),O===c&&($=!0)}!0===w.noext&&(M=!1,L=!1);let q=R,z="",X="";k>0&&(z=R.slice(0,k),R=R.slice(k),P-=k),q&&!0===L&&P>0?(q=R.slice(0,P),X=R.slice(P)):!0===L?(q="",X=R):q=R,q&&""!==q&&"/"!==q&&q!==R&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===w.unescape&&(X&&(X=e.removeBackslashes(X)),q&&!0===j&&(q=e.removeBackslashes(q)));const Y={prefix:z,input:b,start:k,base:q,glob:X,isBrace:I,isBracket:D,isGlob:L,isExtglob:M,isGlobstar:N,negated:B,negatedExtglob:F};if(!0===w.tokens&&(Y.maxDepth=0,g(O)||x.push(G),Y.tokens=x),!0===w.parts||!0===w.tokens){let e;for(let t=0;t<_.length;t++){const r=e?e+1:k,n=_[t],o=b.slice(r,n);w.tokens&&(0===t&&0!==k?(x[t].isPrefix=!0,x[t].value=z):x[t].value=o,y(x[t]),Y.maxDepth+=x[t].depth),0===t&&""===o||A.push(o),e=n}if(e&&e+1<b.length){const t=b.slice(e+1);A.push(t),w.tokens&&(x[x.length-1].value=t,y(x[x.length-1]),Y.maxDepth+=x[x.length-1].depth)}Y.slashes=_,Y.parts=A}return Y},at}(),n=St(),o=wt(),i=vt(),s=(e,t,r=!1)=>{if(Array.isArray(e)){const n=e.map(e=>s(e,t,r)),o=e=>{for(const t of n){const r=t(e);if(r)return r}return!1};return o}const n=(i=e)&&"object"==typeof i&&!Array.isArray(i)&&e.tokens&&e.input;var i;if(""===e||"string"!=typeof e&&!n)throw new TypeError("Expected pattern to be a non-empty string");const a=t||{},c=o.isWindows(t),l=n?s.compileRe(e,t):s.makeRe(e,t,!1,!0),u=l.state;delete l.state;let d=()=>!1;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};d=s(a.ignore,e,r)}const p=(r,n=!1)=>{const{isMatch:o,match:i,output:p}=s.test(r,l,t,{glob:e,posix:c}),f={glob:e,state:u,regex:l,posix:c,input:r,output:p,match:i,isMatch:o};return"function"==typeof a.onResult&&a.onResult(f),!1===o?(f.isMatch=!1,!!n&&f):d(r)?("function"==typeof a.onIgnore&&a.onIgnore(f),f.isMatch=!1,!!n&&f):("function"==typeof a.onMatch&&a.onMatch(f),!n||f)};return r&&(p.state=u),p};return s.test=(e,t,r,{glob:n,posix:i}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=r||{},c=a.format||(i?o.toPosixSlashes:null);let l=e===n,u=l&&c?c(e):e;return!1===l&&(u=c?c(e):e,l=u===n),!1!==l&&!0!==a.capture||(l=!0===a.matchBase||!0===a.basename?s.matchBase(e,t,r,i):t.exec(u)),{isMatch:Boolean(l),match:l,output:u}},s.matchBase=(t,r,n,i=o.isWindows(n))=>(r instanceof RegExp?r:s.makeRe(r,n)).test(e.basename(t)),s.isMatch=(e,t,r)=>s(t,r)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):n(e,{...t,fastpaths:!1}),s.scan=(e,r)=>t(e,r),s.compileRe=(e,t,r=!1,n=!1)=>{if(!0===r)return e.output;const o=t||{},i=o.contains?"":"^",a=o.contains?"":"$";let c=`${i}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const l=s.toRegex(c,t);return!0===n&&(l.state=e),l},s.makeRe=(e,t={},r=!1,o=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(i.output=n.fastpaths(e,t)),i.output||(i=n(e,t)),s.compileRe(i,t,r,o)},s.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},s.constants=i,dt=s}function _t(){return mt?ft:(mt=1,ft=Et())}function xt(){if(yt)return Oe;yt=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.isAbsolute=Oe.partitionAbsoluteAndRelative=Oe.removeDuplicateSlashes=Oe.matchAny=Oe.convertPatternsToRe=Oe.makeRe=Oe.getPatternParts=Oe.expandBraceExpansion=Oe.expandPatternsWithBraceExpansion=Oe.isAffectDepthOfReadingPattern=Oe.endsWithSlashGlobStar=Oe.hasGlobStar=Oe.getBaseDirectory=Oe.isPatternRelatedToParentDirectory=Oe.getPatternsOutsideCurrentDirectory=Oe.getPatternsInsideCurrentDirectory=Oe.getPositivePatterns=Oe.getNegativePatterns=Oe.isPositivePattern=Oe.isNegativePattern=Oe.convertToNegativePattern=Oe.convertToPositivePattern=Oe.isDynamicPattern=Oe.isStaticPattern=void 0;const e=r,t=ke(),o=function(){if(gt)return ht;gt=1;const e=n,t=nt(),r=_t(),o=wt(),i=e=>""===e||"./"===e,s=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},a=(e,t,n)=>{t=[].concat(t),e=[].concat(e);let o=new Set,i=new Set,s=new Set,a=0,c=e=>{s.add(e.output),n&&n.onResult&&n.onResult(e)};for(let s=0;s<t.length;s++){let l=r(String(t[s]),{...n,onResult:c},!0),u=l.state.negated||l.state.negatedExtglob;u&&a++;for(let t of e){let e=l(t,!0);(u?!e.isMatch:e.isMatch)&&(u?o.add(e.output):(o.delete(e.output),i.add(e.output)))}}let l=(a===t.length?[...s]:[...i]).filter(e=>!o.has(e));if(n&&0===l.length){if(!0===n.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===n.nonull||!0===n.nullglob)return n.unescape?t.map(e=>e.replace(/\\/g,"")):t}return l};return a.match=a,a.matcher=(e,t)=>r(e,t),a.any=a.isMatch=(e,t,n)=>r(t,n)(e),a.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],i=new Set(a(e,t,{...r,onResult:e=>{r.onResult&&r.onResult(e),o.push(e.output)}}));for(let e of o)i.has(e)||n.add(e);return[...n]},a.contains=(t,r,n)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);if(Array.isArray(r))return r.some(e=>a.contains(t,e,n));if("string"==typeof r){if(i(t)||i(r))return!1;if(t.includes(r)||t.startsWith("./")&&t.slice(2).includes(r))return!0}return a.isMatch(t,r,{...n,contains:!0})},a.matchKeys=(e,t,r)=>{if(!o.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=a(Object.keys(e),t,r),i={};for(let t of n)i[t]=e[t];return i},a.some=(e,t,n)=>{let o=[].concat(e);for(let e of[].concat(t)){let t=r(String(e),n);if(o.some(e=>t(e)))return!0}return!1},a.every=(e,t,n)=>{let o=[].concat(e);for(let e of[].concat(t)){let t=r(String(e),n);if(!o.every(e=>t(e)))return!1}return!0},a.all=(t,n,o)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);return[].concat(n).every(e=>r(e,o)(t))},a.capture=(e,t,n)=>{let i=o.isWindows(n),s=r.makeRe(String(e),{...n,capture:!0}).exec(i?o.toPosixSlashes(t):t);if(s)return s.slice(1).map(e=>void 0===e?"":e)},a.makeRe=(...e)=>r.makeRe(...e),a.scan=(...e)=>r.scan(...e),a.parse=(e,n)=>{let o=[];for(let i of[].concat(e||[]))for(let e of t(String(i),n))o.push(r.parse(e,n));return o},a.braces=(e,r)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return r&&!0===r.nobrace||!s(e)?[e]:t(e,r)},a.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return a.braces(e,{...t,expand:!0})},a.hasBraces=s,ht=a}(),i=/[*?]|^!/,s=/\[[^[]*]/,a=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,c=/[!*+?@]\([^(]*\)/,l=/,|\.\./,u=/(?!^)\/{2,}/g;function d(e,t={}){return!p(e,t)}function p(e,t={}){return""!==e&&(!(!1!==t.caseSensitiveMatch&&!e.includes("\\"))||(!!(i.test(e)||s.test(e)||a.test(e))||(!(!1===t.extglob||!c.test(e))||!(!1===t.braceExpansion||!function(e){const t=e.indexOf("{");if(-1===t)return!1;const r=e.indexOf("}",t+1);if(-1===r)return!1;const n=e.slice(t,r);return l.test(n)}(e)))))}function f(e){return e.startsWith("!")&&"("!==e[1]}function m(e){return!f(e)}function h(e){return e.startsWith("..")||e.startsWith("./..")}function g(e){return e.endsWith("/**")}function y(e){const t=o.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((e,t)=>e.length-t.length),t.filter(e=>""!==e)}function b(e,t){return o.makeRe(e,t)}function v(t){return e.isAbsolute(t)}return Oe.isStaticPattern=d,Oe.isDynamicPattern=p,Oe.convertToPositivePattern=function(e){return f(e)?e.slice(1):e},Oe.convertToNegativePattern=function(e){return"!"+e},Oe.isNegativePattern=f,Oe.isPositivePattern=m,Oe.getNegativePatterns=function(e){return e.filter(f)},Oe.getPositivePatterns=function(e){return e.filter(m)},Oe.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!h(e))},Oe.getPatternsOutsideCurrentDirectory=function(e){return e.filter(h)},Oe.isPatternRelatedToParentDirectory=h,Oe.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},Oe.hasGlobStar=function(e){return e.includes("**")},Oe.endsWithSlashGlobStar=g,Oe.isAffectDepthOfReadingPattern=function(t){const r=e.basename(t);return g(t)||d(r)},Oe.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(y(t)),[])},Oe.expandBraceExpansion=y,Oe.getPatternParts=function(e,t){let{parts:r}=o.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===r.length&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r},Oe.makeRe=b,Oe.convertPatternsToRe=function(e,t){return e.map(e=>b(e,t))},Oe.matchAny=function(e,t){return t.some(t=>t.test(e))},Oe.removeDuplicateSlashes=function(e){return e.replace(u,"/")},Oe.partitionAbsoluteAndRelative=function(e){const t=[],r=[];for(const n of e)v(n)?t.push(n):r.push(n);return[t,r]},Oe.isAbsolute=v,Oe}var At,Tt,Ot,Rt={};function Ct(){if(Tt)return At;Tt=1;const e=o.PassThrough,t=Array.prototype.slice;function r(t,n){if(Array.isArray(t))for(let e=0,o=t.length;e<o;e++)t[e]=r(t[e],n);else{if(!t._readableState&&t.pipe&&(t=t.pipe(e(n))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}return At=function(){const n=[],o=t.call(arguments);let i=!1,s=o[o.length-1];s&&!Array.isArray(s)&&null==s.pipe?o.pop():s={};const a=!1!==s.end,c=!0===s.pipeError;null==s.objectMode&&(s.objectMode=!0);null==s.highWaterMark&&(s.highWaterMark=65536);const l=e(s);function u(){for(let e=0,t=arguments.length;e<t;e++)n.push(r(arguments[e],s));return d(),this}function d(){if(i)return;i=!0;let e=n.shift();if(!e)return void process.nextTick(p);Array.isArray(e)||(e=[e]);let t=e.length+1;function r(){--t>0||(i=!1,d())}function o(e){function t(){e.removeListener("merge2UnpipeEnd",t),e.removeListener("end",t),c&&e.removeListener("error",n),r()}function n(e){l.emit("error",e)}if(e._readableState.endEmitted)return r();e.on("merge2UnpipeEnd",t),e.on("end",t),c&&e.on("error",n),e.pipe(l,{end:!1}),e.resume()}for(let t=0;t<e.length;t++)o(e[t]);r()}function p(){i=!1,l.emit("queueDrain"),a&&l.end()}l.setMaxListeners(0),l.add=u,l.on("unpipe",function(e){e.emit("merge2UnpipeEnd")}),o.length&&u.apply(null,o);return l},At}var kt,Pt,It,Dt={};function Lt(){if(kt)return Dt;return kt=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.isEmpty=Dt.isString=void 0,Dt.isString=function(e){return"string"==typeof e},Dt.isEmpty=function(e){return""===e},Dt}function Mt(){if(Pt)return ue;Pt=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.string=ue.stream=ue.pattern=ue.path=ue.fs=ue.errno=ue.array=void 0;const e=pe();ue.array=e;const t=he();ue.errno=t;const r=function(){if(ge)return ye;ge=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return ye.createDirentFromStats=function(t,r){return new e(t,r)},ye}();ue.fs=r;const n=we();ue.path=n;const o=xt();ue.pattern=o;const i=function(){if(Ot)return Rt;Ot=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.merge=void 0;const e=Ct();function t(e){e.forEach(e=>e.emit("close"))}return Rt.merge=function(r){const n=e(r);return r.forEach(e=>{e.once("error",e=>n.emit("error",e))}),n.once("close",()=>t(r)),n.once("end",()=>t(r)),n},Rt}();ue.stream=i;const s=Lt();return ue.string=s,ue}var Nt,$t={},jt={},Bt={},Ft={},Ht={},Ut={},Gt={},Wt={},Vt={};function Kt(){if(Nt)return Vt;function e(e,t){e(t)}function t(e,t){e(null,t)}return Nt=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.read=void 0,Vt.read=function(r,n,o){n.fs.lstat(r,(i,s)=>{null===i?s.isSymbolicLink()&&n.followSymbolicLink?n.fs.stat(r,(r,i)=>{if(null!==r)return n.throwErrorOnBrokenSymbolicLink?void e(o,r):void t(o,s);n.markSymbolicLink&&(i.isSymbolicLink=()=>!0),t(o,i)}):t(o,s):e(o,i)})},Vt}var qt,zt={};var Xt,Yt,Qt,Zt,Jt,er,tr,rr={},nr={};function or(){if(Yt)return rr;Yt=1,Object.defineProperty(rr,"__esModule",{value:!0});const e=(Xt||(Xt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(nr)),nr);return rr.default=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return null!=e?e:t}},rr}function ir(){if(Qt)return Wt;Qt=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.statSync=Wt.stat=Wt.Settings=void 0;const e=Kt(),t=(qt||(qt=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.read=void 0,zt.read=function(e,t){const r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{const r=t.fs.statSync(e);return t.markSymbolicLink&&(r.isSymbolicLink=()=>!0),r}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw e}}),zt),r=or();function n(e={}){return e instanceof r.default?e:new r.default(e)}return Wt.Settings=r.default,Wt.stat=function(t,r,o){"function"!=typeof r?e.read(t,n(r),o):e.read(t,n(),r)},Wt.statSync=function(e,r){const o=n(r);return t.read(e,o)},Wt}
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
*/function tt(){if(Be)return je;Be=1;const e=n,t=et(),r=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),o=e=>"number"==typeof e||"string"==typeof e&&""!==e,i=e=>Number.isInteger(+e),s=e=>{let t=`${e}`,r=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++r];);return r>0},a=(e,t,r)=>{if(t>0){let r="-"===e[0]?"-":"";r&&(e=e.slice(1)),e=r+e.padStart(r?t-1:t,"0")}return!1===r?String(e):e},c=(e,t)=>{let r="-"===e[0]?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},l=(e,r,n,o)=>{if(n)return t(e,r,{wrap:!1,...o});let i=String.fromCharCode(e);return e===r?i:`[${i}-${String.fromCharCode(r)}]`},u=(e,r,n)=>{if(Array.isArray(e)){let t=!0===n.wrap,r=n.capture?"":"?:";return t?`(${r}${e.join("|")})`:e.join("|")}return t(e,r,n)},d=(...t)=>new RangeError("Invalid range arguments: "+e.inspect(...t)),p=(e,t,r)=>{if(!0===r.strictRanges)throw d([e,t]);return[]},f=(e,t,r=1,n={})=>{let o=Number(e),i=Number(t);if(!Number.isInteger(o)||!Number.isInteger(i)){if(!0===n.strictRanges)throw d([e,t]);return[]}0===o&&(o=0),0===i&&(i=0);let p=o>i,f=String(e),m=String(t),h=String(r);r=Math.max(Math.abs(r),1);let g=s(f)||s(m)||s(h),y=g?Math.max(f.length,m.length,h.length):0,b=!1===g&&!1===((e,t,r)=>"string"==typeof e||"string"==typeof t||!0===r.stringify)(e,t,n),v=n.transform||(e=>t=>!0===e?Number(t):String(t))(b);if(n.toRegex&&1===r)return l(c(e,y),c(t,y),!0,n);let w={negatives:[],positives:[]},S=e=>w[e<0?"negatives":"positives"].push(Math.abs(e)),E=[],_=0;for(;p?o>=i:o<=i;)!0===n.toRegex&&r>1?S(o):E.push(a(v(o,_),y,b)),o=p?o-r:o+r,_++;return!0===n.toRegex?r>1?((e,t,r)=>{e.negatives.sort((e,t)=>e<t?-1:e>t?1:0),e.positives.sort((e,t)=>e<t?-1:e>t?1:0);let n,o=t.capture?"":"?:",i="",s="";return e.positives.length&&(i=e.positives.map(e=>c(String(e),r)).join("|")),e.negatives.length&&(s=`-(${o}${e.negatives.map(e=>c(String(e),r)).join("|")})`),n=i&&s?`${i}|${s}`:i||s,t.wrap?`(${o}${n})`:n})(w,n,y):u(E,null,{wrap:!1,...n}):E},m=(e,t,n,s={})=>{if(null==t&&o(e))return[e];if(!o(e)||!o(t))return p(e,t,s);if("function"==typeof n)return m(e,t,1,{transform:n});if(r(n))return m(e,t,0,n);let a={...s};return!0===a.capture&&(a.wrap=!0),n=n||a.step||1,i(n)?i(e)&&i(t)?f(e,t,n,a):((e,t,r=1,n={})=>{if(!i(e)&&e.length>1||!i(t)&&t.length>1)return p(e,t,n);let o=n.transform||(e=>String.fromCharCode(e)),s=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),c=s>a,d=Math.min(s,a),f=Math.max(s,a);if(n.toRegex&&1===r)return l(d,f,!1,n);let m=[],h=0;for(;c?s>=a:s<=a;)m.push(o(s,h)),s=c?s-r:s+r,h++;return!0===n.toRegex?u(m,null,{wrap:!1,options:n}):m})(e,t,Math.max(Math.abs(n),1),a):null==n||r(n)?m(e,t,1,n):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(n,a)};return je=m}function rt(){if(qe)return Ke;qe=1;const e=Ze(),{MAX_LENGTH:t,CHAR_BACKSLASH:r,CHAR_BACKTICK:n,CHAR_COMMA:o,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:s,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:f,CHAR_NO_BREAK_SPACE:m,CHAR_ZERO_WIDTH_NOBREAK_SPACE:h}=Ve?We:(Ve=1,We={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"});return Ke=(g,y={})=>{if("string"!=typeof g)throw new TypeError("Expected a string");const b=y||{},v="number"==typeof b.maxLength?Math.min(t,b.maxLength):t;if(g.length>v)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${v})`);const w={type:"root",input:g,nodes:[]},S=[w];let E=w,_=w,x=0;const A=g.length;let T,O=0,R=0;const C=()=>g[O++],k=e=>{if("text"===e.type&&"dot"===_.type&&(_.type="text"),!_||"text"!==_.type||"text"!==e.type)return E.nodes.push(e),e.parent=E,e.prev=_,_=e,e;_.value+=e.value};for(k({type:"bos"});O<A;)if(E=S[S.length-1],T=C(),T!==h&&T!==m)if(T!==r)if(T!==d){if(T===u){let e;for(x++;O<A&&(e=C());)if(T+=e,e!==u)if(e!==r){if(e===d&&(x--,0===x))break}else T+=C();else x++;k({type:"text",value:T});continue}if(T!==s)if(T!==a){if(T===p||T===f||T===n){const e=T;let t;for(!0!==y.keepQuotes&&(T="");O<A&&(t=C());)if(t!==r){if(t===e){!0===y.keepQuotes&&(T+=t);break}T+=t}else T+=t+C();k({type:"text",value:T});continue}if(T===c){R++;const e=_.value&&"$"===_.value.slice(-1)||!0===E.dollar;E=k({type:"brace",open:!0,close:!1,dollar:e,depth:R,commas:0,ranges:0,nodes:[]}),S.push(E),k({type:"open",value:T});continue}if(T===l){if("brace"!==E.type){k({type:"text",value:T});continue}const e="close";E=S.pop(),E.close=!0,k({type:e,value:T}),R--,E=S[S.length-1];continue}if(T===o&&R>0){if(E.ranges>0){E.ranges=0;const t=E.nodes.shift();E.nodes=[t,{type:"text",value:e(E)}]}k({type:"comma",value:T}),E.commas++}else{if(T===i&&R>0&&0===E.commas){const e=E.nodes;if(0===R||0===e.length){k({type:"text",value:T});continue}if("dot"===_.type){if(E.range=[],_.value+=T,_.type="range",3!==E.nodes.length&&5!==E.nodes.length){E.invalid=!0,E.ranges=0,_.type="text";continue}E.ranges++,E.args=[];continue}if("range"===_.type){e.pop();const t=e[e.length-1];t.value+=_.value+T,_=t,E.ranges--;continue}k({type:"dot",value:T});continue}k({type:"text",value:T})}}else{if("paren"!==E.type){k({type:"text",value:T});continue}E=S.pop(),k({type:"text",value:T}),E=S[S.length-1]}else E=k({type:"paren",nodes:[]}),S.push(E),k({type:"text",value:T})}else k({type:"text",value:"\\"+T});else k({type:"text",value:(y.keepEscaping?T:"")+C()});do{if(E=S.pop(),"root"!==E.type){E.nodes.forEach(e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});const e=S[S.length-1],t=e.nodes.indexOf(E);e.nodes.splice(t,1,...E.nodes)}}while(S.length>0);return k({type:"eos"}),w},Ke}function nt(){if(Xe)return ze;Xe=1;const e=Ze(),t=function(){if(He)return Fe;He=1;const e=tt(),t=Qe();return Fe=(r,n={})=>{const o=(r,i={})=>{const s=t.isInvalidBrace(i),a=!0===r.invalid&&!0===n.escapeInvalid,c=!0===s||!0===a,l=!0===n.escapeInvalid?"\\":"";let u="";if(!0===r.isOpen)return l+r.value;if(!0===r.isClose)return console.log("node.isClose",l,r.value),l+r.value;if("open"===r.type)return c?l+r.value:"(";if("close"===r.type)return c?l+r.value:")";if("comma"===r.type)return"comma"===r.prev.type?"":c?r.value:"|";if(r.value)return r.value;if(r.nodes&&r.ranges>0){const o=t.reduce(r.nodes),i=e(...o,{...n,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return o.length>1&&i.length>1?`(${i})`:i}if(r.nodes)for(const e of r.nodes)u+=o(e,r);return u};return o(r)},Fe}(),r=function(){if(Ge)return Ue;Ge=1;const e=tt(),t=Ze(),r=Qe(),n=(e="",t="",o=!1)=>{const i=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return o?r.flatten(t).map(e=>`{${e}}`):t;for(const r of e)if(Array.isArray(r))for(const e of r)i.push(n(e,t,o));else for(let e of t)!0===o&&"string"==typeof e&&(e=`{${e}}`),i.push(Array.isArray(e)?n(r,e,o):r+e);return r.flatten(i)};return Ue=(o,i={})=>{const s=void 0===i.rangeLimit?1e3:i.rangeLimit,a=(o,c={})=>{o.queue=[];let l=c,u=c.queue;for(;"brace"!==l.type&&"root"!==l.type&&l.parent;)l=l.parent,u=l.queue;if(o.invalid||o.dollar)return void u.push(n(u.pop(),t(o,i)));if("brace"===o.type&&!0!==o.invalid&&2===o.nodes.length)return void u.push(n(u.pop(),["{}"]));if(o.nodes&&o.ranges>0){const a=r.reduce(o.nodes);if(r.exceedsLimit(...a,i.step,s))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=e(...a,i);return 0===c.length&&(c=t(o,i)),u.push(n(u.pop(),c)),void(o.nodes=[])}const d=r.encloseBrace(o);let p=o.queue,f=o;for(;"brace"!==f.type&&"root"!==f.type&&f.parent;)f=f.parent,p=f.queue;for(let e=0;e<o.nodes.length;e++){const t=o.nodes[e];"comma"!==t.type||"brace"!==o.type?"close"!==t.type?t.value&&"open"!==t.type?p.push(n(p.pop(),t.value)):t.nodes&&a(t,o):u.push(n(u.pop(),p,d)):(1===e&&p.push(""),p.push(""))}return p};return r.flatten(a(o))},Ue}(),n=rt(),o=(e,t={})=>{let r=[];if(Array.isArray(e))for(const n of e){const e=o.create(n,t);Array.isArray(e)?r.push(...e):r.push(e)}else r=[].concat(o.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(r=[...new Set(r)]),r};return o.parse=(e,t={})=>n(e,t),o.stringify=(t,r={})=>e("string"==typeof t?o.parse(t,r):t,r),o.compile=(e,r={})=>("string"==typeof e&&(e=o.parse(e,r)),t(e,r)),o.expand=(e,t={})=>{"string"==typeof e&&(e=o.parse(e,t));let n=r(e,t);return!0===t.noempty&&(n=n.filter(Boolean)),!0===t.nodupes&&(n=[...new Set(n)]),n},o.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?o.compile(e,t):o.expand(e,t),ze=o}var ot,it,st,at,ct,lt,ut,dt,pt,ft,mt,ht,gt,yt,bt={};function vt(){if(it)return ot;it=1;const e=r,t="\\\\/",n=`[^${t}]`,o="\\.",i="\\/",s="[^/]",a=`(?:${i}|$)`,c=`(?:^|${i})`,l=`${o}{1,2}${a}`,u={DOT_LITERAL:o,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:i,ONE_CHAR:"(?=.)",QMARK:s,END_ANCHOR:a,DOTS_SLASH:l,NO_DOT:`(?!${o})`,NO_DOTS:`(?!${c}${l})`,NO_DOT_SLASH:`(?!${o}{0,1}${a})`,NO_DOTS_SLASH:`(?!${l})`,QMARK_NO_DOT:`[^.${i}]`,STAR:`${s}*?`,START_ANCHOR:c},d={...u,SLASH_LITERAL:`[${t}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${o}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${t}])${o}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`};return ot={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,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"},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:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},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:e.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?d:u}}function wt(){return st||(st=1,function(e){const t=r,n="win32"===process.platform,{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:a}=vt();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>s.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(a,"\\$1"),e.toPosixSlashes=e=>e.replace(o,"/"),e.removeBackslashes=e=>e.replace(i,e=>"\\"===e?"":e),e.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},e.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===n||"\\"===t.sep,e.escapeLast=(t,r,n)=>{const o=t.lastIndexOf(r,n);return-1===o?t:"\\"===t[o-1]?e.escapeLast(t,r,o-1):`${t.slice(0,o)}\\${t.slice(o)}`},e.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},e.wrapOutput=(e,t={},r={})=>{let n=`${r.contains?"":"^"}(?:${e})${r.contains?"":"$"}`;return!0===t.negated&&(n=`(?:^(?!${n}).*$)`),n}}(bt)),bt}function St(){if(ut)return lt;ut=1;const e=vt(),t=wt(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:s}=e,a=(e,r)=>{if("function"==typeof r.expandRange)return r.expandRange(...e,r);e.sort();const n=`[${e.join("-")}]`;try{new RegExp(n)}catch(r){return e.map(e=>t.escapeRegex(e)).join("..")}return n},c=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,l=e=>{const t=[];let r=0,n=0,o=0,i="",s=!1;for(const a of e)if(!0!==s)if("\\"!==a)if('"'!==a){if(0===o)if("["===a)r++;else if("]"===a&&r>0)r--;else if(0===r)if("("===a)n++;else if(")"===a&&n>0)n--;else if("|"===a&&0===n){t.push(i),i="";continue}i+=a}else o=1===o?0:1,i+=a;else i+=a,s=!0;else i+=a,s=!1;return t.push(i),t},u=e=>{let t=e.trim(),r=!0;for(;!0===r;)r=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),r=!0);if((e=>{let t=!1;for(const r of e)if(!0!==t)if("\\"!==r){if(/[?*+@!()[\]{}]/.test(r))return!1}else t=!0;else t=!1;return!0})(t))return t.replace(/\\(.)/g,"$1")},d=(e,t=!0)=>{if("+"!==e[0]&&"*"!==e[0]||"("!==e[1])return;let r=0,n=0,o=0,i=!1;for(let s=1;s<e.length;s++){const a=e[s];if(!0!==i)if("\\"!==a)if('"'!==a){if(1!==o)if("["!==a){if("]"===a&&r>0)r--;else if(!(r>0))if("("!==a){if(")"===a&&(n--,0===n)){if(!0===t&&s!==e.length-1)return;return{type:e[0],body:e.slice(2,s),end:s}}}else n++}else r++}else o=1===o?0:1;else i=!0;else i=!1}},p=e=>{let r=0;const n=[];for(;r<e.length;){const t=d(e.slice(r),!1);if(!t||"*"!==t.type)return;const o=l(t.body).map(e=>e.trim());if(1!==o.length)return;const i=u(o[0]);if(!i||1!==i.length)return;n.push(i),r+=t.end+1}if(n.length<1)return;return`${1===n.length?t.escapeRegex(n[0]):`[${n.map(e=>t.escapeRegex(e)).join("")}]`}*`},f=e=>{let t=0,r=e.trim(),n=d(r);for(;n;)t++,r=n.body.trim(),n=d(r);return t},m=(t,r)=>{if(!1===r.maxExtglobRecursion)return{risky:!1};const n="number"==typeof r.maxExtglobRecursion?r.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,o=l(t).map(e=>e.trim());if(o.length>1&&(o.some(e=>""===e)||o.some(e=>/^[*?]+$/.test(e))||(e=>{const t=e.map(u).filter(Boolean);for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++){const n=t[e],o=t[r],i=n[0];if(i&&n===i.repeat(n.length)&&o===i.repeat(o.length)&&(n===o||n.startsWith(o)||o.startsWith(n)))return!0}return!1})(o)))return{risky:!0};for(const e of o){const t=p(e);if(t)return{risky:!0,safeOutput:t};if(f(e)>n)return{risky:!0}}return{risky:!1}},h=(l,u)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=s[l]||l;const d={...u},p="number"==typeof d.maxLength?Math.min(r,d.maxLength):r;let f=l.length;if(f>p)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${p}`);const g={type:"bos",value:"",output:d.prepend||""},y=[g],b=d.capture?"":"?:",v=t.isWindows(u),w=e.globChars(v),S=e.extglobChars(w),{DOT_LITERAL:E,PLUS_LITERAL:_,SLASH_LITERAL:x,ONE_CHAR:A,DOTS_SLASH:T,NO_DOT:O,NO_DOT_SLASH:R,NO_DOTS_SLASH:C,QMARK:k,QMARK_NO_DOT:P,STAR:I,START_ANCHOR:D}=w,L=e=>`(${b}(?:(?!${D}${e.dot?T:E}).)*?)`,M=d.dot?"":O,N=d.dot?k:P;let $=!0===d.bash?L(d):I;d.capture&&($=`(${$})`),"boolean"==typeof d.noext&&(d.noextglob=d.noext);const j={input:l,index:-1,start:0,dot:!0===d.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};l=t.removePrefix(l,j),f=l.length;const B=[],F=[],H=[];let U,G=g;const W=()=>j.index===f-1,V=j.peek=(e=1)=>l[j.index+e],K=j.advance=()=>l[++j.index]||"",q=()=>l.slice(j.index+1),z=(e="",t=0)=>{j.consumed+=e,j.index+=t},X=e=>{j.output+=null!=e.output?e.output:e.value,z(e.value)},Y=()=>{let e=1;for(;"!"===V()&&("("!==V(2)||"?"===V(3));)K(),j.start++,e++;return e%2!=0&&(j.negated=!0,j.start++,!0)},Q=e=>{j[e]++,H.push(e)},Z=e=>{j[e]--,H.pop()},J=e=>{if("globstar"===G.type){const t=j.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||B.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(j.output=j.output.slice(0,-G.output.length),G.type="star",G.value="*",G.output=$,j.output+=G.output)}if(B.length&&"paren"!==e.type&&(B[B.length-1].inner+=e.value),(e.value||e.output)&&X(e),G&&"text"===G.type&&"text"===e.type)return G.value+=e.value,void(G.output=(G.output||"")+e.value);e.prev=G,y.push(e),G=e},ee=(e,t)=>{const r={...S[t],conditions:1,inner:""};r.prev=G,r.parens=j.parens,r.output=j.output,r.startIndex=j.index,r.tokensIndex=y.length;const n=(d.capture?"(":"")+r.open;Q("parens"),J({type:e,value:t,output:j.output?"":A}),J({type:"paren",extglob:!0,value:K(),output:n}),B.push(r)},te=e=>{const r=l.slice(e.startIndex,j.index+1),n=l.slice(e.startIndex+2,j.index),o=m(n,d);if(("plus"===e.type||"star"===e.type)&&o.risky){const n=o.safeOutput?(e.output?"":A)+(d.capture?`(${o.safeOutput})`:o.safeOutput):void 0,i=y[e.tokensIndex];i.type="text",i.value=r,i.output=n||t.escapeRegex(r);for(let t=e.tokensIndex+1;t<y.length;t++)y[t].value="",y[t].output="",delete y[t].suffix;return j.output=e.output+i.output,j.backtrack=!0,J({type:"paren",extglob:!0,value:U,output:""}),void Z("parens")}let i,s=e.close+(d.capture?")":"");if("negate"===e.type){let t=$;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(t=L(d)),(t!==$||W()||/^\)+$/.test(q()))&&(s=e.close=`)$))${t}`),e.inner.includes("*")&&(i=q())&&/^\.[^\\/.]+$/.test(i)){const r=h(i,{...u,fastpaths:!1}).output;s=e.close=`)${r})${t})`}"bos"===e.prev.type&&(j.negatedExtglob=!0)}J({type:"paren",extglob:!0,value:U,output:s}),Z("parens")};if(!1!==d.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,r=l.replace(i,(t,r,n,o,i,s)=>"\\"===o?(e=!0,t):"?"===o?r?r+o+(i?k.repeat(i.length):""):0===s?N+(i?k.repeat(i.length):""):k.repeat(n.length):"."===o?E.repeat(n.length):"*"===o?r?r+o+(i?$:""):$:r?t:`\\${t}`);return!0===e&&(r=!0===d.unescape?r.replace(/\\/g,""):r.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),r===l&&!0===d.contains?(j.output=l,j):(j.output=t.wrapOutput(r,j,u),j)}for(;!W();){if(U=K(),"\0"===U)continue;if("\\"===U){const e=V();if("/"===e&&!0!==d.bash)continue;if("."===e||";"===e)continue;if(!e){U+="\\",J({type:"text",value:U});continue}const t=/^\\+/.exec(q());let r=0;if(t&&t[0].length>2&&(r=t[0].length,j.index+=r,r%2!=0&&(U+="\\")),!0===d.unescape?U=K():U+=K(),0===j.brackets){J({type:"text",value:U});continue}}if(j.brackets>0&&("]"!==U||"["===G.value||"[^"===G.value)){if(!1!==d.posix&&":"===U){const e=G.value.slice(1);if(e.includes("[")&&(G.posix=!0,e.includes(":"))){const e=G.value.lastIndexOf("["),t=G.value.slice(0,e),r=G.value.slice(e+2),o=n[r];if(o){G.value=t+o,j.backtrack=!0,K(),g.output||1!==y.indexOf(G)||(g.output=A);continue}}}("["===U&&":"!==V()||"-"===U&&"]"===V())&&(U=`\\${U}`),"]"!==U||"["!==G.value&&"[^"!==G.value||(U=`\\${U}`),!0===d.posix&&"!"===U&&"["===G.value&&(U="^"),G.value+=U,X({value:U});continue}if(1===j.quotes&&'"'!==U){U=t.escapeRegex(U),G.value+=U,X({value:U});continue}if('"'===U){j.quotes=1===j.quotes?0:1,!0===d.keepQuotes&&J({type:"text",value:U});continue}if("("===U){Q("parens"),J({type:"paren",value:U});continue}if(")"===U){if(0===j.parens&&!0===d.strictBrackets)throw new SyntaxError(c("opening","("));const e=B[B.length-1];if(e&&j.parens===e.parens+1){te(B.pop());continue}J({type:"paren",value:U,output:j.parens?")":"\\)"}),Z("parens");continue}if("["===U){if(!0!==d.nobracket&&q().includes("]"))Q("brackets");else{if(!0!==d.nobracket&&!0===d.strictBrackets)throw new SyntaxError(c("closing","]"));U=`\\${U}`}J({type:"bracket",value:U});continue}if("]"===U){if(!0===d.nobracket||G&&"bracket"===G.type&&1===G.value.length){J({type:"text",value:U,output:`\\${U}`});continue}if(0===j.brackets){if(!0===d.strictBrackets)throw new SyntaxError(c("opening","["));J({type:"text",value:U,output:`\\${U}`});continue}Z("brackets");const e=G.value.slice(1);if(!0===G.posix||"^"!==e[0]||e.includes("/")||(U=`/${U}`),G.value+=U,X({value:U}),!1===d.literalBrackets||t.hasRegexChars(e))continue;const r=t.escapeRegex(G.value);if(j.output=j.output.slice(0,-G.value.length),!0===d.literalBrackets){j.output+=r,G.value=r;continue}G.value=`(${b}${r}|${G.value})`,j.output+=G.value;continue}if("{"===U&&!0!==d.nobrace){Q("braces");const e={type:"brace",value:U,output:"(",outputIndex:j.output.length,tokensIndex:j.tokens.length};F.push(e),J(e);continue}if("}"===U){const e=F[F.length-1];if(!0===d.nobrace||!e){J({type:"text",value:U,output:U});continue}let t=")";if(!0===e.dots){const e=y.slice(),r=[];for(let t=e.length-1;t>=0&&(y.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&r.unshift(e[t].value);t=a(r,d),j.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const r=j.output.slice(0,e.outputIndex),n=j.tokens.slice(e.tokensIndex);e.value=e.output="\\{",U=t="\\}",j.output=r;for(const e of n)j.output+=e.output||e.value}J({type:"brace",value:U,output:t}),Z("braces"),F.pop();continue}if("|"===U){B.length>0&&B[B.length-1].conditions++,J({type:"text",value:U});continue}if(","===U){let e=U;const t=F[F.length-1];t&&"braces"===H[H.length-1]&&(t.comma=!0,e="|"),J({type:"comma",value:U,output:e});continue}if("/"===U){if("dot"===G.type&&j.index===j.start+1){j.start=j.index+1,j.consumed="",j.output="",y.pop(),G=g;continue}J({type:"slash",value:U,output:x});continue}if("."===U){if(j.braces>0&&"dot"===G.type){"."===G.value&&(G.output=E);const e=F[F.length-1];G.type="dots",G.output+=U,G.value+=U,e.dots=!0;continue}if(j.braces+j.parens===0&&"bos"!==G.type&&"slash"!==G.type){J({type:"text",value:U,output:E});continue}J({type:"dot",value:U,output:E});continue}if("?"===U){if(!(G&&"("===G.value)&&!0!==d.noextglob&&"("===V()&&"?"!==V(2)){ee("qmark",U);continue}if(G&&"paren"===G.type){const e=V();let r=U;if("<"===e&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===G.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(q()))&&(r=`\\${U}`),J({type:"text",value:U,output:r});continue}if(!0!==d.dot&&("slash"===G.type||"bos"===G.type)){J({type:"qmark",value:U,output:P});continue}J({type:"qmark",value:U,output:k});continue}if("!"===U){if(!0!==d.noextglob&&"("===V()&&("?"!==V(2)||!/[!=<:]/.test(V(3)))){ee("negate",U);continue}if(!0!==d.nonegate&&0===j.index){Y();continue}}if("+"===U){if(!0!==d.noextglob&&"("===V()&&"?"!==V(2)){ee("plus",U);continue}if(G&&"("===G.value||!1===d.regex){J({type:"plus",value:U,output:_});continue}if(G&&("bracket"===G.type||"paren"===G.type||"brace"===G.type)||j.parens>0){J({type:"plus",value:U});continue}J({type:"plus",value:_});continue}if("@"===U){if(!0!==d.noextglob&&"("===V()&&"?"!==V(2)){J({type:"at",extglob:!0,value:U,output:""});continue}J({type:"text",value:U});continue}if("*"!==U){"$"!==U&&"^"!==U||(U=`\\${U}`);const e=o.exec(q());e&&(U+=e[0],j.index+=e[0].length),J({type:"text",value:U});continue}if(G&&("globstar"===G.type||!0===G.star)){G.type="star",G.star=!0,G.value+=U,G.output=$,j.backtrack=!0,j.globstar=!0,z(U);continue}let e=q();if(!0!==d.noextglob&&/^\([^?]/.test(e)){ee("star",U);continue}if("star"===G.type){if(!0===d.noglobstar){z(U);continue}const t=G.prev,r=t.prev,n="slash"===t.type||"bos"===t.type,o=r&&("star"===r.type||"globstar"===r.type);if(!0===d.bash&&(!n||e[0]&&"/"!==e[0])){J({type:"star",value:U,output:""});continue}const i=j.braces>0&&("comma"===t.type||"brace"===t.type),s=B.length&&("pipe"===t.type||"paren"===t.type);if(!n&&"paren"!==t.type&&!i&&!s){J({type:"star",value:U,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[j.index+4];if(t&&"/"!==t)break;e=e.slice(3),z("/**",3)}if("bos"===t.type&&W()){G.type="globstar",G.value+=U,G.output=L(d),j.output=G.output,j.globstar=!0,z(U);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!o&&W()){j.output=j.output.slice(0,-(t.output+G.output).length),t.output=`(?:${t.output}`,G.type="globstar",G.output=L(d)+(d.strictSlashes?")":"|$)"),G.value+=U,j.globstar=!0,j.output+=t.output+G.output,z(U);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const r=void 0!==e[1]?"|$":"";j.output=j.output.slice(0,-(t.output+G.output).length),t.output=`(?:${t.output}`,G.type="globstar",G.output=`${L(d)}${x}|${x}${r})`,G.value+=U,j.output+=t.output+G.output,j.globstar=!0,z(U+K()),J({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){G.type="globstar",G.value+=U,G.output=`(?:^|${x}|${L(d)}${x})`,j.output=G.output,j.globstar=!0,z(U+K()),J({type:"slash",value:"/",output:""});continue}j.output=j.output.slice(0,-G.output.length),G.type="globstar",G.output=L(d),G.value+=U,j.output+=G.output,j.globstar=!0,z(U);continue}const r={type:"star",value:U,output:$};!0!==d.bash?!G||"bracket"!==G.type&&"paren"!==G.type||!0!==d.regex?(j.index!==j.start&&"slash"!==G.type&&"dot"!==G.type||("dot"===G.type?(j.output+=R,G.output+=R):!0===d.dot?(j.output+=C,G.output+=C):(j.output+=M,G.output+=M),"*"!==V()&&(j.output+=A,G.output+=A)),J(r)):(r.output=U,J(r)):(r.output=".*?","bos"!==G.type&&"slash"!==G.type||(r.output=M+r.output),J(r))}for(;j.brackets>0;){if(!0===d.strictBrackets)throw new SyntaxError(c("closing","]"));j.output=t.escapeLast(j.output,"["),Z("brackets")}for(;j.parens>0;){if(!0===d.strictBrackets)throw new SyntaxError(c("closing",")"));j.output=t.escapeLast(j.output,"("),Z("parens")}for(;j.braces>0;){if(!0===d.strictBrackets)throw new SyntaxError(c("closing","}"));j.output=t.escapeLast(j.output,"{"),Z("braces")}if(!0===d.strictSlashes||"star"!==G.type&&"bracket"!==G.type||J({type:"maybe_slash",value:"",output:`${x}?`}),!0===j.backtrack){j.output="";for(const e of j.tokens)j.output+=null!=e.output?e.output:e.value,e.suffix&&(j.output+=e.suffix)}return j};return h.fastpaths=(n,o)=>{const i={...o},a="number"==typeof i.maxLength?Math.min(r,i.maxLength):r,c=n.length;if(c>a)throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${a}`);n=s[n]||n;const l=t.isWindows(o),{DOT_LITERAL:u,SLASH_LITERAL:d,ONE_CHAR:p,DOTS_SLASH:f,NO_DOT:m,NO_DOTS:h,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:b}=e.globChars(l),v=i.dot?h:m,w=i.dot?g:m,S=i.capture?"":"?:";let E=!0===i.bash?".*?":y;i.capture&&(E=`(${E})`);const _=e=>!0===e.noglobstar?E:`(${S}(?:(?!${b}${e.dot?f:u}).)*?)`,x=e=>{switch(e){case"*":return`${v}${p}${E}`;case".*":return`${u}${p}${E}`;case"*.*":return`${v}${E}${u}${p}${E}`;case"*/*":return`${v}${E}${d}${p}${w}${E}`;case"**":return v+_(i);case"**/*":return`(?:${v}${_(i)}${d})?${w}${p}${E}`;case"**/*.*":return`(?:${v}${_(i)}${d})?${w}${E}${u}${p}${E}`;case"**/.*":return`(?:${v}${_(i)}${d})?${u}${p}${E}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=x(t[1]);if(!r)return;return r+u+t[2]}}},A=t.removePrefix(n,{negated:!1,prefix:""});let T=x(A);return T&&!0!==i.strictSlashes&&(T+=`${d}?`),T},lt=h}function Et(){if(pt)return dt;pt=1;const e=r,t=function(){if(ct)return at;ct=1;const e=wt(),{CHAR_ASTERISK:t,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:o,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:d,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:f,CHAR_RIGHT_PARENTHESES:m,CHAR_RIGHT_SQUARE_BRACKET:h}=vt(),g=e=>e===a||e===n,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return at=(b,v)=>{const w=v||{},S=b.length-1,E=!0===w.parts||!0===w.scanToEnd,_=[],x=[],A=[];let T,O,R=b,C=-1,k=0,P=0,I=!1,D=!1,L=!1,M=!1,N=!1,$=!1,j=!1,B=!1,F=!1,H=!1,U=0,G={value:"",depth:0,isGlob:!1};const W=()=>C>=S,V=()=>R.charCodeAt(C+1),K=()=>(T=O,R.charCodeAt(++C));for(;C<S;){let e;if(O=K(),O!==n){if(!0===$||O===c){for(U++;!0!==W()&&(O=K());)if(O!==n)if(O!==c){if(!0!==$&&O===i&&(O=K())===i){if(I=G.isBrace=!0,L=G.isGlob=!0,H=!0,!0===E)continue;break}if(!0!==$&&O===o){if(I=G.isBrace=!0,L=G.isGlob=!0,H=!0,!0===E)continue;break}if(O===f&&(U--,0===U)){$=!1,I=G.isBrace=!0,H=!0;break}}else U++;else j=G.backslashes=!0,K();if(!0===E)continue;break}if(O!==a){if(!0!==w.noext&&!0==(O===d||O===r||O===t||O===p||O===s)&&V()===l){if(L=G.isGlob=!0,M=G.isExtglob=!0,H=!0,O===s&&C===k&&(F=!0),!0===E){for(;!0!==W()&&(O=K());)if(O!==n){if(O===m){L=G.isGlob=!0,H=!0;break}}else j=G.backslashes=!0,O=K();continue}break}if(O===t){if(T===t&&(N=G.isGlobstar=!0),L=G.isGlob=!0,H=!0,!0===E)continue;break}if(O===p){if(L=G.isGlob=!0,H=!0,!0===E)continue;break}if(O===u){for(;!0!==W()&&(e=K());)if(e!==n){if(e===h){D=G.isBracket=!0,L=G.isGlob=!0,H=!0;break}}else j=G.backslashes=!0,K();if(!0===E)continue;break}if(!0===w.nonegate||O!==s||C!==k){if(!0!==w.noparen&&O===l){if(L=G.isGlob=!0,!0===E){for(;!0!==W()&&(O=K());)if(O!==l){if(O===m){H=!0;break}}else j=G.backslashes=!0,O=K();continue}break}if(!0===L){if(H=!0,!0===E)continue;break}}else B=G.negated=!0,k++}else{if(_.push(C),x.push(G),G={value:"",depth:0,isGlob:!1},!0===H)continue;if(T===i&&C===k+1){k+=2;continue}P=C+1}}else j=G.backslashes=!0,O=K(),O===c&&($=!0)}!0===w.noext&&(M=!1,L=!1);let q=R,z="",X="";k>0&&(z=R.slice(0,k),R=R.slice(k),P-=k),q&&!0===L&&P>0?(q=R.slice(0,P),X=R.slice(P)):!0===L?(q="",X=R):q=R,q&&""!==q&&"/"!==q&&q!==R&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===w.unescape&&(X&&(X=e.removeBackslashes(X)),q&&!0===j&&(q=e.removeBackslashes(q)));const Y={prefix:z,input:b,start:k,base:q,glob:X,isBrace:I,isBracket:D,isGlob:L,isExtglob:M,isGlobstar:N,negated:B,negatedExtglob:F};if(!0===w.tokens&&(Y.maxDepth=0,g(O)||x.push(G),Y.tokens=x),!0===w.parts||!0===w.tokens){let e;for(let t=0;t<_.length;t++){const r=e?e+1:k,n=_[t],o=b.slice(r,n);w.tokens&&(0===t&&0!==k?(x[t].isPrefix=!0,x[t].value=z):x[t].value=o,y(x[t]),Y.maxDepth+=x[t].depth),0===t&&""===o||A.push(o),e=n}if(e&&e+1<b.length){const t=b.slice(e+1);A.push(t),w.tokens&&(x[x.length-1].value=t,y(x[x.length-1]),Y.maxDepth+=x[x.length-1].depth)}Y.slashes=_,Y.parts=A}return Y},at}(),n=St(),o=wt(),i=vt(),s=(e,t,r=!1)=>{if(Array.isArray(e)){const n=e.map(e=>s(e,t,r)),o=e=>{for(const t of n){const r=t(e);if(r)return r}return!1};return o}const n=(i=e)&&"object"==typeof i&&!Array.isArray(i)&&e.tokens&&e.input;var i;if(""===e||"string"!=typeof e&&!n)throw new TypeError("Expected pattern to be a non-empty string");const a=t||{},c=o.isWindows(t),l=n?s.compileRe(e,t):s.makeRe(e,t,!1,!0),u=l.state;delete l.state;let d=()=>!1;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};d=s(a.ignore,e,r)}const p=(r,n=!1)=>{const{isMatch:o,match:i,output:p}=s.test(r,l,t,{glob:e,posix:c}),f={glob:e,state:u,regex:l,posix:c,input:r,output:p,match:i,isMatch:o};return"function"==typeof a.onResult&&a.onResult(f),!1===o?(f.isMatch=!1,!!n&&f):d(r)?("function"==typeof a.onIgnore&&a.onIgnore(f),f.isMatch=!1,!!n&&f):("function"==typeof a.onMatch&&a.onMatch(f),!n||f)};return r&&(p.state=u),p};return s.test=(e,t,r,{glob:n,posix:i}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=r||{},c=a.format||(i?o.toPosixSlashes:null);let l=e===n,u=l&&c?c(e):e;return!1===l&&(u=c?c(e):e,l=u===n),!1!==l&&!0!==a.capture||(l=!0===a.matchBase||!0===a.basename?s.matchBase(e,t,r,i):t.exec(u)),{isMatch:Boolean(l),match:l,output:u}},s.matchBase=(t,r,n,i=o.isWindows(n))=>(r instanceof RegExp?r:s.makeRe(r,n)).test(e.basename(t)),s.isMatch=(e,t,r)=>s(t,r)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):n(e,{...t,fastpaths:!1}),s.scan=(e,r)=>t(e,r),s.compileRe=(e,t,r=!1,n=!1)=>{if(!0===r)return e.output;const o=t||{},i=o.contains?"":"^",a=o.contains?"":"$";let c=`${i}(?:${e.output})${a}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const l=s.toRegex(c,t);return!0===n&&(l.state=e),l},s.makeRe=(e,t={},r=!1,o=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(i.output=n.fastpaths(e,t)),i.output||(i=n(e,t)),s.compileRe(i,t,r,o)},s.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},s.constants=i,dt=s}function _t(){return mt?ft:(mt=1,ft=Et())}function xt(){if(yt)return Oe;yt=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.isAbsolute=Oe.partitionAbsoluteAndRelative=Oe.removeDuplicateSlashes=Oe.matchAny=Oe.convertPatternsToRe=Oe.makeRe=Oe.getPatternParts=Oe.expandBraceExpansion=Oe.expandPatternsWithBraceExpansion=Oe.isAffectDepthOfReadingPattern=Oe.endsWithSlashGlobStar=Oe.hasGlobStar=Oe.getBaseDirectory=Oe.isPatternRelatedToParentDirectory=Oe.getPatternsOutsideCurrentDirectory=Oe.getPatternsInsideCurrentDirectory=Oe.getPositivePatterns=Oe.getNegativePatterns=Oe.isPositivePattern=Oe.isNegativePattern=Oe.convertToNegativePattern=Oe.convertToPositivePattern=Oe.isDynamicPattern=Oe.isStaticPattern=void 0;const e=r,t=ke(),o=function(){if(gt)return ht;gt=1;const e=n,t=nt(),r=_t(),o=wt(),i=e=>""===e||"./"===e,s=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},a=(e,t,n)=>{t=[].concat(t),e=[].concat(e);let o=new Set,i=new Set,s=new Set,a=0,c=e=>{s.add(e.output),n&&n.onResult&&n.onResult(e)};for(let s=0;s<t.length;s++){let l=r(String(t[s]),{...n,onResult:c},!0),u=l.state.negated||l.state.negatedExtglob;u&&a++;for(let t of e){let e=l(t,!0);(u?!e.isMatch:e.isMatch)&&(u?o.add(e.output):(o.delete(e.output),i.add(e.output)))}}let l=(a===t.length?[...s]:[...i]).filter(e=>!o.has(e));if(n&&0===l.length){if(!0===n.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===n.nonull||!0===n.nullglob)return n.unescape?t.map(e=>e.replace(/\\/g,"")):t}return l};return a.match=a,a.matcher=(e,t)=>r(e,t),a.any=a.isMatch=(e,t,n)=>r(t,n)(e),a.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],i=new Set(a(e,t,{...r,onResult:e=>{r.onResult&&r.onResult(e),o.push(e.output)}}));for(let e of o)i.has(e)||n.add(e);return[...n]},a.contains=(t,r,n)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);if(Array.isArray(r))return r.some(e=>a.contains(t,e,n));if("string"==typeof r){if(i(t)||i(r))return!1;if(t.includes(r)||t.startsWith("./")&&t.slice(2).includes(r))return!0}return a.isMatch(t,r,{...n,contains:!0})},a.matchKeys=(e,t,r)=>{if(!o.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=a(Object.keys(e),t,r),i={};for(let t of n)i[t]=e[t];return i},a.some=(e,t,n)=>{let o=[].concat(e);for(let e of[].concat(t)){let t=r(String(e),n);if(o.some(e=>t(e)))return!0}return!1},a.every=(e,t,n)=>{let o=[].concat(e);for(let e of[].concat(t)){let t=r(String(e),n);if(!o.every(e=>t(e)))return!1}return!0},a.all=(t,n,o)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);return[].concat(n).every(e=>r(e,o)(t))},a.capture=(e,t,n)=>{let i=o.isWindows(n),s=r.makeRe(String(e),{...n,capture:!0}).exec(i?o.toPosixSlashes(t):t);if(s)return s.slice(1).map(e=>void 0===e?"":e)},a.makeRe=(...e)=>r.makeRe(...e),a.scan=(...e)=>r.scan(...e),a.parse=(e,n)=>{let o=[];for(let i of[].concat(e||[]))for(let e of t(String(i),n))o.push(r.parse(e,n));return o},a.braces=(e,r)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return r&&!0===r.nobrace||!s(e)?[e]:t(e,r)},a.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return a.braces(e,{...t,expand:!0})},a.hasBraces=s,ht=a}(),i=/[*?]|^!/,s=/\[[^[]*]/,a=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,c=/[!*+?@]\([^(]*\)/,l=/,|\.\./,u=/(?!^)\/{2,}/g;function d(e,t={}){return!p(e,t)}function p(e,t={}){return""!==e&&(!(!1!==t.caseSensitiveMatch&&!e.includes("\\"))||(!!(i.test(e)||s.test(e)||a.test(e))||(!(!1===t.extglob||!c.test(e))||!(!1===t.braceExpansion||!function(e){const t=e.indexOf("{");if(-1===t)return!1;const r=e.indexOf("}",t+1);if(-1===r)return!1;const n=e.slice(t,r);return l.test(n)}(e)))))}function f(e){return e.startsWith("!")&&"("!==e[1]}function m(e){return!f(e)}function h(e){return e.startsWith("..")||e.startsWith("./..")}function g(e){return e.endsWith("/**")}function y(e){const t=o.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((e,t)=>e.length-t.length),t.filter(e=>""!==e)}function b(e,t){return o.makeRe(e,t)}function v(t){return e.isAbsolute(t)}return Oe.isStaticPattern=d,Oe.isDynamicPattern=p,Oe.convertToPositivePattern=function(e){return f(e)?e.slice(1):e},Oe.convertToNegativePattern=function(e){return"!"+e},Oe.isNegativePattern=f,Oe.isPositivePattern=m,Oe.getNegativePatterns=function(e){return e.filter(f)},Oe.getPositivePatterns=function(e){return e.filter(m)},Oe.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!h(e))},Oe.getPatternsOutsideCurrentDirectory=function(e){return e.filter(h)},Oe.isPatternRelatedToParentDirectory=h,Oe.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},Oe.hasGlobStar=function(e){return e.includes("**")},Oe.endsWithSlashGlobStar=g,Oe.isAffectDepthOfReadingPattern=function(t){const r=e.basename(t);return g(t)||d(r)},Oe.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(y(t)),[])},Oe.expandBraceExpansion=y,Oe.getPatternParts=function(e,t){let{parts:r}=o.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===r.length&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r},Oe.makeRe=b,Oe.convertPatternsToRe=function(e,t){return e.map(e=>b(e,t))},Oe.matchAny=function(e,t){return t.some(t=>t.test(e))},Oe.removeDuplicateSlashes=function(e){return e.replace(u,"/")},Oe.partitionAbsoluteAndRelative=function(e){const t=[],r=[];for(const n of e)v(n)?t.push(n):r.push(n);return[t,r]},Oe.isAbsolute=v,Oe}var At,Tt,Ot,Rt={};function Ct(){if(Tt)return At;Tt=1;const e=o.PassThrough,t=Array.prototype.slice;function r(t,n){if(Array.isArray(t))for(let e=0,o=t.length;e<o;e++)t[e]=r(t[e],n);else{if(!t._readableState&&t.pipe&&(t=t.pipe(e(n))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}return At=function(){const n=[],o=t.call(arguments);let i=!1,s=o[o.length-1];s&&!Array.isArray(s)&&null==s.pipe?o.pop():s={};const a=!1!==s.end,c=!0===s.pipeError;null==s.objectMode&&(s.objectMode=!0);null==s.highWaterMark&&(s.highWaterMark=65536);const l=e(s);function u(){for(let e=0,t=arguments.length;e<t;e++)n.push(r(arguments[e],s));return d(),this}function d(){if(i)return;i=!0;let e=n.shift();if(!e)return void process.nextTick(p);Array.isArray(e)||(e=[e]);let t=e.length+1;function r(){--t>0||(i=!1,d())}function o(e){function t(){e.removeListener("merge2UnpipeEnd",t),e.removeListener("end",t),c&&e.removeListener("error",n),r()}function n(e){l.emit("error",e)}if(e._readableState.endEmitted)return r();e.on("merge2UnpipeEnd",t),e.on("end",t),c&&e.on("error",n),e.pipe(l,{end:!1}),e.resume()}for(let t=0;t<e.length;t++)o(e[t]);r()}function p(){i=!1,l.emit("queueDrain"),a&&l.end()}l.setMaxListeners(0),l.add=u,l.on("unpipe",function(e){e.emit("merge2UnpipeEnd")}),o.length&&u.apply(null,o);return l},At}var kt,Pt,It,Dt={};function Lt(){if(kt)return Dt;return kt=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.isEmpty=Dt.isString=void 0,Dt.isString=function(e){return"string"==typeof e},Dt.isEmpty=function(e){return""===e},Dt}function Mt(){if(Pt)return ue;Pt=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.string=ue.stream=ue.pattern=ue.path=ue.fs=ue.errno=ue.array=void 0;const e=pe();ue.array=e;const t=he();ue.errno=t;const r=function(){if(ge)return ye;ge=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return ye.createDirentFromStats=function(t,r){return new e(t,r)},ye}();ue.fs=r;const n=we();ue.path=n;const o=xt();ue.pattern=o;const i=function(){if(Ot)return Rt;Ot=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.merge=void 0;const e=Ct();function t(e){e.forEach(e=>e.emit("close"))}return Rt.merge=function(r){const n=e(r);return r.forEach(e=>{e.once("error",e=>n.emit("error",e))}),n.once("close",()=>t(r)),n.once("end",()=>t(r)),n},Rt}();ue.stream=i;const s=Lt();return ue.string=s,ue}var Nt,$t={},jt={},Bt={},Ft={},Ht={},Ut={},Gt={},Wt={},Vt={};function Kt(){if(Nt)return Vt;function e(e,t){e(t)}function t(e,t){e(null,t)}return Nt=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.read=void 0,Vt.read=function(r,n,o){n.fs.lstat(r,(i,s)=>{null===i?s.isSymbolicLink()&&n.followSymbolicLink?n.fs.stat(r,(r,i)=>{if(null!==r)return n.throwErrorOnBrokenSymbolicLink?void e(o,r):void t(o,s);n.markSymbolicLink&&(i.isSymbolicLink=()=>!0),t(o,i)}):t(o,s):e(o,i)})},Vt}var qt,zt={};var Xt,Yt,Qt,Zt,Jt,er,tr,rr={},nr={};function or(){if(Yt)return rr;Yt=1,Object.defineProperty(rr,"__esModule",{value:!0});const e=(Xt||(Xt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(nr)),nr);return rr.default=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return null!=e?e:t}},rr}function ir(){if(Qt)return Wt;Qt=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.statSync=Wt.stat=Wt.Settings=void 0;const e=Kt(),t=(qt||(qt=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.read=void 0,zt.read=function(e,t){const r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{const r=t.fs.statSync(e);return t.markSymbolicLink&&(r.isSymbolicLink=()=>!0),r}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw e}}),zt),r=or();function n(e={}){return e instanceof r.default?e:new r.default(e)}return Wt.Settings=r.default,Wt.stat=function(t,r,o){"function"!=typeof r?e.read(t,n(r),o):e.read(t,n(),r)},Wt.statSync=function(e,r){const o=n(r);return t.read(e,o)},Wt}
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ar,cr={};function lr(){if(ar)return cr;ar=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const e=process.versions.node.split(".");if(void 0===e[0]||void 0===e[1])throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const t=Number.parseInt(e[0],10),r=Number.parseInt(e[1],10),n=t>10,o=10===t&&r>=10;return cr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=n||o,cr}var ur,dr,pr={},fr={};function mr(){if(dr)return pr;dr=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.fs=void 0;const e=function(){if(ur)return fr;ur=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.createDirentFromStats=void 0;class e{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}return fr.createDirentFromStats=function(t,r){return new e(t,r)},fr}();return pr.fs=e,pr}var hr,gr,yr={};function br(){if(hr)return yr;return hr=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.joinPathSegments=void 0,yr.joinPathSegments=function(e,t,r){return e.endsWith(r)?e+t:e+r+t},yr}function vr(){if(gr)return Gt;gr=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.readdir=Gt.readdirWithFileTypes=Gt.read=void 0;const e=ir(),t=function(){if(tr)return er;tr=1,er=function(t,r){let n,o,i,s=!0;function a(t){function o(){r&&r(t,n),r=null}s?e(o):o()}function c(e,t,r){n[e]=r,(0===--o||t)&&a(t)}Array.isArray(t)?(n=[],o=t.length):(i=Object.keys(t),n={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,r){c(e,t,r)})}):t.forEach(function(e,t){e(function(e,r){c(t,e,r)})}):a(null),s=!1};const e=sr();return er}(),r=lr(),n=mr(),o=br();function i(e,r,i){r.fs.readdir(e,{withFileTypes:!0},(s,l)=>{if(null!==s)return void a(i,s);const u=l.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,r.pathSegmentSeparator)}));if(!r.followSymbolicLinks)return void c(i,u);const d=u.map(e=>function(e,t){return r=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void r(o):void r(null,e);e.dirent=n.fs.createDirentFromStats(e.name,i),r(null,e)}):r(null,e)}}(e,r));t(d,(e,t)=>{null===e?c(i,t):a(i,e)})})}function s(r,i,s){i.fs.readdir(r,(l,u)=>{if(null!==l)return void a(s,l);const d=u.map(t=>{const s=o.joinPathSegments(r,t,i.pathSegmentSeparator);return r=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void r(e);const a={name:t,path:s,dirent:n.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),r(null,a)})}});t(d,(e,t)=>{null===e?c(s,t):a(s,e)})})}function a(e,t){e(t)}function c(e,t){e(null,t)}return Gt.read=function(e,t,n){t.stats||!r.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,n):i(e,t,n)},Gt.readdirWithFileTypes=i,Gt.readdir=s,Gt}var wr,Sr={};var Er,_r,xr,Ar={},Tr={};function Or(){return Er||(Er=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const r=t;e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync},e.createFileSystemAdapter=function(t){return void 0===t?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}}(Tr)),Tr}function Rr(){if(xr)return Ut;xr=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Settings=Ut.scandirSync=Ut.scandir=void 0;const e=vr(),t=function(){if(wr)return Sr;wr=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.readdir=Sr.readdirWithFileTypes=Sr.read=void 0;const e=ir(),t=lr(),r=mr(),n=br();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:n.joinPathSegments(e,o.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(i.path);i.dirent=r.fs.createDirentFromStats(i.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return i})}function i(t,o){return o.fs.readdirSync(t).map(i=>{const s=n.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),c={name:i,path:s,dirent:r.fs.createDirentFromStats(i,a)};return o.stats&&(c.stats=a),c})}return Sr.read=function(e,r){return!r.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,r):i(e,r)},Sr.readdirWithFileTypes=o,Sr.readdir=i,Sr}(),n=function(){if(_r)return Ar;_r=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=r,t=ir(),n=Or();return Ar.default=class{constructor(r={}){this._options=r,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Ar}();function o(e={}){return e instanceof n.default?e:new n.default(e)}return Ut.Settings=n.default,Ut.scandir=function(t,r,n){"function"!=typeof r?e.read(t,o(r),n):e.read(t,o(),r)},Ut.scandirSync=function(e,r){const n=o(r);return t.read(e,n)},Ut}var Cr,kr,Pr,Ir={exports:{}};function Dr(){if(Pr)return Ir.exports;Pr=1;var e=(kr||(kr=1,Cr=function(e){var t=new e,r=t;return{get:function(){var n=t;return n.next?t=n.next:(t=new e,r=t),n.next=null,n},release:function(e){r.next=e,r=e}}}),Cr);function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(n),a=null,c=null,l=0,u=null,d={push:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?c?(c.next=f,c=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},drain:r,saturated:r,pause:function(){d.paused=!0},paused:!1,get concurrency(){return i},set concurrency(e){if(!(e>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(i=e,!d.paused)for(;a&&l<i;)l++,p()},running:function(){return l},resume:function(){if(!d.paused)return;if(d.paused=!1,null===a)return l++,void p();for(;a&&l<i;)l++,p()},idle:function(){return 0===l&&0===d.length()},length:function(){var e=a,t=0;for(;e;)e=e.next,t++;return t},getQueue:function(){var e=a,t=[];for(;e;)t.push(e.value),e=e.next;return t},unshift:function(e,n){var f=s.get();f.context=t,f.release=p,f.value=e,f.callback=n||r,f.errorHandler=u,l>=i||d.paused?a?(f.next=a,a=f):(a=f,c=f,d.saturated()):(l++,o.call(t,f.value,f.worked))},empty:r,kill:function(){a=null,c=null,d.drain=r},killAndDrain:function(){a=null,c=null,d.drain(),d.drain=r},error:function(e){u=e},abort:function(){var e=a;a=null,c=null;for(;e;){var t=e.next,n=e.callback,o=e.errorHandler,i=e.value,s=e.context;e.value=null,e.callback=r,e.errorHandler=null,o&&o(new Error("abort"),i),n.call(s,new Error("abort")),e.release(e),e=t}d.drain=r}};return d;function p(e){e&&s.release(e);var r=a;r&&l<=i?d.paused?l--:(c===a&&(c=null),a=r.next,r.next=null,o.call(t,r.value,r.worked),null===c&&d.empty()):0===--l&&d.drain()}}function r(){}function n(){this.value=null,this.callback=r,this.next=null,this.release=r,this.context=null,this.errorHandler=null;var e=this;this.worked=function(t,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=r,e.errorHandler&&i(t,s),o.call(e.context,t,n),e.release(e)}}return Ir.exports=t,Ir.exports.promise=function(e,n,o){"function"==typeof e&&(o=n,n=e,e=null);var i=t(e,function(e,t){n.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,r){s(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.unshift=function(e){var t=new Promise(function(t,r){a(e,function(e,n){e?r(e):t(n)})});return t.catch(r),t},i.drained=function(){return new Promise(function(e){process.nextTick(function(){if(i.idle())e();else{var t=i.drain;i.drain=function(){"function"==typeof t&&t(),e(),i.drain=t}}})})},i},Ir.exports}var Lr,Mr={};function Nr(){if(Lr)return Mr;return Lr=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.joinPathSegments=Mr.replacePathSegmentSeparator=Mr.isAppliedFilter=Mr.isFatalError=void 0,Mr.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Mr.isAppliedFilter=function(e,t){return null===e||e(t)},Mr.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Mr.joinPathSegments=function(e,t,r){return""===e?t:e.endsWith(r)?e+t:e+r+t},Mr}var $r,jr,Br,Fr={};function Hr(){if($r)return Fr;$r=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Nr();return Fr.default=class{constructor(t,r){this._root=t,this._settings=r,this._root=e.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}},Fr}function Ur(){if(jr)return Ht;jr=1,Object.defineProperty(Ht,"__esModule",{value:!0});const e=i,t=Rr(),r=Dr(),n=Nr(),o=Hr();class s extends o.default{constructor(n,o){super(n,o),this._settings=o,this._scandir=t.scandir,this._emitter=new e.EventEmitter,this._queue=r(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,n)=>{if(null===r){for(const t of n)this._handleEntry(t,e.base);t(null,void 0)}else t(r,void 0)})}_handleError(e){!this._isDestroyed&&n.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Ht.default=s,Ht}var Gr,Wr={};var Vr,Kr,qr={},zr={};function Xr(){if(Kr)return qr;Kr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=function(){if(Vr)return zr;Vr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Rr(),t=Nr(),r=Hr();class n extends r.default{constructor(){super(...arguments),this._scandir=e.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(t.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;void 0!==r&&(e.path=t.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===r?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return zr.default=n,zr}();return qr.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings)}read(){return this._reader.read()}},qr}var Yr,Qr,Zr={};function Jr(){if(Qr)return Bt;Qr=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Settings=Bt.walkStream=Bt.walkSync=Bt.walk=void 0;const e=function(){if(Br)return Ft;Br=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Ur();return Ft.default=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new e.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.push(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,this._storage)}),this._reader.read()}},Ft}(),t=function(){if(Gr)return Wr;Gr=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=o,t=Ur();return Wr.default=class{constructor(r,n){this._root=r,this._settings=n,this._reader=new t.default(this._root,this._settings),this._stream=new e.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}},Wr}(),n=Xr(),i=function(){if(Yr)return Zr;Yr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=r,t=Rr();return Zr.default=class{constructor(r={}){this._options=r,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,e.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return null!=e?e:t}},Zr}();function s(e={}){return e instanceof i.default?e:new i.default(e)}return Bt.Settings=i.default,Bt.walk=function(t,r,n){"function"!=typeof r?new e.default(t,s(r)).read(n):new e.default(t,s()).read(r)},Bt.walkSync=function(e,t){const r=s(t);return new n.default(e,r).read()},Bt.walkStream=function(e,r){const n=s(r);return new t.default(e,n).read()},Bt}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=r,t=ir(),n=Mt();return tn.default=class{constructor(e){this._settings=e,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return e.resolve(this._settings.cwd,t)}_makeEntry(e,t){const r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},tn}var nn,on,sn={};function an(){if(nn)return sn;nn=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=o,t=ir(),r=Jr(),n=rn();class i extends n.default{constructor(){super(...arguments),this._walkStream=r.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,r){const n=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(n[e],t[e],r).then(t=>{null!==t&&r.entryFilter(t)&&o.push(t),e===n.length-1&&o.end(),s()}).catch(s);for(let e=0;e<n.length;e++)o.write(e);return o}_getEntry(e,t,r){return this._getStat(e).then(e=>this._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,n)=>null===e?t(n):r(e))})}}return sn.default=i,sn}var cn,ln,un,dn={},pn={},fn={},mn={};function hn(){if(ln)return fn;ln=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=function(){if(cn)return mn;cn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=Mt();return mn.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const t=this._getPatternSegments(e),r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){return e.pattern.getPatternParts(t,this._micromatchOptions).map(t=>e.pattern.isDynamicPattern(t,this._settings)?{dynamic:!0,pattern:t,patternRe:e.pattern.makeRe(t,this._micromatchOptions)}:{dynamic:!1,pattern:t})}_splitSegmentsIntoSections(t){return e.array.splitWhen(t,t=>t.dynamic&&e.pattern.hasGlobStar(t.pattern))}},mn}();class t extends e.default{match(e){const t=e.split("/"),r=t.length,n=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of n){const n=e.sections[0];if(!e.complete&&r>n.length)return!0;if(t.every((t,r)=>{const n=e.segments[r];return!(!n.dynamic||!n.patternRe.test(t))||!n.dynamic&&n.pattern===t}))return!0}return!1}}return fn.default=t,fn}var gn,yn={};var bn,vn={};var wn,Sn,En,_n={};function xn(){if(Sn)return dn;Sn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=r,t=function(){if(un)return pn;un=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Mt(),t=hn();return pn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const n=this._getMatcher(t),o=this._getNegativePatternsRe(r);return t=>this._filter(e,t,n,o)}_getMatcher(e){return new t.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(e.pattern.isAffectDepthOfReadingPattern);return e.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path))return!1;if(this._isSkippedSymbolicLink(r))return!1;const i=e.path.removeLeadingDotSegment(r.path);return!this._isSkippedByPositivePatterns(i,n)&&this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(e,t){return this._settings.deep!==1/0&&this._getEntryLevel(e,t)>=this._settings.deep}_getEntryLevel(e,t){const r=t.split("/").length;return""===e?r:r-e.split("/").length}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(t,r){return!e.pattern.matchAny(t,r)}},pn}(),n=function(){if(gn)return yn;gn=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Mt();return yn.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,r){const[n,o]=e.pattern.partitionAbsoluteAndRelative(r),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,r){const n=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,t,r){return!!this._isMatchToPatterns(e,t.positive.all,r)&&(!this._isMatchToPatterns(e,t.negative.relative,r)&&!this._isMatchToAbsoluteNegative(e,t.negative.absolute,r))}_isMatchToAbsoluteNegative(t,r,n){if(0===r.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,r,n)}_isMatchToPatterns(t,r,n){if(0===r.length)return!1;const o=e.pattern.matchAny(t,r);return!o&&n?e.pattern.matchAny(t+"/",r):o}},yn}(),o=function(){if(bn)return vn;bn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=Mt();return vn.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},vn}(),i=function(){if(wn)return _n;wn=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Mt();return _n.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(t){let r=t.path;return this._settings.absolute&&(r=e.path.makeAbsolute(this._settings.cwd,r),r=e.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}},_n}();return dn.default=class{constructor(e){this._settings=e,this.errorFilter=new o.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new i.default(this._settings)}_getRootDirectory(t){return e.resolve(this._settings.cwd,t.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}},dn}function An(){if(En)return $t;En=1,Object.defineProperty($t,"__esModule",{value:!0});const e=function(){if(on)return jt;on=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=Jr(),t=rn(),r=an();class n extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new r.default(this._settings)}dynamic(e,t){return new Promise((r,n)=>{this._walkAsync(e,t,(e,t)=>{null===e?r(t):n(e)})})}async static(e,t){const r=[],n=this._readerStream.static(e,t);return new Promise((e,t)=>{n.once("error",t),n.on("data",e=>r.push(e)),n.once("end",()=>e(r))})}}return jt.default=n,jt}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}async read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return(await this.api(t,e,r)).map(e=>r.transform(e))}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return $t.default=r,$t}var Tn,On={};var Rn,Cn,kn={},Pn={};function In(){if(Cn)return kn;Cn=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=function(){if(Rn)return Pn;Rn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=ir(),t=Jr(),r=rn();class n extends r.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=e.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const n of e){const e=this._getFullEntryPath(n),o=this._getEntry(e,n,t);null!==o&&t.entryFilter(o)&&r.push(o)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}return Pn.default=n,Pn}(),t=xn();class r extends t.default{constructor(){super(...arguments),this._reader=new e.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return kn.default=r,kn}var Dn,Ln,Mn,Nn,$n,jn,Bn,Fn,Hn,Un,Gn={};function Wn(){if(Mn)return Ln;Mn=1;const r=function(){if(It)return le;It=1,Object.defineProperty(le,"__esModule",{value:!0}),le.convertPatternGroupToTask=le.convertPatternGroupsToTasks=le.groupPatternsByBaseDirectory=le.getNegativePatternsAsPositive=le.getPositivePatterns=le.convertPatternsToTasks=le.generate=void 0;const e=Mt();function t(t,r){let n=t;return r.braceExpansion&&(n=e.pattern.expandPatternsWithBraceExpansion(n)),r.baseNameMatch&&(n=n.map(e=>e.includes("/")?e:`**/${e}`)),n.map(t=>e.pattern.removeDuplicateSlashes(t))}function r(t,r,n){const o=[],c=e.pattern.getPatternsOutsideCurrentDirectory(t),l=e.pattern.getPatternsInsideCurrentDirectory(t),u=i(c),d=i(l);return o.push(...s(u,r,n)),"."in d?o.push(a(".",l,r,n)):o.push(...s(d,r,n)),o}function n(t){return e.pattern.getPositivePatterns(t)}function o(t,r){return e.pattern.getNegativePatterns(t).concat(r).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,r)=>{const n=e.pattern.getBaseDirectory(r);return n in t?t[n].push(r):t[n]=[r],t},{})}function s(e,t,r){return Object.keys(e).map(n=>a(n,e[n],t,r))}function a(t,r,n,o){return{dynamic:o,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(e.pattern.convertToNegativePattern))}}return le.generate=function(i,s){const a=t(i,s),c=t(s.ignore,s),l=n(a),u=o(a,c),d=l.filter(t=>e.pattern.isStaticPattern(t,s)),p=l.filter(t=>e.pattern.isDynamicPattern(t,s)),f=r(d,u,!1),m=r(p,u,!0);return f.concat(m)},le.convertPatternsToTasks=r,le.getPositivePatterns=n,le.getNegativePatternsAsPositive=o,le.groupPatternsByBaseDirectory=i,le.convertPatternGroupsToTasks=s,le.convertPatternGroupToTask=a,le}(),n=An(),i=function(){if(Tn)return On;Tn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=o,t=an(),r=xn();class n extends r.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",n.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}return On.default=n,On}(),s=In(),a=(Dn||(Dn=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=t,o=e,i=Math.max(o.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync},r.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}}(Gn)),Gn),c=Mt();async function l(e,t){d(e);const r=u(e,n.default,t),o=await Promise.all(r);return c.array.flatten(o)}function u(e,t,n){const o=[].concat(e),i=new a.default(n),s=r.generate(o,i),c=new t(i);return s.map(c.read,c)}function d(e){if(![].concat(e).every(e=>c.string.isString(e)&&!c.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}return function(e){function t(e,t){d(e);const r=u(e,s.default,t);return c.array.flatten(r)}function n(e,t){d(e);const r=u(e,i.default,t);return c.stream.merge(r)}var o,l;e.glob=e,e.globSync=t,e.globStream=n,e.async=e,e.sync=t,e.stream=n,e.generateTasks=function(e,t){d(e);const n=[].concat(e),o=new a.default(t);return r.generate(n,o)},e.isDynamicPattern=function(e,t){d(e);const r=new a.default(t);return c.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return d(e),c.path.escape(e)},e.convertPathToPattern=function(e){return d(e),c.path.convertPathToPattern(e)},(o=e.posix||(e.posix={})).escapePath=function(e){return d(e),c.path.escapePosixPath(e)},o.convertPathToPattern=function(e){return d(e),c.path.convertPosixPathToPattern(e)},(l=e.win32||(e.win32={})).escapePath=function(e){return d(e),c.path.escapeWindowsPath(e)},l.convertPathToPattern=function(e){return d(e),c.path.convertWindowsPathToPattern(e)}}(l||(l={})),Ln=l}function Vn(){if(Nn)return ce;Nn=1;var r=e,n=t,o=Wn(),i={};ce.shell=i;var s=Object.create(i);ce.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting(){this.reset(),this.silent=!0}};l.reset(),ce.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function d(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function f(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}ce.state=u,delete process.env.OLDPWD,ce.isObject=d,ce.log=p,ce.convertErrorOutput=f;class m extends Error{constructor(e){super(e.toString()),this.returnValue=e}}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1,fatal:l.fatal};"number"==typeof t&&d(r)?r.code=t:d(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=f(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,r.fatal){var i=new Error(o);throw i.code=r.code,i}if(e.length>0&&!r.silent&&p(o),!r.continue)throw new m(new g("",u.error,u.errorCode))}function g(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,_.forEach(function(e){n[e]=s[e].bind(n)}),n}function y(e,t,r){if(r=r||{},"string"!=typeof e&&!d(e))throw new TypeError("options must be strings or key-value pairs");if(!d(t))throw new TypeError("parseOptions() internal error: map must be an object");if(!d(r))throw new TypeError("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r)})}else Object.keys(e).forEach(function(o){if("-"===o[0]){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r)}else o in n?n[o]=e[o]:h("option not recognized: {"+o+":...}",r)});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r,n=function(){var e=Object.assign({},l.globOptions),t={mark:"markDirectories",matchBase:"baseNameMatch"};Object.keys(t).forEach(function(r){var n=t[r];r in l.globOptions&&(e[n]=l.globOptions[r])});var r={nobrace:"braceExpansion",noglobstar:"globstar",noext:"extglob",nocase:"caseSensitiveMatch"};return Object.keys(r).forEach(function(t){var n=r[t];t in l.globOptions&&(e[n]=!l.globOptions[t])}),Object.assign({},{onlyFiles:!1,followSymbolicLinks:!1},e)}();try{r=o.sync(e,n)}catch(t){r=[e]}r=r.length>0?r.sort():[e],n.nodir&&(r=r.filter(function(e){return!w(e).isDirectory()})),t=t.concat(r)}}),t}ce.CommandError=m,ce.error=h,ce.ShellString=g,ce.parseOptions=y,ce.expand=b;var v="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function w(){return n.lstatSync.apply(n,arguments)}function S(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{d(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return d(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{d(n.cmdOptions)&&(i[0]=y(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if(!(e instanceof m))throw e;o=e.returnValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal||n.handlesFatalDynamically)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new g(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}ce.buffer=v,ce.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},ce.statFollowLinks=function(){return n.statSync.apply(n,arguments)},ce.statNoFollowLinks=w,ce.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n<t;n++)r+=e(1);return r}(20)},ce.wrap=S,ce.readFromPipe=function(){return u.pipedValue};var E={allowGlobbing:!0,canReceivePipe:!1,cmdOptions:null,globStart:1,handlesFatalDynamically:!1,pipeOnly:!1,wrapOutput:!0,unix:!0},_=[];return ce.register=function(e,t,r){if(r=r||{},Object.keys(r).forEach(function(e){if(!E.hasOwnProperty(e))throw new Error("Unknown option '"+e+"'");if(typeof r[e]!=typeof E[e])throw new TypeError("Unsupported type '"+typeof r[e]+"' for option '"+e+"'")}),r=Object.assign({},E,r),i.hasOwnProperty(e))throw new Error("Command `"+e+"` already exists");r.pipeOnly?(r.canReceivePipe=!0,s[e]=S(e,t,r)):i[e]=S(e,t,r),r.canReceivePipe&&_.push(e)},ce}function Kn(){if(jn)return $n;jn=1;var e=t,r=Vn();function n(t,n){var i=r.readFromPipe();return n||i||r.error("no paths given"),(n=[].slice.call(arguments,1)).forEach(function(t){e.existsSync(t)?r.statFollowLinks(t).isDirectory()&&r.error(t+": Is a directory"):r.error("no such file or directory: "+t),i+=e.readFileSync(t,"utf8")}),t.number&&(i=function(e){var t=e.split("\n"),r=t.pop();t=t.map(function(e,t){return o(t+1,e)}),r.length&&(r=o(t.length+1,r));return t.push(r),t.join("\n")}(i)),i}function o(e,t){return(" "+e).slice(-6)+"\t"+t}return r.register("cat",n,{canReceivePipe:!0,cmdOptions:{n:"number"}}),$n=n}function qn(){if(Fn)return Bn;Fn=1;var t=e,r=Vn();function n(e,n){n||(n=t.homedir()),"-"===n&&(process.env.OLDPWD?n=process.env.OLDPWD:r.error("could not find previous directory"));try{var o=process.cwd();process.chdir(n),process.env.OLDPWD=o}catch(e){var i;try{r.statFollowLinks(n),i="not a directory: "+n}catch(e){i="no such file or directory: "+n}i&&r.error(i)}return""}return r.register("cd",n,{}),Bn=n}var zn,Xn,Yn,Qn,Zn,Jn,eo,to,ro={exports:{}},no={exports:{}};function oo(){if(Xn)return zn;Xn=1,zn=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function n(t,n,o){e.stat(t,function(e,i){o(e,!e&&r(i,t,n))})}return zn}function io(){if(Qn)return Yn;Qn=1,Yn=r,r.sync=function(t,r){return n(e.statSync(t),r)};var e=t;function r(t,r,o){e.stat(t,function(e,t){o(e,!e&&n(t,r))})}function n(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),s=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,d=r&l||r&c&&o===s||r&a&&n===i||r&u&&0===i;return d}(e,t)}return Yn}function so(){if(to)return eo;to=1;const e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=r,n=e?";":":",o=function(){if(Jn)return Zn;var e;function t(r,n,o){if("function"==typeof n&&(o=n,n={}),!o){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(e,o){t(r,n||{},function(t,r){t?o(t):e(r)})})}e(r,n||{},function(e,t){e&&("EACCES"===e.code||n&&n.ignoreErrors)&&(e=null,t=!1),o(e,t)})}return Jn=1,e="win32"===process.platform||re.TESTING_WINDOWS?oo():io(),Zn=t,t.sync=function(t,r){try{return e.sync(t,r||{})}catch(e){if(r&&r.ignoreErrors||"EACCES"===e.code)return!1;throw e}},Zn}(),i=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),s=(t,r)=>{const o=r.colon||n,i=t.match(/\//)||e&&t.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(o)],s=e?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=e?s.split(o):[""];return e&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:i,pathExt:a,pathExtExe:s}},a=(e,r,n)=>{"function"==typeof r&&(n=r,r={}),r||(r={});const{pathEnv:a,pathExt:c,pathExtExe:l}=s(e,r),u=[],d=n=>new Promise((o,s)=>{if(n===a.length)return r.all&&u.length?o(u):s(i(e));const c=a[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=t.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;o(p(f,n,0))}),p=(e,t,n)=>new Promise((i,s)=>{if(n===c.length)return i(d(t+1));const a=c[n];o(e+a,{pathExt:l},(o,s)=>{if(!o&&s){if(!r.all)return i(e+a);u.push(e+a)}return i(p(e,t,n+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};return eo=a,a.sync=(e,r)=>{r=r||{};const{pathEnv:n,pathExt:a,pathExtExe:c}=s(e,r),l=[];for(let i=0;i<n.length;i++){const s=n[i],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=t.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<a.length;e++){const t=p+a[e];try{if(o.sync(t,{pathExt:c})){if(!r.all)return t;l.push(t)}}catch(e){}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw i(e)},eo}var ao,co,lo,uo={exports:{}};function po(){if(ao)return uo.exports;ao=1;const e=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};return uo.exports=e,uo.exports.default=e,uo.exports}var fo,mo,ho,go,yo,bo,vo,wo,So,Eo,_o,xo,Ao,To,Oo={};function Ro(){return ho?mo:(ho=1,mo=/^#!(.*)/)}function Co(){if(yo)return go;yo=1;const e=Ro();return go=(t="")=>{const r=t.match(e);if(!r)return null;const[n,o]=r[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i},go}function ko(){if(So)return wo;So=1;const e=r,n=function(){if(lo)return co;lo=1;const e=r,t=so(),n=po();function o(r,o){const i=r.options.env||process.env,s=process.cwd(),a=null!=r.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(r.options.cwd)}catch(e){}let l;try{l=t.sync(r.command,{path:i[n({env:i})],pathExt:o?e.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return l&&(l=e.resolve(a?r.options.cwd:"",l)),l}return co=function(e){return o(e)||o(e,!0)}}(),o=function(){if(fo)return Oo;fo=1;const e=/([()\][%!^"`<>&|;, *?])/g;return Oo.command=function(t){return t.replace(e,"^$1")},Oo.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t},Oo}(),i=function(){if(vo)return bo;vo=1;const e=t,r=Co();return bo=function(t){const n=Buffer.alloc(150);let o;try{o=e.openSync(t,"r"),e.readSync(o,n,0,150,0),e.closeSync(o)}catch(e){}return r(n.toString())},bo}(),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(t){if(!s)return t;const r=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(t),l=!a.test(r);if(t.options.forceShell||l){const n=c.test(r);t.command=e.normalize(t.command),t.command=o.command(t.command),t.args=t.args.map(e=>o.argument(e,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}return wo=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:l(n)},wo}function Po(){if(_o)return Eo;_o=1;const e="win32"===process.platform;function t(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function r(r,n){return e&&1===r&&!n.file?t(n.original,"spawn"):null}return Eo={hookChildProcess:function(t,n){if(!e)return;const o=t.emit;t.emit=function(e,i){if("exit"===e){const e=r(i,n);if(e)return o.call(t,"error",e)}return o.apply(t,arguments)}},verifyENOENT:r,verifyENOENTSync:function(r,n){return e&&1===r&&!n.file?t(n.original,"spawnSync"):null},notFoundError:t},Eo}function Io(){if(xo)return no.exports;xo=1;const e=s,t=ko(),r=Po();function n(n,o,i){const s=t(n,o,i),a=e.spawn(s.command,s.args,s.options);return r.hookChildProcess(a,s),a}return no.exports=n,no.exports.spawn=n,no.exports.sync=function(n,o,i){const s=t(n,o,i),a=e.spawnSync(s.command,s.args,s.options);return a.error=a.error||r.verifyENOENTSync(a.status,s),a},no.exports._parse=t,no.exports._enoent=r,no.exports}var Do,Lo={exports:{}};var Mo,No,$o={exports:{}},jo={exports:{}};function Bo(){if(Mo)return jo.exports;Mo=1;const e=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};return jo.exports=e,jo.exports.default=e,jo.exports}function Fo(){if(No)return $o.exports;No=1;const e=Bo(),t=new WeakMap,r=(r,n={})=>{if("function"!=typeof r)throw new TypeError("Expected a function");let o,i=0;const s=r.displayName||r.name||"<anonymous>",a=function(...e){if(t.set(a,++i),1===i)o=r.apply(this,e),r=null;else if(!0===n.throw)throw new Error(`Function \`${s}\` can only be called once`);return o};return e(a,r),t.set(a,i),a};return $o.exports=r,$o.exports.default=r,$o.exports.callCount=e=>{if(!t.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return t.get(e)},$o.exports}var Ho,Uo={},Go={},Wo={};var Vo,Ko,qo,zo,Xo,Yo={};function Qo(){if(Vo)return Yo;Vo=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.SIGRTMAX=Yo.getRealtimeSignals=void 0;Yo.getRealtimeSignals=function(){const n=r-t+1;return Array.from({length:n},e)};const e=function(e,r){return{name:`SIGRT${r+1}`,number:t+r,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},t=34,r=64;return Yo.SIGRTMAX=r,Yo}function Zo(){if(Ko)return Go;Ko=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.getSignals=void 0;var t=e,r=(Ho||(Ho=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.SIGNALS=void 0,Wo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]),Wo),n=Qo();Go.getSignals=function(){const e=(0,n.getRealtimeSignals)();return[...r.SIGNALS,...e].map(o)};const o=function({name:e,number:r,description:n,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=t.constants,c=void 0!==a;return{name:e,number:c?a:r,description:n,supported:c,action:o,forced:i,standard:s}};return Go}function Jo(){if(Xo)return zo;Xo=1;const{signalsByName:t}=function(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.signalsByNumber=Uo.signalsByName=void 0;var t=e,r=Zo(),n=Qo();const o=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}},i=(0,r.getSignals)().reduce(o,{});Uo.signalsByName=i;const s=function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:l}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:l}}},a=function(e,r){const n=r.find(({name:r})=>t.constants.signals[r]===e);return void 0!==n?n:r.find(t=>t.number===e)},c=function(){const e=(0,r.getSignals)(),t=n.SIGRTMAX+1,o=Array.from({length:t},(t,r)=>s(r,e));return Object.assign({},...o)}();return Uo.signalsByNumber=c,Uo}();return zo=({stdout:e,stderr:r,all:n,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:l,isCanceled:u,killed:d,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:t[i].description,m=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:p,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:u}),h=`Command ${m}: ${a}`,g="[object Error]"===Object.prototype.toString.call(o),y=g?`${h}\n${o.message}`:h,b=[y,r,e].filter(Boolean).join("\n");return g?(o.originalMessage=o.message,o.message=b):o=new Error(b),o.shortMessage=y,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=r,void 0!==n&&(o.all=n),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(l),o.isCanceled=u,o.killed=d&&!l,o},zo}var ei,ti={exports:{}};function ri(){if(ei)return ti.exports;ei=1;const e=["stdin","stdout","stderr"],t=t=>{if(!t)return;const{stdio:r}=t;if(void 0===r)return e.map(e=>t[e]);if((t=>e.some(e=>void 0!==t[e]))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${e.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,e.length);return Array.from({length:n},(e,t)=>r[t])};return ti.exports=t,ti.exports.node=e=>{const r=t(e);return"ipc"===r?"ipc":void 0===r||"string"==typeof r?[r,r,r,"ipc"]:r.includes("ipc")?r:[...r,"ipc"]},ti.exports}var ni,oi,ii,si,ai,ci,li={exports:{}},ui={exports:{}};function di(){return ni||(ni=1,(e=ui).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ui.exports;var e}function pi(){if(si)return ii;si=1;const t=e,r=function(){if(oi)return li.exports;oi=1;var e=re.process;const t=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(t(e)){var r,n=a,o=di(),s=/^win/i.test(e.platform),c=i;"function"!=typeof c&&(c=c.EventEmitter),e.__signal_exit_emitter__?r=e.__signal_exit_emitter__:((r=e.__signal_exit_emitter__=new c).count=0,r.emitted={}),r.infinite||(r.setMaxListeners(1/0),r.infinite=!0),li.exports=function(e,o){if(!t(re.process))return function(){};n.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&f();var i="exit";return o&&o.alwaysLast&&(i="afterexit"),r.on(i,e),function(){r.removeListener(i,e),0===r.listeners("exit").length&&0===r.listeners("afterexit").length&&l()}};var l=function(){p&&t(re.process)&&(p=!1,o.forEach(function(t){try{e.removeListener(t,d[t])}catch(e){}}),e.emit=g,e.reallyExit=m,r.count-=1)};li.exports.unload=l;var u=function(e,t,n){r.emitted[e]||(r.emitted[e]=!0,r.emit(e,t,n))},d={};o.forEach(function(n){d[n]=function(){t(re.process)&&e.listeners(n).length===r.count&&(l(),u("exit",null,n),u("afterexit",null,n),s&&"SIGHUP"===n&&(n="SIGINT"),e.kill(e.pid,n))}}),li.exports.signals=function(){return o};var p=!1,f=function(){!p&&t(re.process)&&(p=!0,r.count+=1,o=o.filter(function(t){try{return e.on(t,d[t]),!0}catch(e){return!1}}),e.emit=y,e.reallyExit=h)};li.exports.load=f;var m=e.reallyExit,h=function(r){t(re.process)&&(e.exitCode=r||0,u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),m.call(e,e.exitCode))},g=e.emit,y=function(r,n){if("exit"===r&&t(re.process)){void 0!==n&&(e.exitCode=n);var o=g.apply(this,arguments);return u("exit",e.exitCode,null),u("afterexit",e.exitCode,null),o}return g.apply(this,arguments)}}else li.exports=function(){return function(){}};return li.exports}(),n=(e,t,r,n)=>{if(!o(t,r,n))return;const i=c(r),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},o=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===t.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),c=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};return ii={spawnedKill:(e,t="SIGTERM",r={})=>{const o=e(t);return n(e,t,r,o),o},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)},t)}),s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},o)=>{if(!t||n)return o;const i=r(()=>{e.kill()});return o.finally(()=>{i()})}}}var fi,mi,hi,gi,yi,bi,vi,wi,Si,Ei,_i,xi,Ai,Ti,Oi,Ri,Ci={exports:{}};function ki(){if(mi)return fi;mi=1;const{PassThrough:e}=o;return fi=t=>{t={...t};const{array:r}=t;let{encoding:n}=t;const o="buffer"===n;let i=!1;r?i=!(n||o):n=n||"utf8",o&&(n=null);const s=new e({objectMode:i});n&&s.setEncoding(n);let a=0;const c=[];return s.on("data",e=>{c.push(e),i?a=c.length:a+=e.length}),s.getBufferedValue=()=>r?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s},fi}function Pi(){if(hi)return Ci.exports;hi=1;const{constants:e}=c,t=o,{promisify:r}=n,i=ki(),s=r(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function l(t,r){if(!t)throw new Error("Expected a stream");r={maxBuffer:1/0,...r};const{maxBuffer:n}=r,o=i(r);return await new Promise((r,i)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),i(t)};(async()=>{try{await s(t,o),r()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>n&&c(new a)})}),o.getBufferedValue()}return Ci.exports=l,Ci.exports.buffer=(e,t)=>l(e,{...t,encoding:"buffer"}),Ci.exports.array=(e,t)=>l(e,{...t,array:!0}),Ci.exports.MaxBufferError=a,Ci.exports}function Ii(){if(yi)return gi;yi=1;const{PassThrough:e}=o;return gi=function(){var t=[],r=new e({objectMode:!0});return r.setMaxListeners(0),r.add=n,r.isEmpty=function(){return 0==t.length},r.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),r;function n(e){return Array.isArray(e)?(e.forEach(n),this):(t.push(e),e.once("end",o.bind(null,e)),e.once("error",r.emit.bind(r,"error")),e.pipe(r,{end:!1}),this)}function o(e){!(t=t.filter(function(t){return t!==e})).length&&r.readable&&r.end()}},gi}function Di(){if(vi)return bi;vi=1;const e=function(){if(ci)return ai;ci=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,ai=e}(),t=Pi(),r=Ii(),n=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},o=(e,{encoding:r,buffer:n,maxBuffer:o})=>{if(e&&n)return r?t(e,{encoding:r,maxBuffer:o}):t.buffer(e,{maxBuffer:o})};return bi={handleInput:(t,r)=>{void 0!==r&&void 0!==t.stdin&&(e(r)?r.pipe(t.stdin):t.stdin.end(r))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=r();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:i,buffer:s,maxBuffer:a},c)=>{const l=o(e,{encoding:i,buffer:s,maxBuffer:a}),u=o(t,{encoding:i,buffer:s,maxBuffer:a}),d=o(r,{encoding:i,buffer:s,maxBuffer:2*a});try{return await Promise.all([c,l,u,d])}catch(o){return Promise.all([{error:o,signal:o.signal,timedOut:o.timedOut},n(e,l),n(t,u),n(r,d)])}},validateInputSync:({input:t})=>{if(e(t))throw new TypeError("The `input` option cannot be a stream in sync mode")}},bi}function Li(){if(_i)return Ei;_i=1;const e=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],t=/^[\w.-]+$/,r=/"/g,n=/ +/g;return Ei={joinCommand:(t,r)=>e(t,r).join(" "),getEscapedCommand:(n,o)=>e(n,o).map(e=>(e=>"string"!=typeof e||t.test(e)?e:`"${e.replace(r,'\\"')}"`)(e)).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(n)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}}function Mi(){if(xi)return ro.exports;xi=1;const e=r,t=s,n=Io(),o=(To||(To=1,Ao=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}),Ao),i=(Do||(Do=1,function(e){const t=r,n=po(),o=e=>{let r;e={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...e};let o=t.resolve(e.cwd);const i=[];for(;r!==o;)i.push(t.join(o,"node_modules/.bin")),r=o,o=t.resolve(o,"..");const s=t.resolve(e.cwd,e.execPath,"..");return i.push(s),i.concat(e.path).join(t.delimiter)};e.exports=o,e.exports.default=o,e.exports.env=t=>{const r={...(t={env:process.env,...t}).env},o=n({env:r});return t.path=r[o],r[o]=e.exports(t),r}}(Lo)),Lo.exports),a=Fo(),c=Jo(),l=ri(),{spawnedKill:u,spawnedCancel:d,setupTimeout:p,validateTimeout:f,setExitHandler:m}=pi(),{handleInput:h,getSpawnedResult:g,makeAllStream:y,validateInputSync:b}=Di(),{mergePromise:v,getSpawnedPromise:w}=function(){if(Si)return wi;Si=1;const e=(async()=>{})().constructor.prototype,t=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(e,t)]);return wi={mergePromise:(e,r)=>{for(const[n,o]of t){const t="function"==typeof r?(...e)=>Reflect.apply(o.value,r(),e):o.value.bind(r);Reflect.defineProperty(e,n,{...o,value:t})}return e},getSpawnedPromise:e=>new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})}),e.on("error",e=>{r(e)}),e.stdin&&e.stdin.on("error",e=>{r(e)})})},wi}(),{joinCommand:S,parseCommand:E,getEscapedCommand:_}=Li(),x=(t,r,o={})=>{const s=n._parse(t,r,o);return t=s.command,r=s.args,(o={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(o=s.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...o}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const s=t?{...process.env,...e}:e;return r?i.env({env:s,cwd:n,execPath:o}):s})(o),o.stdio=l(o),"win32"===process.platform&&"cmd"===e.basename(t,".exe")&&r.unshift("/q"),{file:t,args:r,options:o,parsed:s}},A=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?o(t):t:void 0===r?void 0:"",T=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let l;f(o.options);try{l=t.spawn(o.file,o.args,o.options)}catch(e){const r=new t.ChildProcess,n=Promise.reject(c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1}));return v(r,n)}const b=w(l),E=p(l,o.options,b),T=m(l,o.options,E),O={isCanceled:!1};l.kill=u.bind(null,l.kill.bind(l)),l.cancel=d.bind(null,l,O);const R=a(async()=>{const[{error:e,exitCode:t,signal:r,timedOut:n},a,u,d]=await g(l,o.options,T),p=A(o.options,a),f=A(o.options,u),m=A(o.options,d);if(e||0!==t||null!==r){const a=c({error:e,exitCode:t,signal:r,stdout:p,stderr:f,all:m,command:i,escapedCommand:s,parsed:o,timedOut:n,isCanceled:O.isCanceled,killed:l.killed});if(!o.options.reject)return a;throw a}return{command:i,escapedCommand:s,exitCode:0,stdout:p,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return h(l,o.options.input),l.all=y(l,o.options),v(l,R)};return ro.exports=T,ro.exports.sync=(e,r,n)=>{const o=x(e,r,n),i=S(e,r),s=_(e,r);let a;b(o.options);try{a=t.spawnSync(o.file,o.args,o.options)}catch(e){throw c({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:o,timedOut:!1,isCanceled:!1,killed:!1})}const l=A(o.options,a.stdout,a.error),u=A(o.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=c({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:o,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!o.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},ro.exports.command=(e,t)=>{const[r,...n]=E(e);return T(r,n,t)},ro.exports.commandSync=(e,t)=>{const[r,...n]=E(e);return T.sync(r,n,t)},ro.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=l.node(r),o=process.execArgv.filter(e=>!e.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return T(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})},ro.exports}function Ni(){if(Ti)return Ai;Ti=1;var e=Mi(),t=Vn();function r(r,n,o,i){if(n||t.error("Must specify a non-empty string as a command"),0===(o=[].slice.call(arguments,2)).length)i={};else{var s=o.pop();t.isObject(s)?i=s:(i={},o.push(s))}var a,c,l,u={maxBuffer:20971520,stripFinalNewline:!1,reject:!1},d={input:t.readFromPipe(),shell:!1},p=Object.assign(u,i,d),f=e.sync(n,o,p);return!function(e){if("win32"===process.platform)return e.exitCode&&e.stderr.includes("is not recognized as an internal or external command");return e.failed&&"ENOENT"===e.code}(f)?!function(e){return"string"!=typeof e.stdout||"string"!=typeof e.stderr||"number"!=typeof e.exitCode||!(0!==e.exitCode||!e.failed)}(f)?(a=f.stdout.toString(),c=f.stderr.toString(),l=f.exitCode):(a=f.stdout||"",c=f.stderr||`'${n}' encountered an error during execution`,l=void 0!==f.exitCode&&f.exitCode>0?f.exitCode:1):(a="",c="'"+n+"': command not found",l=127),l&&t.error(c,l,{silent:!0,continue:!0}),new t.ShellString(a,c,l)}return t.register("cmd",r,{cmdOptions:null,globStart:1,canReceivePipe:!0,wrapOutput:!0}),Ai=r}function $i(){if(Ri)return Oi;Ri=1;var e=t,n=r,o=Vn();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime<e.statSync(r).mtime)return}catch(e){}if(o.statNoFollowLinks(t).isSymbolicLink()&&!n.followsymlink){try{o.statNoFollowLinks(r),o.unlinkSync(r)}catch(e){}var s=e.readlinkSync(t);e.symlinkSync(s,r,i?"junction":null)}else{var a=o.buffer(),c=a.length,l=c,u=0,d=null,p=null,f=o.statFollowLinks(t);try{d=e.openSync(t,"r")}catch(e){o.error("copyFileSync: could not read src file ("+t+")")}try{p=e.openSync(r,"w",f.mode)}catch(e){o.error("copyFileSync: could not write to dest file (code="+e.code+"):"+r)}for(;l===c;)l=e.readSync(d,a,0,c,u),e.writeSync(p,a,0,l),u+=l;n.preserve&&(e.fchownSync(p,f.uid,f.gid),e.futimesSync(p,f.atime,f.mtime)),e.closeSync(d),e.closeSync(p)}}function s(t,r,n,c){if(c||(c={}),!(n>=o.config.maxdepth)){n++;var l="win32"===process.platform,u=o.statFollowLinks(t);try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var d=e.readdirSync(t),p=0;p<d.length;p++){var f,m=t+"/"+d[p],h=r+"/"+d[p],g=o.statNoFollowLinks(m);if(c.followsymlink&&a(t,m))console.error("Cycle link found."),f=e.readlinkSync(m),e.symlinkSync(f,h,l?"junction":null);else if(g.isDirectory())s(m,h,n,c);else if(g.isSymbolicLink()&&!c.followsymlink){f=e.readlinkSync(m);try{o.statNoFollowLinks(h),o.unlinkSync(h)}catch(e){}e.symlinkSync(f,h,l?"junction":null)}else g.isSymbolicLink()&&c.followsymlink?(g=o.statFollowLinks(m)).isDirectory()?s(m,h,n,c):i(m,h,c):e.existsSync(h)&&c.no_force?o.log("skipping existing file: "+d[p]):i(m,h,c)}c.preserve&&e.utimesSync(r,u.atime,u.mtime),e.chmodSync(r,u.mode)}}function a(t,r){if(o.statNoFollowLinks(r).isSymbolicLink()&&o.statFollowLinks(r).isDirectory()){var n=e.realpathSync(t),i=e.realpathSync(r);if(new RegExp(i).test(n))return!0}return!1}function c(t,r,a){t.followsymlink&&(t.noFollowsymlink=!1),t.recursive||t.noFollowsymlink||(t.followsymlink=!0),arguments.length<3?o.error("missing <source> and/or <dest>"):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var d=o.statFollowLinks(c);if(!t.noFollowsymlink&&d.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,t)}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var f=a;l&&l.isDirectory()&&(f=n.normalize(a+"/"+n.basename(c)));var m=e.existsSync(f);if(m&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+f+"' with '"+c+"'",{continue:!0}));if(m&&t.no_force)return;if(""===n.relative(c,f))return void o.error("'"+f+"' and '"+c+"' are the same file",{continue:!0});i(c,f,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink",p:"preserve"},wrapOutput:!1}),Oi=c}var ji,Bi,Fi,Hi={};var Ui,Gi,Wi,Vi,Ki,qi,zi,Xi,Yi,Qi,Zi,Ji,es,ts,rs,ns,os,is,ss,as,cs,ls,us,ds,ps,fs,ms,hs,gs,ys,bs,vs,ws,Ss,Es,_s,xs,As,Ts,Os,Rs,Cs,ks,Ps,Is,Ds,Ls,Ms,Ns={};function $s(){if(Ui)return Ns;Ui=1;var r,n=e,o=t,i=Vn();function s(e){if(!e||!o.existsSync(e))return!1;if(!i.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+i.randomFileName();try{return o.writeFileSync(t," "),i.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(n.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return i.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Ns.tempDir=a,Ns.isCached=function(){return r},Ns.clearCache=function(){r=void 0},Ns}function js(){if(Wi)return Gi;Wi=1;var e=r;function t(){return e.resolve(process.cwd())}return Vn().register("pwd",t,{allowGlobbing:!1}),Gi=t}function Bs(){if(Ki)return Vi;Ki=1;var e=r,n=t,o=s,i=Vn(),a=$s().tempDir,c=js(),l=20971520;function u(t,r,s){r=r||{};var u=i.readFromPipe();if("function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),r=i.extend({silent:i.config.silent,fatal:i.config.fatal,async:!1},r),!t)try{i.error("must specify command")}catch(e){if(r.fatal)throw e;return}return r.async?function(e,t,r,n){t=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},t);var s=o.exec(e,t,function(e,t,r){n&&(e?void 0===e.code?n(1,t,r):n(e.code,t,r):n(0,t,r))});return r&&s.stdin.end(r),t.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){if(!i.config.execPath)try{i.error("Unable to find a path to the node binary. Please manually set config.execPath")}catch(e){if(r.fatal)throw e;return}var u=a(),d=e.join(u,i.randomFileName()),p=e.join(u,i.randomFileName()),f=e.join(u,i.randomFileName());r=i.extend({silent:i.config.silent,fatal:i.config.fatal,cwd:c().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),n.existsSync(d)&&i.unlinkSync(d),n.existsSync(p)&&i.unlinkSync(p),n.existsSync(f)&&i.unlinkSync(f),r.cwd=e.resolve(r.cwd);var m={command:t,execOptions:r,pipe:s,stdoutFile:f,stderrFile:p};function h(e,t){n.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}h(f,""),h(p,""),h(d,JSON.stringify(m));var g=[e.join(__dirname,"exec-child.js"),d];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,o.execFileSync(i.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=n.readFileSync(f),v=n.readFileSync(p)):(b=n.readFileSync(f,r.encoding),v=n.readFileSync(p,r.encoding));try{i.unlinkSync(d)}catch(e){}try{i.unlinkSync(p)}catch(e){}try{i.unlinkSync(f)}catch(e){}return 0!==y&&i.error(v,y,{continue:!0,silent:!0,fatal:r.fatal}),i.ShellString(b,v,y)}(t,r,u)}return i.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1,handlesFatalDynamically:!0}),Vi=u}function Fs(){if(zi)return qi;zi=1;var e=r,n=t,o=Wn(),i=Vn();function s(t,r){t.all_deprecated&&(i.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var s=[];function a(e,r,n){var o,a;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?i.statFollowLinks(e):i.statNoFollowLinks(e)),s.push((o=r,(a=n).name=o,a.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},a))):s.push(r)}return r.forEach(function(r){var s;try{if((s=t.link?i.statFollowLinks(r):i.statNoFollowLinks(r)).isSymbolicLink())try{var c=i.statFollowLinks(r);c.isDirectory()&&(s=c)}catch(e){}}catch(e){return void i.error("no such file or directory: "+r,2,{continue:!0})}s.isDirectory()&&!t.directory?t.recursive?o.sync(r+"/**",{onlyFiles:!1,dot:t.all,followSymbolicLinks:t.link}).forEach(function(t){e.relative(r,t)&&a(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){a(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&a(e.join(r,t),t)}):a(r,r,s)}),s}return i.register("ls",s,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),qi=s}function Hs(){if(es)return Ji;es=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?e.readFileSync(n,"utf8"):function(t,n){for(var o=r.buffer(),i=o.length,s=i,a=0,c=e.openSync(t,"r"),l=0,u="";s===i&&l<n;){s=e.readSync(c,o,0,i,a);var d=o.toString("utf8",0,s);l+=d.split("\n").length-1,u+=d,a+=s}return e.closeSync(c),u}(n,t.numLines);var c=s.split("\n"),l=""===c[c.length-1];l&&c.pop(),a=l||t.numLines<c.length,o=o.concat(c.slice(0,t.numLines))}),a&&o.push(""),o.join("\n")}return r.register("head",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Ji=n}function Us(){if(os)return ns;os=1;var e=t,n=r,o=Vn();function i(t){var r=n.dirname(t);r===t&&o.error("dirname() failed: ["+t+"]"),e.existsSync(r)||i(r);try{e.mkdirSync(t,parseInt("0777",8))}catch(e){if("EEXIST"!==e.code||o.statNoFollowLinks(t).isFile())throw e}}function s(t,r){return r||o.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=o.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&o.error("cannot create directory "+r+": File exists",{continue:!0}):o.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=n.dirname(r);if(e.existsSync(a)||t.fullpath)try{t.fullpath?i(n.resolve(r)):e.mkdirSync(r,parseInt("0777",8))}catch(e){var c;if("EACCES"===e.code)c="Permission denied";else{if("ENOTDIR"!==e.code&&"ENOENT"!==e.code)throw e;c="Not a directory"}o.error("cannot create directory "+r+": "+c,{continue:!0})}else o.error("no such file or directory: "+a,{continue:!0})}),""}return o.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),ns=s}function Gs(){if(ss)return is;ss=1;var e=t,r=Vn();function n(t,i,s){var a;a=e.readdirSync(t);for(var c=0;c<a.length;c++){var l=t+"/"+a[c];if(r.statNoFollowLinks(l).isDirectory())n(l,i);else if(i||o(l))try{r.unlinkSync(l)}catch(e){r.error("could not remove file (code "+e.code+"): "+l,{continue:!0})}}if(!s){var u;try{for(var d=Date.now();;)try{if(u=e.rmdirSync(t),e.existsSync(t))throw{code:"EAGAIN"};break}catch(e){if("win32"!==process.platform||"ENOTEMPTY"!==e.code&&"EBUSY"!==e.code&&"EPERM"!==e.code&&"EAGAIN"!==e.code){if("ENOENT"===e.code)break;throw e}if(Date.now()-d>1e3)throw e}}catch(e){r.error("could not remove directory (code "+e.code+"): "+t,{continue:!0})}return u}}function o(t){var r=!0;try{var n=e.openSync(t,"a");e.closeSync(n)}catch(e){r=!1}return r}function i(e,t){return t||r.error("no paths given"),(t=[].slice.call(arguments,1)).forEach(function(t){var i;try{var s="/"===t[t.length-1]?t.slice(0,-1):t;i=r.statNoFollowLinks(s)}catch(n){return void(e.force||r.error("no such file or directory: "+t,{continue:!0}))}i.isFile()?function(e,t){t.force||o(e)?r.unlinkSync(e):r.error("permission denied: "+e,{continue:!0})}(t,e):i.isDirectory()?function(e,t){t.recursive?n(e,t.force):r.error("path is a directory",{continue:!0})}(t,e):i.isSymbolicLink()?function(e,t){var o;try{o=r.statFollowLinks(e)}catch(t){return void r.unlinkSync(e)}o.isFile()?r.unlinkSync(e):o.isDirectory()&&("/"===e[e.length-1]?t.recursive?n(e,t.force,!0):r.error("path is a directory",{continue:!0}):r.unlinkSync(e))}(t,e):i.isFIFO()&&function(e){r.unlinkSync(e)}(t)}),""}return r.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),is=i}function Ws(){if(cs)return as;cs=1;var e=t,n=r,o=Vn(),i=$i(),s=Gs();function a(t,r,a){arguments.length<3?o.error("missing <source> and/or <dest>"):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i({recursive:!0},c,u),s({recursive:!0,force:!0},c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),as=a}function Vs(){if(ws)return vs;ws=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not write to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("to",i,{pipeOnly:!0,wrapOutput:!1}),vs=i}function Ks(){if(Es)return Ss;Es=1;var e=t,n=r,o=Vn();function i(t,r){r||o.error("wrong arguments"),e.existsSync(n.dirname(r))||o.error("no such file or directory: "+n.dirname(r));try{return e.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(e){o.error("could not append to file (code "+e.code+"): "+r,{continue:!0})}}return o.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Ss=i}function qs(){if(xs)return _s;xs=1;var e=t,r=Vn();function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):r.error("file arg should be a string file path or an Array of string file paths"):r.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;e.closeSync(e.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||r.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));e.utimesSync(n,c,a)}(t,n)}),""}function o(e){try{return r.statFollowLinks(e)}catch(e){return null}}return r.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),_s=n}function zs(){if(Ts)return As;Ts=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();i||(n||r.error("no input given"),e.existsSync(n)?r.statFollowLinks(n).isDirectory()&&r.error("error reading '"+n+"'"):r.error(n+": No such file or directory")),o&&e.existsSync(o)&&r.statFollowLinks(o).isDirectory()&&r.error(o+": Is a directory");var s=(n?e.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length<e&&(r=Array(e-r.length+1).join(" ")+r),r}(7,e.count)+" ":"")+e.ln}).join("\n")+"\n";return o?(new r.ShellString(a).to(o),""):a}return r.register("uniq",n,{canReceivePipe:!0,cmdOptions:{i:"ignoreCase",c:"count",d:"duplicates"}}),As=n}function Xs(){if(Rs)return Os;Rs=1;var e=t,n=r,o=Vn();o.register("which",u,{allowGlobbing:!1,cmdOptions:{a:"all"}});var i=".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh",s=1;function a(){return"win32"===process.platform}function c(e){return e?e.split(n.delimiter):[]}function l(t){return e.existsSync(t)&&!o.statFollowLinks(t).isDirectory()&&(a()||function(t){try{e.accessSync(t,s)}catch(e){return!1}return!0}(t))}function u(e,t){t||o.error("must specify command");var r=a(),s=c(process.env.PATH),u=[];if(t.includes("/"))l(t)&&u.push(n.resolve(t));else{var d=[""];if(r)d=c((process.env.PATHEXT||i).toUpperCase());for(var p=0;p<s.length&&(!(u.length>0)||e.all);p++){var f=n.resolve(s[p],t);r&&(f=f.toUpperCase());var m=f.match(/\.[^<>:"/|?*.]+$/);if(m&&d.includes(m[0])){if(l(f)){u.push(f);break}}else for(var h=0;h<d.length;h++){var g=f+d[h];if(l(g)){u.push(g);break}}}}return u.length>0?e.all?u:u[0]:e.all?[]:null}return Os=u}function Ys(){if(Ds)return ae.exports;Ds=1;var e=Vn();return ae.exports=e.shell,Kn(),qn(),function(){if(Un)return Hn;Un=1;var e,n=t,o=r,i=Vn(),s={OTHER_EXEC:(e={EXEC:1,WRITE:2,READ:4}).EXEC,OTHER_WRITE:e.WRITE,OTHER_READ:e.READ,GROUP_EXEC:e.EXEC<<3,GROUP_WRITE:e.WRITE<<3,GROUP_READ:e.READ<<3,OWNER_EXEC:e.EXEC<<6,OWNER_WRITE:e.WRITE<<6,OWNER_READ:e.READ<<6,STICKY:parseInt("01000",8),SETGID:parseInt("02000",8),SETUID:parseInt("04000",8),TYPE_MASK:parseInt("0770000",8)};function a(e,t,r){var a;return r||(e.length>0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):i.error("You must specify a file.")),e=i.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=i.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&n.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=o.resolve(r),n.existsSync(r)||i.error("File not found: "+r),!e.recursive||!i.statNoFollowLinks(r).isSymbolicLink()){var a=i.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,d=l;Number.isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var o=/([ugoa]*)([=+-])([rwxXst]*)/i.exec(t);if(o){var a=o[1],p=o[2],f=o[3],m=a.includes("u")||"a"===a||""===a,h=a.includes("g")||"a"===a||""===a,g=a.includes("o")||"a"===a||""===a,y=f.includes("r"),b=f.includes("w"),v=f.includes("x"),w=f.includes("X"),S=f.includes("t"),E=f.includes("s");w&&c&&(v=!0);var _=0;switch(m&&(_|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(E?s.SETUID:0)),h&&(_|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(E?s.SETGID:0)),g&&(_|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),S&&(_|=s.STICKY),p){case"+":d|=_;break;case"-":d&=~_;break;case"=":d=u+_,i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l);break;default:i.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+d.toString(8)),l!==d&&(!e.verbose&&e.changes&&console.log(r+" -> "+d.toString(8)),n.chmodSync(r,d),l=d)}else i.error("Invalid symbolic mode change: "+t)}):(d=u+parseInt(t,8),i.statFollowLinks(r).isDirectory()&&(d|=s.SETUID+s.SETGID&l),n.chmodSync(r,d))}}),""}i.register("chmod",a,{}),Hn=a}(),Ni(),$i(),function(){if(ji)return Hi;ji=1;var e=r,t=Vn(),n=qn();t.register("dirs",u,{wrapOutput:!1}),t.register("pushd",c,{wrapOutput:!1}),t.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[-+]\d+$/.test(e)}function s(e){if(i(e)){if(Math.abs(e)<o.length+1)return/^-/.test(e)?Number(e)-1:Number(e);t.error(e+": directory stack index out of range")}else t.error(e+": invalid number")}function a(){return[process.cwd()].concat(o)}function c(r,c){i(r)&&(c=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"});var l=a();if("+0"===c)return l;if(c)if(i(c)){var d=s(c);l=l.slice(d).concat(l.slice(0,d))}else r["no-cd"]?l.splice(1,0,c):l.unshift(c);else{if(!(l.length>1))return t.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=e.resolve(l.shift()),n("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=t.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return t.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=e.resolve(o.shift());n("",c)}return u(r.quiet?"-q":"")}function u(e,r){if(i(e)&&(r=e,e=""),(e=t.parseOptions(e,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),e.quiet||t.log(n[r]),n[r]):(e.quiet||t.log(n.join(" ")),n)}Hi.pushd=c,Hi.popd=l,Hi.dirs=u}(),function(){if(Fi)return Bi;Fi=1;var e=n.format,t=Vn();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}t.register("echo",r,{allowGlobbing:!1}),Bi=r}(),Bs(),function(){if(Yi)return Xi;Yi=1;var e=r,t=Vn(),n=Fs();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(o){var i;try{i=t.statFollowLinks(o)}catch(e){t.error("no such file or directory: "+o)}s(o),i.isDirectory()&&n({recursive:!0,all:!0,link:r.link},o).forEach(function(t){s(e.join(o,t))})}),i}t.register("find",o,{cmdOptions:{L:"link"}}),Xi=o}(),function(){if(Zi)return Qi;Zi=1;var e=t,r=Vn();function n(t,n,o){var i=r.readFromPipe();o||i||r.error("no paths given",2);var s=2,a=": invalid context length argument";!0===t.beforeContext&&(s=3,t.beforeContext=Number(arguments[1]),t.beforeContext<0&&r.error(t.beforeContext+a,2)),!0===t.afterContext&&(s=3,t.afterContext=Number(arguments[1]),t.afterContext<0&&r.error(t.afterContext+a,2)),!0===t.context&&(s=3,t.context=Number(arguments[1]),t.context<0&&r.error(t.context+a,2)),"number"==typeof t.context&&(!1===t.beforeContext&&(t.beforeContext=t.context),!1===t.afterContext&&(t.afterContext=t.context)),n=arguments[s-1],o=[].slice.call(arguments,s),i&&o.unshift("-");var c=[];t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(e.existsSync(o)||"-"===o){var s="-"===o?i:e.readFileSync(o,"utf8");if(t.nameOnly)s.match(n)&&c.push(o);else{var a=s.split("\n"),l=[];a.forEach(function(e,r){var o=e.match(n);if(t.inverse&&!o||!t.inverse&&o){var i=r+1,s={};if(l.length>0){var c=l[l.length-1],u=Math.max(1,i-t.beforeContext-1);(c.hasOwnProperty(""+i)||c.hasOwnProperty(""+u))&&(s=c)}s[i]={line:e,match:!0},t.beforeContext>0&&a.slice(Math.max(r-t.beforeContext,0),r).forEach(function(e,t,n){var o=""+(r-n.length+t+1);s.hasOwnProperty(o)||(s[o]={line:e,match:!1})}),t.afterContext>0&&a.slice(r+1,Math.min(r+t.afterContext+1,a.length-1)).forEach(function(e,t){var n=""+(r+1+t+1);s.hasOwnProperty(n)||(s[n]={line:e,match:!1})}),l.includes(s)||l.push(s)}}),Array.prototype.push.apply(c,l.map(function(e){return Object.entries(e).map(function(e){var r=e[0],n=e[1].line,o=e[1].match;return t.lineNumber?r+(o?":":"-")+n:n}).join("\n")}))}}else r.error("no such file or directory: "+o,2,{continue:!0})}),0===c.length&&2!==r.state.errorCode&&r.error("",{silent:!0});var l="\n";return"number"!=typeof t.beforeContext&&"number"!=typeof t.afterContext||(l="\n--\n"),c.join(l)+"\n"}r.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase",n:"lineNumber",B:"beforeContext",A:"afterContext",C:"context"}}),Qi=n}(),Hs(),function(){if(rs)return ts;rs=1;var e=t,n=r,o=Vn();function i(t,r,i){r&&i||o.error("Missing <source> and/or <dest>"),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ts=i}(),Fs(),Us(),Ws(),js(),Gs(),function(){if(us)return ls;us=1;var e=t,r=Vn();function n(t,n,o,i){var s=r.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():r.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||r.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(e.existsSync(i)||"-"===i){var c=("-"===i?s:e.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&e.writeFileSync(i,c,"utf8")}else r.error("no such file or directory: "+i,2,{continue:!0})}),t.inplace?"":a.join("\n")}r.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),ls=n}(),function(){if(ps)return ds;ps=1;var e=Vn();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),ds=t}(),function(){if(ms)return fs;ms=1;var e=t,r=Vn();function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=r.readFromPipe();n||s||r.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!e.existsSync(n))return r.error("no such file or directory: "+n,{continue:!0}),t;if(r.statFollowLinks(n).isDirectory())return r.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:e.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}r.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),fs=s}(),function(){if(gs)return hs;gs=1;var e=t,r=Vn();function n(t,n){var o=[],i=r.readFromPipe();n||i||r.error("no paths given");var s=1,a=!1;!0===t.numLines?(s=2,"+"===arguments[1][0]&&(a=!0),t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),"+"===arguments[0].numLines[0]&&(a=!0),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var c=!1;return n.forEach(function(n){if("-"!==n){if(!e.existsSync(n))return void r.error("no such file or directory: "+n,{continue:!0});if(r.statFollowLinks(n).isDirectory())return void r.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:e.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),c=!0):c=!1,o=o.concat(a?s.slice(-t.numLines-1):s.slice(t.numLines))}),c&&o.push(""),o.join("\n")}r.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),hs=n}(),$s(),function(){if(bs)return ys;bs=1;var e=t,r=Vn();function n(t,n){n||r.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||r.error("could not interpret expression"),t.link)try{return r.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!e.existsSync(n))return!1;if(t.exists)return!0;var i=r.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}r.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ys=n}(),Vs(),Ks(),qs(),zs(),Xs(),ae.exports.exit=function(t){e.state.error=null,e.state.errorCode=0,t?(e.error("exit",{continue:!0,code:t,prefix:"",silent:!0,fatal:!1}),process.exit(t)):process.exit()},ae.exports.error=function(){if(ks)return Cs;ks=1;var e=Vn();return Cs=function(){return e.state.error}}(),ae.exports.errorCode=function(){if(Is)return Ps;Is=1;var e=Vn();return Ps=function(){return e.state.errorCode}}(),ae.exports.ShellString=e.ShellString,ae.exports.env=process.env,ae.exports.config=e.config,ae.exports}function Qs(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}!function(){if(Ms)return ie;Ms=1,function(){if(Ls)return se;Ls=1;var e=Ys(),t=Vn();Object.keys(e).forEach(function(t){re[t]=e[t]});var r=Vs();String.prototype.to=t.wrap("to",r);var n=Ks();String.prototype.toEnd=t.wrap("toEnd",n)}(),re.config.fatal=!0,re.target={};var e,t=process.argv.slice(2),r=t.indexOf("--");r>-1&&(e=t.slice(r+1,t.length),t=t.slice(0,r)),setTimeout(function(){var r;if(1!==t.length||"--help"!==t[0]){for(r in re.target)(function(e,t){re.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(r,re.target[r]);t.length>0?t.forEach(function(t){t in re.target?re.target[t](e):console.log("no such target: "+t)}):"all"in re.target&&re.target.all(e)}else for(r in console.log("Available targets:"),re.target)console.log(" "+r)},0)}();const Zs=(e,t)=>{const r=ta(Js(e));if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},Js=e=>ea(e)?e.toString():e,ea=e=>"string"!=typeof e&&e&&Object.getPrototypeOf(e)===String.prototype,ta=e=>e instanceof URL?w(e):e,ra=(e,t=[],r={})=>{const n=Zs(e,"First argument"),[o,i]=Qs(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Qs(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]},{toString:na}=Object.prototype,oa=e=>"[object Uint8Array]"===na.call(e),ia=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sa=new TextEncoder,aa=e=>sa.encode(e),ca=new TextDecoder,la=e=>ca.decode(e),ua=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new A(t),n=e.map(e=>"string"==typeof e?aa(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},da=e=>1===e.length&&oa(e[0])?e[0]:fa(pa(e)),pa=e=>e.map(e=>"string"==typeof e?aa(e):e),fa=e=>{const t=new Uint8Array(ma(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},ma=e=>{let t=0;for(const r of e)t+=r.length;return t},ha=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=ga(o,e.raw[n]),c=va(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>wa(e)):[wa(l)];return va(c,u,a)},ga=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=ya.has(t[0]);for(let o=0,i=0;o<e.length;o+=1,i+=1){const s=t[i];if(ya.has(s))n!==o&&r.push(e.slice(n,o)),n=o+1;else if("\\"===s){const e=t[i+1];"\n"===e?(o-=1,i+=1):"u"===e&&"{"===t[i+2]?i=t.indexOf("}",i+3):i+=ba[e]??1}}const i=n===e.length;return i||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:o,trailingWhitespaces:i}},ya=new Set([" ","\t","\r","\n"]),ba={x:3,u:5},va=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],wa=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Qs(e)&&("stdout"in e||"isMaxBuffer"in e))return Sa(e);if(e instanceof S||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Sa=({stdout:e})=>{if("string"==typeof e)return e;if(oa(e))return la(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},Ea=e=>_a.includes(e),_a=[I.stdin,I.stdout,I.stderr],xa=["stdin","stdout","stderr"],Aa=e=>xa[e]??`stdio[${e}]`,Ta=(e,t)=>{const r=Array.from({length:Oa(e)+1}),n=Ra(e[t],r,t);return Ma(n,t)},Oa=({stdio:e})=>Array.isArray(e)?Math.max(e.length,xa.length):xa.length,Ra=(e,t,r)=>Qs(e)?Ca(e,t,r):t.fill(e),Ca=(e,t,r)=>{for(const n of Object.keys(e).sort(ka))for(const o of Ia(n,r,t))t[o]=e[n];return t},ka=(e,t)=>Pa(e)<Pa(t)?1:-1,Pa=e=>"stdout"===e||"stderr"===e?0:"all"===e?2:1,Ia=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Da(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Da=e=>{if("all"===e)return e;if(xa.includes(e))return xa.indexOf(e);const t=La.exec(e);return null!==t?Number(t[1]):void 0},La=/^fd(\d+)$/,Ma=(e,t)=>e.map(e=>void 0===e?Na[t]:e),Na={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},$a=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],ja=(e,t)=>"ipc"===t?e.at(-1):e[t],Ba=({verbose:e},t)=>"none"!==Ha(e,t),Fa=({verbose:e},t)=>!["none","short"].includes(Ha(e,t)),Ha=(e,t)=>void 0===t?Ua(e):ja(e,t),Ua=e=>e.find(e=>Ga(e))??Wa.findLast(t=>e.includes(t)),Ga=e=>"function"==typeof e,Wa=["none","short","full"],Va=e=>O(e).split("\n").map(e=>Ka(e)).join("\n"),Ka=e=>e.replaceAll(za,e=>qa(e)),qa=e=>{const t=Xa[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Ya?`\\u${n.padStart(4,"0")}`:`\\U${n}`},za=(()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}})(),Xa={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Ya=65535,Qa=e=>Za.test(e)?e:"win32"===D?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Za=/^[\w./-]+$/;const Ja={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ec={...Ja,tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},tc={...Ja,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},rc=function(){const{env:e}=I,{TERM:t,TERM_PROGRAM:r}=e;return"win32"!==I.platform?"linux"!==t:Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||"{cmd::Cmder}"===e.ConEmuTask||"Terminus-Sublime"===r||"vscode"===r||"xterm-256color"===t||"alacritty"===t||"rxvt-unicode"===t||"rxvt-unicode-256color"===t||"JetBrains-JediTerm"===e.TERMINAL_EMULATOR}(),nc=rc?ec:tc,oc=$?.WriteStream?.prototype?.hasColors?.()??!1,ic=(e,t)=>{if(!oc)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const o=e+"";let i=o.indexOf(n);if(-1===i)return r+o+n;let s=r,a=0;const c=(22===t?n:"")+r;for(;-1!==i;)s+=o.slice(a,i)+c,a=i+n.length,i=o.indexOf(n,a);return s+=o.slice(a)+n,s}},sc=ic(1,22),ac=ic(90,39),cc=ic(91,39),lc=ic(93,39),uc=e=>`${dc(e.getHours(),2)}:${dc(e.getMinutes(),2)}:${dc(e.getSeconds(),2)}.${dc(e.getMilliseconds(),3)}`,dc=(e,t)=>String(e).padStart(t,"0"),pc=({failed:e,reject:t})=>e?t?nc.cross:nc.warning:nc.tick,fc={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:pc,duration:pc},mc=e=>e,hc={command:()=>sc,output:()=>mc,ipc:()=>mc,error:({reject:e})=>e?cc:lc,duration:()=>ac},gc=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Ha(e,t);return Ga(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>yc(e,t,n)).filter(e=>void 0!==e).map(e=>bc(e)).join("")},yc=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},bc=e=>e.endsWith("\n")?e:`${e}\n`,vc=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=wc({type:e,result:o,verboseInfo:n}),s=Sc(t,i),a=gc(s,n,r);""!==a&&console.warn(a.slice(0,-1))},wc=({type:e,result:t,verboseInfo:{escapedCommand:r,commandId:n,rawOptions:{piped:o=!1,...i}}})=>({type:e,escapedCommand:r,commandId:`${n}`,timestamp:new Date,piped:o,result:t,options:i}),Sc=(e,t)=>e.split("\n").map(e=>Ec({...t,message:e})),Ec=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=uc(r),c=fc[e]({failed:i,reject:s,piped:n}),l=hc[e]({reject:s});return`${ac(`[${a}]`)} ${ac(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),_c=e=>{const t="string"==typeof e?e:R(e);return Va(t).replaceAll("\t"," ".repeat(xc))},xc=2,Ac=e=>Ba({verbose:e})?Tc++:void 0;let Tc=0n;const Oc=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!Wa.includes(t)&&!Ga(t)){const e=Wa.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},Rc=()=>L.bigint(),Cc=e=>Number(L.bigint()-e)/1e6,kc=(e,t,r)=>{const n=Rc(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>Qa(Ka(e))).join(" ")}})(e,t),s=((e,t,r)=>(Oc(e),{verbose:e,escapedCommand:t,commandId:Ac(e),rawOptions:r}))(Ta(r,"verbose"),i,{...r});return((e,t)=>{Ba(t)&&vc({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Pc=ne(Io());function Ic(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}function Dc(e){return e instanceof URL?w(e):e}C(E);const Lc=(e,t,r)=>{for(const n of function(e){return{*[Symbol.iterator](){let t,r=l.resolve(Dc(e));for(;t!==r;)yield r,t=r,r=l.resolve(r,"..")}}}(r)){const r=l.join(n,"node_modules/.bin");t.includes(r)||e.push(r)}},Mc=(e,t,r,n)=>{const o=l.resolve(n,Dc(r),"..");t.includes(o)||e.push(o)},Nc=({env:e=I.env,...t}={})=>{const r=Ic({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=I.cwd(),path:t=I.env[Ic()],preferLocal:r=!0,execPath:n=I.execPath,addExecPath:o=!0}={})=>{const i=l.resolve(Dc(e)),s=[],a=t.split(l.delimiter);return r&&Lc(s,a,i),o&&Mc(s,a,n,i),""===t||t===l.delimiter?`${s.join(l.delimiter)}${t}`:[...s,t].join(l.delimiter)})(t),e};class $c extends Error{}const jc=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Bc,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Bc=Symbol("isExecaError"),Fc=e=>"[object Error]"===Object.prototype.toString.call(e);class Hc extends Error{}jc(Hc,Hc.name);class Uc extends Error{}jc(Uc,Uc.name);const Gc=(e,t)=>({name:`SIGRT${t+1}`,number:Wc+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wc=34,Vc=64,Kc=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],qc=()=>{const e=(()=>{const e=Vc-Wc+1;return Array.from({length:e},Gc)})();return[...Kc,...e].map(zc)},zc=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=H,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Xc=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Yc=(()=>{const e=qc();return Object.fromEntries(e.map(Xc))})(),Qc=(e,t)=>{const r=Zc(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Zc=(e,t)=>{const r=t.find(({name:t})=>H.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=qc(),t=Vc+1,r=Array.from({length:t},(t,r)=>Qc(r,e));Object.assign({},...r)})();const Jc=e=>0===e?e:el(e,"`subprocess.kill()`'s argument"),el=(e,t)=>{if(Number.isInteger(e))return tl(e,t);if("string"==typeof e)return nl(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${ol()}`)},tl=(e,t)=>{if(rl.has(e))return rl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${ol()}`)},rl=new Map(Object.entries(H.signals).reverse().map(([e,t])=>[t,e])),nl=(e,t)=>{if(e in H.signals)return e;if(e.toUpperCase()in H.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${ol()}`)},ol=()=>`Available signal names: ${il()}.\nAvailable signal numbers: ${sl()}.`,il=()=>Object.keys(H.signals).sort().map(e=>`'${e}'`).join(", "),sl=()=>[...new Set(Object.values(H.signals).sort((e,t)=>e-t))].join(", "),al=e=>Yc[e].description,cl=5e3,ll=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=ul(s,a,r);dl(l,n);const u=e(c);return pl({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},ul=(e,t,r)=>{const[n=r,o]=Fc(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!Fc(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Jc(n),error:o}},dl=(e,t)=>{void 0!==e&&t.reject(e)},pl=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&fl({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},fl=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await j(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},ml=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},hl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[gl(e,t,n,o)],gl=async(e,t,r,{signal:n})=>{throw await ml(t,n),r.terminationReason??="cancel",e.kill(),t.reason},yl=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{bl(e,t,r),vl(e,t,n)},bl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},vl=(e,t,r)=>{if(!r)throw new Error(`${xl(e,t)} cannot be used: the ${Tl(t)} has already exited or disconnected.`)},wl=(e,t)=>new Error(`${xl("sendMessage",t)} failed when sending an acknowledgment response to the ${Tl(t)}.`,{cause:e}),Sl=({code:e,message:t})=>El.has(e)||_l.some(e=>t.includes(e)),El=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),_l=["could not be cloned","circular structure","call stack size exceeded"],xl=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${Al(t)}${e}(${r})`,Al=e=>e?"":"subprocess.",Tl=e=>e?"parent process":"subprocess",Ol=e=>{e.connected&&e.disconnect()},Rl=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},Cl=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(Ml(i,t,n,r));return s},kl=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=Pl.get(e),i=Il(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(Ml(i,t,n,r));return s},Pl=new WeakMap,Il=(e,t,r)=>{const n=Dl(t,r);return Ll(n,t,r,e),n},Dl=(e,t)=>{const r=Da(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${jl(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},Ll=(e,t,r,n)=>{const o=n[$l(e)];if(void 0===o)throw new TypeError(`"${jl(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${jl(r)}" must not be ${t}. It must be a writable stream, not readable.`)},Ml=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=Nl(e,r);return`The "${o}: ${Bl(i)}" option is incompatible with using "${jl(n)}: ${Bl(t)}".\nPlease set this option with "pipe" instead.`},Nl=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=$l(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},$l=e=>"all"===e?1:e,jl=e=>e?"to":"from",Bl=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",Fl=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},Hl=(e,t)=>{t&&Ul(e)},Ul=e=>{e.refCounted()},Gl=(e,t)=>{t&&Wl(e)},Wl=e=>{e.unrefCounted()},Vl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(tu(o)||vu(o))return;ql.has(e)||ql.set(e,[]);const i=ql.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await au(e,n,o),await B.yield();const s=await eu({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Kl=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{Su();const i=ql.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ul(e),Ul(e))})(t,r),n.connected=!1,n.emit("disconnect")},ql=new WeakMap,zl=(e,t,r)=>{if(Xl.has(e))return Xl.get(e);const n=new W;return n.connected=!0,Xl.set(e,n),Yl({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Xl=new WeakMap,Yl=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Vl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Kl.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Wl(e),Wl(e))})(r,n)},Ql=e=>{const t=Xl.get(e);return void 0===t?null!==e.channel:t.connected};let Zl=0n;const Jl=(e,t)=>{if(t?.type===iu&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&nu[t].resolve({isDeadlock:!0,hasListeners:!1})},eu=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==iu||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:su,message:lu(t,o)};try{await du({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},tu=e=>{if(e?.type!==su)return!1;const{id:t,message:r}=e;return nu[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},ru=async(e,t,r)=>{if(e?.type!==iu)return;const n=Rl();nu[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,ou(t,r,o)]);e&&(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${xl("getOneMessage",e)},\n\t${xl("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete nu[e.id]}},nu={},ou=async(e,t,{signal:r})=>{Fl(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("sendMessage",e)} failed: the ${Tl(e)} exited without listening to incoming messages.`)})(t)},iu="execa:ipc:request",su="execa:ipc:response",au=async(e,t,r)=>{for(;!lu(e,t)&&cu.get(e)?.size>0;){const t=[...cu.get(e)];Jl(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},cu=new WeakMap,lu=(e,t)=>t.listenerCount("message")>uu(e),uu=e=>Pl.has(e)&&!ja(Pl.get(e).options.buffer,"ipc")?1:0,du=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return yl({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),pu({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},pu=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=zl(e,t,r),s=lu(e,i);return{id:Zl++,type:iu,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{cu.has(e)||cu.set(e,new Set);const n=cu.get(e),o={onMessageSent:Rl(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await fu({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw Ol(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},fu=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=mu(e);try{await Promise.all([ru(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${xl(t,r)} cannot be used: the ${Tl(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(Sl(e))throw new Error(`${xl(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},mu=e=>{if(hu.has(e))return hu.get(e);const t=C(e.send.bind(e));return hu.set(e,t),t},hu=new WeakMap,gu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await yu({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),Eu.signal),yu=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{bu||(bu=!0,n?null!==t?(zl(e,t,r),await B.yield()):Su():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let bu=!1;const vu=e=>e?.type===wu&&(Eu.abort(e.message),!0),wu="execa:ipc:cancel",Su=()=>{Eu.abort(new Error(`\`cancelSignal\` aborted: the ${Tl(!0)} disconnected.`))},Eu=new AbortController,_u=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[xu({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],xu=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await ml(t,o);const i=Au(t);throw await((e,t)=>{const r="cancelSignal";return vl(r,!1,e.connected),fu({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:wu,message:t},message:t})})(e,i),fl({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},Au=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},Tu=(e,t,r,n)=>0===t||void 0===t?[]:[Ou(e,t,r,n)],Ou=async(e,t,r,{signal:n})=>{throw await j(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new $c},Ru={advanced:e=>{try{q(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},Cu=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},ku=new Set(["utf8","utf16le"]),Pu=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),Iu=new Set([...ku,...Pu]),Du=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in Lu?Lu[t]:Iu.has(t)?t:void 0},Lu={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},Mu=e=>"string"==typeof e?`"${e}"`:String(e),Nu=()=>{try{return I.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},$u=(e,t,r)=>{r.cwd=((e=Nu())=>{const t=Zs(e,'The "cwd" option');return l.resolve(t)})(r.cwd);const[n,o,i]=((e,t,{node:r=!1,nodePath:n=M,nodeOptions:o=N.filter(e=>!e.startsWith("--inspect")),cwd:i,execPath:s,...a})=>{if(void 0!==s)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const c=Zs(n,'The "nodePath" option'),u=l.resolve(i,c),d={...a,nodePath:u,node:r,cwd:i};if(!r)return[e,t,d];if("node"===l.basename(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...o,e,...t],{ipc:!0,...d,shell:!1}]})(e,t,r),{command:s,args:a,options:c}=Pc._parse(n,o,i),u=(e=>{const t={...e};for(const r of $a)t[r]=Ta(e,r);return t})(c),d=ju(u);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(d),(({encoding:e})=>{if(Iu.has(e))return;const t=Du(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to ${Mu(t)}.`);const r=[...Iu].map(e=>Mu(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${Mu(e)}\`.\nPlease rename it to one of: ${r}.`)})(d),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Ru[r](e)}})(d),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(d),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(d),d.shell=ta(d.shell),d.env=Bu(d),d.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return el(e,t)})(d.killSignal),d.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return cl;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(d.forceKillAfterDelay),d.lines=d.lines.map((e,t)=>e&&!Pu.has(d.encoding)&&d.buffer[t]),"win32"===I.platform&&"cmd"===l.basename(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:d}},ju=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:o="utf8",reject:i=!0,cleanup:s=!0,all:a=!1,windowsHide:c=!0,killSignal:l="SIGTERM",forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:p,ipc:f=void 0!==p||d,serialization:m="advanced",...h})=>({...h,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:o,reject:i,cleanup:s,all:a,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:p,ipc:f,serialization:m}),Bu=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?{...I.env,...e}:e;return r||n?Nc({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s},Fu=(e,t,r)=>r.shell&&t.length>0?[[e,...t].join(" "),[],r]:[e,t,r];function Hu(e){if("string"==typeof e)return Uu(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Gu(e)}const Uu=e=>e.at(-1)===Wu?e.slice(0,e.at(-2)===Ku?-2:-1):e,Gu=e=>e.at(-1)===Vu?e.subarray(0,e.at(-2)===qu?-2:-1):e,Wu="\n",Vu=Wu.codePointAt(0),Ku="\r",qu=Ku.codePointAt(0);function zu(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Xu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Yu(e,{checkOpen:t=!0}={}){return zu(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Qu(e,t){return Xu(e,t)&&Yu(e,t)}const Zu=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ju{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const ed=Symbol();function td(){return this[ed].next()}function rd(e){return this[ed].return(e)}Object.defineProperty(td,"name",{value:"next"}),Object.defineProperty(rd,"name",{value:"return"});const nd=Object.create(Zu,{next:{enumerable:!0,configurable:!0,writable:!0,value:td},return:{enumerable:!0,configurable:!0,writable:!0,value:rd}});function od({preventCancel:e=!1}={}){const t=this.getReader(),r=new Ju(t,e),n=Object.create(nd);return n[ed]=r,n}const id=e=>{if(Yu(e,{checkOpen:!1})&&void 0!==ld.on)return ad(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===sd.call(e))return od.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:sd}=Object.prototype,ad=async function*(e){const t=new AbortController,r={};cd(e,t,r);try{for await(const[r]of ld.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},cd=async(e,t,r)=>{try{await ld.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},ld={},ud=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=id(e),u=t();u.length=0;try{for await(const e of l){const t=r[md(e)](e,u);pd({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return dd({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},dd=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&pd({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},pd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void fd(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&fd(c,t,o,i),new gd},fd=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},md=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=hd.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===hd.call(e.buffer)?"typedArray":"others"},{toString:hd}=Object.prototype;class gd extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const yd=e=>e,bd=()=>{},vd=({contents:e})=>e,wd=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Sd=e=>e.length;const Ed={init:()=>({contents:[]}),convertChunk:{string:yd,buffer:yd,arrayBuffer:yd,dataView:yd,typedArray:yd,others:yd},getSize:()=>1,truncateChunk:bd,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:bd,finalize:vd};const _d=new TextEncoder,xd=e=>new Uint8Array(e),Ad=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Td=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Rd(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Od=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Rd(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Rd=e=>Cd**Math.ceil(Math.log(e)/Math.log(Cd)),Cd=2,kd=()=>"resize"in ArrayBuffer.prototype,Pd={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>_d.encode(e),buffer:xd,arrayBuffer:xd,dataView:Ad,typedArray:Ad,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=kd()?Od(t,n):Td(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:bd,finalize:({contents:e,length:t})=>kd()?e:e.slice(0,t)};const Id=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Dd={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:yd,buffer:Id,arrayBuffer:Id,dataView:Id,typedArray:Id,others:wd},getSize:Sd,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:vd},Ld=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",Md=(e,t,r)=>{if(t.length!==r)return;const n=new gd;throw n.maxBufferInfo={fdNumber:"ipc"},n},Nd=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=ja(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Aa(r),threshold:o,unit:n}},$d=([,e])=>e,jd=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:p,killSignal:f})=>{const m=Bd(d,p);return t?`Command timed out after ${r} milliseconds${m}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${m}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=Nd(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${m}`:void 0!==i?`Command failed with ${i}${m}`:d?`Command was killed with ${f} (${al(f)})${m}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},Bd=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",Fd=(e,t)=>{if(e instanceof $c)return;const r=(e=>Fc(e)&&Bc in e)(e)?e.originalMessage:String(e?.message??e),n=Va(((e,t)=>{if(t===Nu())return e;let r;try{r=d(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===n?void 0:n},Hd=e=>"string"==typeof e?e:R(e),Ud=e=>Array.isArray(e)?e.map(e=>Hu(Gd(e))).filter(Boolean).join("\n"):Gd(e),Gd=e=>"string"==typeof e?e:oa(e)?la(e):"",Wd=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>zd({command:e,escapedCommand:t,cwd:i,durationMs:Cc(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Vd=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>Kd({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),Kd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:p,ipcOutput:f,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:S,signal:E,signalDescription:_}=Xd(l,u),{originalMessage:x,shortMessage:A,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m,maxBuffer:h,timeout:g,cwd:y})=>{const b=n?.code,v=jd({originalError:n,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:f,killSignal:m}),w=Fd(n,y),S=`${v}: ${a}${void 0===w?"":`\n${w}`}`,E=[S,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Hd(e)).join("\n")].map(e=>Va(Hu(Ud(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:S,message:E}})({stdio:d,all:p,ipcOutput:f,originalError:e,signal:E,signalDescription:_,exitCode:S,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:h,cwd:b}),O=((e,t,r)=>new(r?Uc:Hc)(t,e instanceof $c?{}:{cause:e}))(e,T,w);return Object.assign(O,qd({error:O,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:S,signal:E,signalDescription:_,stdio:d,all:p,ipcOutput:f,cwd:b,originalMessage:x,shortMessage:A})),O},qd=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:p,all:f,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:y})=>zd({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:h,durationMs:Cc(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:p[1],stderr:p[2],all:f,stdio:p,ipcOutput:m,pipedFrom:[]}),zd=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Xd=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:al(t)}},Yd=e=>Number.isFinite(e)?e:0;function Qd(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Yd(1e3*e)%1e3),nanoseconds:Math.trunc(Yd(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Zd(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");const n=e<0?"-":"";e=e<0?-e:e,(t={...t}).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let o=[];const i=(e,r,n,i)=>{if(0!==o.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===n){if(i??=String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=o.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):n;o.push(i)}},s=Qd(e),a=BigInt(s.days);if(t.hideYearAndDays?i(24n*BigInt(a)+BigInt(s.hours),"hour","h"):(t.hideYear?i(a,"day","d"):(i(a/365n,"year","y"),i(a%365n,"day","d")),i(Number(s.hours),"hour","h")),i(Number(s.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){const e=Number(s.seconds),r=Number(s.milliseconds),n=Number(s.microseconds),o=Number(s.nanoseconds);if(i(e,"second","s"),t.formatSubMilliseconds)i(r,"millisecond","ms"),i(n,"microsecond","µs"),i(o,"nanosecond","ns");else{const e=r+n/1e3+o/1e6,s="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=s?e.toFixed(s):a;i(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),o=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");i(Number.parseFloat(o),"second","s",o)}if(0===o.length)return n+"0"+(t.verbose?" milliseconds":"ms");const c=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(o=o.slice(0,Math.max(t.unitCount,1))),n+o.join(c)}const Jd=(e,t)=>{Ba(t)&&(((e,t)=>{e.failed&&vc({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),ep(e,t))},ep=(e,t)=>{const r=`(done in ${Zd(e.durationMs)})`;vc({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},tp=(e,t,{reject:r})=>{if(Jd(e,t),e.failed&&r)throw e;return e},rp=(e,t)=>dp(e)?"asyncGenerator":pp(e)?"generator":mp(e)?"fileUrl":hp(e)?"filePath":Sp(e)?"webStream":zu(e,{checkOpen:!1})?"native":oa(e)?"uint8Array":_p(e)?"asyncIterable":xp(e)?"iterable":Ep(e)?ip({},t):fp(e)?np(e,t):"native",np=(e,t)=>Qu(e.transform,{checkOpen:!1})?op(e,t):Ep(e.transform)?ip(e,t):cp(e,t),op=(e,t)=>(sp(e,t,"Duplex stream"),"duplex"),ip=(e,t)=>(sp(e,t,"web TransformStream"),"webTransform"),sp=({final:e,binary:t,objectMode:r},n,o)=>{ap(e,`${n}.final`,o),ap(t,`${n}.binary`,o),lp(r,`${n}.objectMode`)},ap=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},cp=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!up(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qu(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(Ep(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!up(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return lp(r,`${o}.binary`),lp(n,`${o}.objectMode`),dp(e)||dp(t)?"asyncGenerator":"generator"},lp=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},up=e=>dp(e)||pp(e),dp=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),pp=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),fp=e=>Qs(e)&&(void 0!==e.transform||void 0!==e.final),mp=e=>"[object URL]"===Object.prototype.toString.call(e),hp=e=>Qs(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>gp.has(e))&&yp(e.file),gp=new Set(["file","append"]),yp=e=>"string"==typeof e,bp=new Set(["ipc","ignore","inherit","overlapped","pipe"]),vp=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),wp=e=>"[object WritableStream]"===Object.prototype.toString.call(e),Sp=e=>vp(e)||wp(e),Ep=e=>vp(e?.readable)&&wp(e?.writable),_p=e=>Ap(e)&&"function"==typeof e[Symbol.asyncIterator],xp=e=>Ap(e)&&"function"==typeof e[Symbol.iterator],Ap=e=>"object"==typeof e&&null!==e,Tp=new Set(["generator","asyncGenerator","duplex","webTransform"]),Op=new Set(["fileUrl","filePath","fileNumber"]),Rp=new Set(["fileUrl","filePath"]),Cp=new Set([...Rp,"webStream","nodeStream"]),kp=new Set(["webTransform","duplex"]),Pp={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Ip=(e,t,r,n)=>"output"===n?Dp(e,t,r):Lp(e,t,r),Dp=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Lp=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Mp=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>Tp.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Np({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Fp(i,r)},Np=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?$p({stdioItem:e,optionName:o}):"webTransform"===t?jp({stdioItem:e,index:r,newTransforms:n,direction:i}):Bp({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),$p=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},jp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Qs(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Ip(s,r,n,o);return{...e,value:{transform:i,writableObjectMode:a,readableObjectMode:c}}},Bp=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Qs(t)?t:{transform:t},d=c||Pu.has(i),{writableObjectMode:p,readableObjectMode:f}=Ip(u,r,n,o);return{...e,value:{transform:s,final:a,binary:d,preserveNewlines:l,writableObjectMode:p,readableObjectMode:f}}},Fp=(e,t)=>"input"===t?e.reverse():e,Hp=({type:e,value:t},r)=>Up[r]??Vp[e](t),Up=["input","output","output"],Gp=()=>{},Wp=()=>"input",Vp={generator:Gp,asyncGenerator:Gp,fileUrl:Gp,filePath:Gp,iterable:Wp,asyncIterable:Wp,uint8Array:Wp,webStream:e=>wp(e)?"output":"input",nodeStream:e=>Yu(e,{checkOpen:!1})?Xu(e,{checkOpen:!1})?void 0:"input":"output",webTransform:Gp,duplex:Gp,native(e){const t=Kp(e);return void 0!==t?t:zu(e,{checkOpen:!1})?Vp.nodeStream(e):void 0}},Kp=e=>[0,I.stdin].includes(e)?"input":[1,2,I.stdout,I.stderr].includes(e)?"output":void 0,qp="output",zp=(e,t)=>{if(void 0===e)return xa.map(e=>t[e]);if(Xp(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xa.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,xa.length);return Array.from({length:r},(t,r)=>e[r])},Xp=e=>xa.some(t=>void 0!==e[t]),Yp=(e,t)=>Array.isArray(e)?e.map(e=>Yp(e,t)):null==e?t>=xa.length?"ignore":"pipe":e,Qp=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Fa(r,n)||!Zp(e)?e:"ignore"),Zp=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),Jp=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=ef({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(zu(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},ef=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=tf(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if($.isatty(o))throw new TypeError(`The \`${t}: ${Bl(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:ia(p(o)),optionName:t}}},tf=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=_a.indexOf(e);return-1!==r?r:void 0},rf=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:nf(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:nf(t,t,r),optionName:r}:zu(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,nf=(e,t,r)=>{const n=_a[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},of=({input:e,inputFile:t},r)=>0===r?[...sf(e),...cf(t)]:[],sf=e=>void 0===e?[]:[{type:af(e),value:e,optionName:"input"}],af=e=>{if(Yu(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(oa(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},cf=e=>void 0===e?[]:[{...lf(e),optionName:"inputFile"}],lf=e=>{if(mp(e))return{type:"fileUrl",value:e};if(yp(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")},uf=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>({...t,direction:e}))),df=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Rp.has(t)&&pf({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},pf=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>ff(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return hf(s,n,t),"output"===o?i[0].stream:void 0},ff=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,mf=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);hf(o,n,t)},hf=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Pp[r]} that is the same.`)},gf=(e,t,r,n)=>{const o=(({stdio:e,ipc:t,buffer:r,...n},o,i)=>{const s=zp(e,n).map((e,t)=>Yp(e,t));return i?Qp(s,r,o):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(s,t)})(t,r,n),i=o.map((e,r)=>yf({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=Af({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>Cf(e)),s},yf=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Aa(t),{stdioItems:i,isStdioArray:s}=bf({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Hp(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??qp})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?Jp({stdioItem:e,fdNumber:n,direction:o}):rf({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!Tp.has(e)),...Mp(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>Tp.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return xf(l,u),{direction:a,objectMode:u,stdioItems:l}},bf=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>vf(e,n)),...of(r,t)]),i=o.length>1;return wf(o,i,n),Ef(o),{stdioItems:o,isStdioArray:i}},vf=(e,t)=>({type:rp(e,t),value:e,optionName:t}),wf=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(Sf.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},Sf=new Set(["ignore","ipc"]),Ef=e=>{for(const t of e)_f(t)},_f=({type:e,value:t,optionName:r})=>{if((e=>mp(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!bp.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},xf=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Op.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Af=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(Tf({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw Rf(o),e}},Tf=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>Of({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},Of=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=uf(o,e);if(0!==s.length){if(!i)return Cp.has(e)?pf({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(kp.has(e)&&mf({otherStdioItems:s,type:e,value:t,optionName:r}));df({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?{...e,stream:s}:{...e,...t[r][e.type](e,n)}},Rf=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||Ea(e)||e.destroy()},Cf=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},kf=({type:e,optionName:t})=>{Pf(t,Pp[e])},Pf=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},If={generator(){},asyncGenerator:kf,webStream:kf,nodeStream:kf,webTransform:kf,duplex:kf,asyncIterable:kf,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||Pf(e,`"${t}"`),{})},Df={input:{...If,fileUrl:({value:e})=>({contents:[ia(p(e))]}),filePath:({value:{file:e}})=>({contents:[ia(p(e))]}),fileNumber:kf,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...If,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:kf,string:kf,uint8Array:kf}},Lf=(e,{stripFinalNewline:t},r)=>Mf(t,r)&&void 0!==e&&!Array.isArray(e)?Hu(e):e,Mf=(e,t)=>"all"===t?e[1]||e[2]:e[t],Nf=(e,t,r,n)=>e||r?void 0:Bf(t,n),$f=(e,t,r)=>r?e.flatMap(e=>jf(e,t)):jf(e,t),jf=(e,t)=>{const{transform:r,final:n}=Bf(t,{});return[...r(e),...n()]},Bf=(e,t)=>(t.previousChunks="",{transform:Ff.bind(void 0,t,e),final:Uf.bind(void 0,t)}),Ff=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i<r.length;i+=1)if("\n"===r[i]){const s=Hf(r,i,t,e);let a=r.slice(o+1,i+1-s);n.length>0&&(a=Vf(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=Vf(n,r.slice(o+1))),e.previousChunks=n},Hf=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),Uf=function*({previousChunks:e}){e.length>0&&(yield e)},Gf=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:Wf.bind(void 0,n)},Wf=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?Kf:qf;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},Vf=(e,t)=>`${e}${t}`,Kf={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:Vf},qf={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},zf=(e,t)=>e?void 0:Xf.bind(void 0,t),Xf=function*(e,t){if("string"!=typeof t&&!oa(t)&&!ee.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Yf=(e,t)=>e?Qf.bind(void 0,t):Zf.bind(void 0,t),Qf=function*(e,t){Jf(e,t),yield t},Zf=function*(e,t){if(Jf(e,t),"string"!=typeof t&&!oa(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Jf=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},em=(e,t,r)=>{if(r)return;if(e)return{transform:tm.bind(void 0,new TextEncoder)};const n=new A(t);return{transform:rm.bind(void 0,n),final:nm.bind(void 0,n)}},tm=function*(e,t){ee.isBuffer(t)?yield ia(t):"string"==typeof t?yield e.encode(t):yield t},rm=function*(e,t){yield oa(t)?e.write(t):t},nm=function*(e){const t=e.end();""!==t&&(yield t)},om=k(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),im=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=lm}=t[r];for await(const o of n(e))yield*im(o,t,r+1)},sm=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*am(r,Number(t),e)},am=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*im(n,r,t+1)},cm=k(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),lm=function*(e){yield e},um=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},dm=(e,t)=>[...t.flatMap(t=>[...pm(t,e,0)]),...fm(e)],pm=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=hm}=t[r];for(const o of n(e))yield*pm(o,t,r+1)},fm=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*mm(r,Number(t),e)},mm=function*(e,t,r){if(void 0!==e)for(const n of e())yield*pm(n,r,t+1)},hm=function*(e){yield e},gm=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=bm(e,s,i),l=dp(t),u=dp(r),d=l?om.bind(void 0,im,a):um.bind(void 0,pm),p=l||u?om.bind(void 0,sm,a):um.bind(void 0,fm),f=l||u?cm.bind(void 0,a):void 0;return{stream:new z({writableObjectMode:n,writableHighWaterMark:X(n),readableObjectMode:o,readableHighWaterMark:X(o),transform(e,t,r){d([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:f})}},ym=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=bm(t,r,n);e=dm(o,e)}return e},bm=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:zf(n,a)},em(r,s,n),Nf(r,i,n,c),{transform:e,final:t},{transform:Yf(o,a)},Gf({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},vm=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),wm=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Pp[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>Sm(e,n));r.input=da(i)},Sm=(e,t)=>{const r=ym(e,t,"utf8",!0);return Em(r),da(r)},Em=e=>{const t=e.find(e=>"string"!=typeof e&&!oa(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},_m=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Fa(r,n)&&!Pu.has(t)&&xm(n)&&(e.some(({type:e,value:t})=>"native"===e&&Am.has(t))||e.every(({type:e})=>Tp.has(e))),xm=e=>1===e||2===e,Am=new Set(["pipe","overlapped"]),Tm=e=>e._readableState.pipes.length>0,Om=(e,t,r)=>{const n=_c(e);vc({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Rm=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=$d(r);return e.length>n?e.slice(0,n):e})(e,i,d),f=ia(p),{stdioItems:m,objectMode:h}=t[r],g=Cm([f],m,c,n),{serializedResult:y,finalResult:b=y}=km({chunks:g,objectMode:h,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Pm({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:m,objectMode:h});const v=a[r]?b:void 0;try{return void 0===n.error&&Im(y,m,o),v}catch(e){return n.error=e,v}},Cm=(e,t,r,n)=>{try{return ym(e,t,r,!1)}catch(t){return n.error=t,e}},km=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:da(e)};const s=((e,t)=>ua(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:$f(s,!o[i],t)}:{serializedResult:s}},Pm=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!_m({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=$f(e,!1,s);try{((e,t,r)=>{for(const n of e)Om(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Im=(e,t,r)=>{for(const{path:n,append:o}of t.filter(({type:e})=>Op.has(e))){const t="string"==typeof n?n:n.toString();o||r.has(t)?f(n,e):(r.add(t),m(n,e))}},Dm=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Lm(e):r.value},Lm=async e=>{try{return await U(e,"exit")}catch{return Lm(e)}},Mm=async e=>{const[t,r]=await e;if(!Nm(t,r)&&$m(t,r))throw new $c;return[t,r]},Nm=(e,t)=>void 0===e&&void 0===t,$m=(e,t)=>0!==e||null!==t,jm=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Bm(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>$d(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Bm=(e,t,r)=>void 0!==e?e:$m(t,r)?new $c:void 0,Fm=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),a=Hm(r),{file:c,commandArguments:l,options:u}=$u(e,t,a);Um(u);const d=((e,t)=>gf(Df,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Hm=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,Um=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Gm("ipcInput"),e&&Gm("ipc: true"),r&&Gm("detached: true"),n&&Gm("cancelSignal")},Gm=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Wm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=Vm({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f}=jm(c,r),{output:m,error:h=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]);return{output:t.map((t,a)=>Rm({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r)),...i}})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:i}),g=m.map((e,t)=>Lf(e,r,t)),y=Lf((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Lf(t,r,"all")]:Array.isArray(t)?[Lf(e,r,"all"),...t]:oa(e)&&oa(t)?fa([e,t]):`${e}${t}`})(m,r),r,"all");return qm({error:h,exitCode:u,signal:d,timedOut:p,isMaxBuffer:f,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},Vm=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of vm(e))wm(e,r,t)})(i,r);const n=Km(r);return _(...Fu(e,t,n))}catch(e){return Vd({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},Km=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:$d(t)}),qm=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Wd({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):Kd({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),zm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(yl({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Xm({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),Xm=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{Hl(t,o);const i=zl(e,t,r),s=new AbortController;try{return await Promise.race([Ym(i,n,s),Qm(i,r,s),Zm(i,r,s)])}catch(t){throw Ol(e),t}finally{s.abort(),Gl(t,o)}},Ym=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of V(e,"message",{signal:r}))if(t(n))return n},Qm=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${xl("getOneMessage",e)} could not complete: the ${Tl(e)} exited or disconnected.`)})(t)},Zm=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw wl(n,t)},Jm=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>eh({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),eh=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{yl({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Ql(e)}),Hl(t,i);const s=zl(e,t,r),a=new AbortController,c={};return th(e,s,a),rh({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),nh({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},th=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},rh=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=wl(o,t),r.abort()}catch{}},nh=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of V(r,"message",{signal:i.signal}))oh(s),yield e}catch{oh(s)}finally{i.abort(),Gl(t,a),n||Ol(e),o&&await e}},oh=({error:e})=>{if(e)throw e},ih=(e,t,r)=>({sendMessage:du.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:zm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Jm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),sh=(e,t)=>{const r=ah(),n=ah(),o=ah(),i=Array.from({length:t.length-3},ah),s=ah(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ah=()=>{const e=new J;return e.end(),e},ch=()=>new Z({read(){}}),lh=()=>new Q({write(){}}),uh=()=>new Y({read(){},write(){}}),dh=async(e,t,r)=>tp(e,t,r),ph=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${Pp[e]}.`)},fh={fileNumber:ph,generator:gm,asyncGenerator:gm,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Y.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},mh={input:{...fh,fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Z.fromWeb(e)}),iterable:({value:e})=>({stream:Z.from(e)}),asyncIterable:({value:e})=>({stream:Z.from(e)}),string:({value:e})=>({stream:Z.from(e)}),uint8Array:({value:e})=>({stream:Z.from(ee.from(e))})},output:{...fh,fileUrl:({value:e})=>({stream:h(e)}),filePath:({value:{file:e,append:t}})=>({stream:h(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:ph,asyncIterable:ph,string:ph,uint8Array:ph}};function hh(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)Sh(t);const t=e.some(({readableObjectMode:e})=>e),r=gh(e,t),n=new yh({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const gh=(e,t)=>{if(0===e.length)return X(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class yh extends J{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#d=new WeakMap;add(e){if(Sh(e),this.#s.has(e))return;this.#s.add(e),this.#l??=bh(this,this.#s,this.#u);const t=Eh({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#d.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Sh(e),!this.#s.has(e))return!1;const t=this.#d.get(e);return void 0!==t&&(this.#d.delete(e),e.unpipe(this),await t,!0)}}const bh=async(e,t,r)=>{Ih(e,Dh);const n=new AbortController;try{await Promise.race([vh(e,n),wh(e,t,r,n)])}finally{n.abort(),Ih(e,-Dh)}},vh=async(e,{signal:t})=>{try{await te(e,{signal:t,cleanup:!0})}catch(t){throw Oh(e,t),t}},wh=async(e,t,r,{signal:n})=>{for await(const[o]of V(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},Sh=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Eh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{Ih(e,Lh);const a=new AbortController;try{await Promise.race([_h(i,t,a),xh({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),Ah({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),Ih(e,-Lh)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?Ch(e):Th(e))},_h=async(e,t,{signal:r})=>{try{await e,r.aborted||Ch(t)}catch(e){r.aborted||Oh(t,e)}},xh=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await te(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;Rh(n)?o.add(t):kh(e,n)}},Ah=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},Th=e=>{e.writable&&e.end()},Oh=(e,t)=>{Rh(t)?Ch(e):kh(e,t)},Rh=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Ch=e=>{(e.readable||e.writable)&&e.destroy()},kh=(e,t)=>{e.destroyed||(e.once("error",Ph),e.destroy(t))},Ph=()=>{},Ih=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Dh=2,Lh=1,Mh=(e,t)=>{e.pipe(t),Nh(e,t),jh(e,t)},Nh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(e,{cleanup:!0,readable:!0,writable:!1})}catch{}$h(t)}},$h=e=>{e.writable&&e.end()},jh=async(e,t)=>{if(!Ea(e)&&!Ea(t)){try{await te(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Bh(e)}},Bh=e=>{e.readable&&e.destroy()},Fh=(e,t,r,n)=>{"output"===r?Mh(e.stdio[n],t):Mh(t,e.stdio[n]);const o=Hh[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},Hh=["stdin","stdout","stderr"],Uh=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;Gh(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},Gh=(e,{signal:t})=>{Ea(e)&&Fl(e,Wh,t)},Wh=2,Vh=[];Vh.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Vh.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Vh.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Kh=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,qh=Symbol.for("signal-exit emitter"),zh=globalThis,Xh=Object.defineProperty.bind(Object);class Yh{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(zh[qh])return zh[qh];Xh(zh,qh,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class Qh{}const Zh=globalThis.process,{onExit:Jh}=(eg=Kh(Zh)?new class extends Qh{#p="win32"===Zh.platform?"SIGINT":"SIGHUP";#f=new Yh;#m;#h;#g;#y={};#b=!1;constructor(e){super(),this.#m=e,this.#y={};for(const t of Vh)this.#y[t]=()=>{const r=this.#m.listeners(t);let{count:n}=this.#f;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#f.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#h=e.emit}onExit(e,t){if(!Kh(this.#m))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#f.on(r,e),()=>{this.#f.removeListener(r,e),0===this.#f.listeners.exit.length&&0===this.#f.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#f.count+=1;for(const e of Vh)try{const t=this.#y[e];t&&this.#m.on(e,t)}catch(e){}this.#m.emit=(e,...t)=>this.#v(e,...t),this.#m.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,Vh.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#m.removeListener(e,t)}catch(e){}}),this.#m.emit=this.#h,this.#m.reallyExit=this.#g,this.#f.count-=1)}#w(e){return Kh(this.#m)?(this.#m.exitCode=e||0,this.#f.emit("exit",this.#m.exitCode,null),this.#g.call(this.#m,this.#m.exitCode)):0}#v(e,...t){const r=this.#h;if("exit"===e&&Kh(this.#m)){"number"==typeof t[0]&&(this.#m.exitCode=t[0]);const n=r.call(this.#m,e,...t);return this.#f.emit("exit",this.#m.exitCode,null),n}return r.call(this.#m,e,...t)}}(Zh):new class extends Qh{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>eg.onExit(e,t),load:()=>eg.load(),unload:()=>eg.unload()});var eg;const tg=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=rg(e,t,...r);return{destination:n,destinationStream:Cl(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},rg=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(ng,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL||ea(r)){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=ra(r,...n);return{destination:t(ng)(o,i,s),pipeOptions:s}}if(Pl.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},ng=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),og=(e,t)=>{try{return{sourceStream:kl(e,t)}}catch(e){return{sourceError:e}}},ig=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(Bh(e),n):void 0!==t?($h(r),t):void 0,sg=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Vd({error:e,command:ag,escapedCommand:ag,fileDescriptors:t,options:r,startTime:n,isSync:!1}),ag="source.pipe(destination)",cg=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},lg=(e,t)=>{const r=hh([e]);return Mh(r,t),pg.set(t,r),r},ug=(e,t)=>{const r=pg.get(t);return r.add(e),r},dg=async e=>{try{await te(e,{cleanup:!0,readable:!1,writable:!0})}catch{}pg.delete(e)},pg=new WeakMap,fg=2,mg=1,hg=(e,t)=>void 0===e?[]:[gg(e,t)],gg=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await P(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw sg({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},yg=(e,...t)=>{if(Qs(t[0]))return yg.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});const{destination:r,...n}=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=Rc(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=tg(r,n,o),{sourceStream:d,sourceError:p}=og(e,l),{options:f,fileDescriptors:m}=Pl.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:f,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:i}})(e,...t),o=bg({...n,destination:r});return o.pipe=yg.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),o},bg=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=vg(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ig({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw sg({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const d=new AbortController;try{const e=((e,t,r)=>{const n=pg.has(t)?ug(e,t):lg(e,t);return Fl(e,fg,r.signal),Fl(t,mg,r.signal),dg(t),n})(t,i,d);return await Promise.race([cg(u),...hg(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{d.abort()}},vg=(e,t)=>Promise.allSettled([e,t]),wg=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return Sg(t,s),xg({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},Sg=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Eg=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;_g(t,s,e);const a=e.readableObjectMode&&!i;return xg({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},_g=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},xg=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=V(e,"data",{signal:t.signal,highWaterMark:Tg,highWatermark:Tg});return Og({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},Ag=X(!0),Tg=Ag,Og=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=Rg({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*pm(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*fm(a)}},Rg=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[em(e,r,!t),Nf(e,o,!n,{})].filter(Boolean),Cg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const d=kg({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([Pg(e),d]);const p=Mf(c,r),f=Eg({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[m]=await Promise.all([Ig({stream:e,iterable:f,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),d]);return m},kg=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!_m({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=Eg({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)Tm(t)||Om(o,r,n)})(a,e,r,i)},Pg=async e=>{await F(),null===e.readableFlowing&&e.resume()},Ig=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return ud(e,Ed,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return ud(e,Pd,t)}(r,{maxBuffer:i})):await async function(e,t){return ud(e,Dd,t)}(r,{maxBuffer:i})}catch(r){return Lg((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof gd))throw e;if("all"===i)return e;const s=Ld(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},Dg=async e=>{try{return await e}catch(e){return Lg(e)}},Lg=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===na.call(t)?new Uint8Array(e):e;var t},Mg=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=Ng(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],te(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||Bg(e,t,r,n)}finally{s.abort()}},Ng=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&$g(e,r,n),n},$g=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{jg(t,r),n.call(e,...o)}},jg=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},Bg=(e,t,r,n)=>{if(!Fg(e,t,r,n))throw e},Fg=(e,t,r,n=!0)=>r.propagating?Gg(e)||Ug(e):(r.propagating=!0,Hg(r,t)===n?Gg(e):Ug(e)),Hg=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,Ug=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,Gg=e=>"EPIPE"===e?.code,Wg=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=Mg(e,t,l);if(Hg(l,t))return void await u;const[d]=await Promise.all([Cg({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return d},Vg=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},Kg=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,qg=(e,t)=>{const r=_c(e);vc({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},zg=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Fa(e,"ipc"))(i),a=ja(t,"ipc"),c=ja(r,"ipc");for await(const t of eh({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(Md(0,o,c),o.push(t)),s&&qg(t,i);return o},Xg=async(e,t)=>(await Promise.allSettled([e]),t),Yg=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:p,verboseInfo:f,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await Dm(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>Wg({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),S=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>Wg({...Vg(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Kg(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a}))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:f,streamInfo:v}),E=[],_=zg({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:E,verboseInfo:f}),x=Qg(h,e,v),A=Zg(m,v);try{return await Promise.race([Promise.all([{},Mm(b),Promise.all(w),S,_,Cu(e,d),...x,...A]),g,Jg(e,y),...Tu(e,i,p,y),...hl({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),..._u({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>Dg(e))),Dg(S),Xg(_,E),Promise.allSettled(x),Promise.allSettled(A)])}},Qg=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:Mg(e,n,r)),Zg=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>zu(t,{checkOpen:!1})&&!Ea(t)).map(({type:e,value:n,stream:o=n})=>Mg(o,r,t,{isSameDirection:Tp.has(e),stopOnExit:"native"===e}))),Jg=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},ey=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=Rl();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},ty=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},ry=async e=>{if(void 0!==e)try{await ny(e)}catch{}},ny=async e=>{await te(e,{cleanup:!0,readable:!1,writable:!0})},oy=async e=>{await te(e,{cleanup:!0,readable:!0,writable:!1})},iy=async(e,t)=>{if(await e,t)throw t},sy=(e,t,r)=>{r&&!Ug(r)?e.destroy(r):t&&e.destroy()},ay=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||Pu.has(r),{subprocessStdout:a,waitReadableDestroy:c}=cy(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=ly(a,s),{read:p,onStdoutDataDone:f}=uy({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),m=new Z({read:p,destroy:k(fy.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return py({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},cy=(e,t,r)=>{const n=kl(e,t);return{subprocessStdout:n,waitReadableDestroy:ey(r,n,"readableDestroy")}},ly=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Ag},uy=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=Rl(),s=wg({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){dy(this,s,i)},onStdoutDataDone:i}},dy=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},py=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await oy(e),await n,await ry(o),await t,r.readable&&r.push(null)}catch(e){await ry(o),my(r,e)}},fy=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await ty(r,t)&&(my(e,n),await iy(t,n))},my=(e,t)=>{sy(e,e.readable,t)},hy=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=gy(e,r,t),s=new Q({...yy(n,e,o),destroy:k(Sy.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wy(n,s),s},gy=(e,t,r)=>{const n=Cl(e,t);return{subprocessStdin:n,waitWritableFinal:ey(r,n,"writableFinal"),waitWritableDestroy:ey(r,n,"writableDestroy")}},yy=(e,t,r)=>({write:by.bind(void 0,e),final:k(vy.bind(void 0,e,t,r))}),by=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},vy=async(e,t,r)=>{await ty(r,t)&&(e.writable&&e.end(),await t)},wy=async(e,t,r)=>{try{await ny(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await oy(e)}catch{}})(r),Ey(t,e)}},Sy=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await ty(r,t),await ty(n,t)&&(Ey(e,o),await iy(t,o))},Ey=(e,t)=>{sy(e,e.writable,t)},_y=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||Pu.has(r),{subprocessStdout:c,waitReadableDestroy:l}=cy(e,n,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:p}=gy(e,o,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:h}=ly(c,a),{read:g,onStdoutDataDone:y}=uy({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Y({read:g,...yy(u,e,d),destroy:k(xy.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:p})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return py({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),wy(u,b,c),b},xy=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([fy({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),Sy({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},Ay=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||Pu.has(t),s=kl(e,r),a=wg({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ty(a,s,e)},Ty=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Oy=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=ay.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=hy.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=_y.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=Ay.bind(void 0,e,t),e[Symbol.asyncIterator]=Ay.bind(void 0,e,t,{})},Ry=(async()=>{})().constructor.prototype,Cy=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ry,e)]),ky=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Py(e,t,r),{subprocess:p,promise:f}=Dy({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:d});return p.pipe=yg.bind(void 0,{source:p,sourcePromise:f,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Cy){const o=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}})(p,f),Pl.set(p,{options:u,fileDescriptors:d}),p},Py=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=kc(e,t,r),{file:a,commandArguments:c,options:l}=$u(e,t,r),u=Iy(l),d=((e,t)=>gf(mh,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:d}},Iy=({timeout:e,signal:t,...r})=>{if(void 0!==t)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},Dy=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=x(...Fu(e,t,r))}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{Rf(n);const a=new S;sh(a,n),Object.assign(a,{readable:ch,writable:lh,duplex:uh});const c=Vd({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:dh(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;K(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>Tp.has(e)))Fh(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!Tp.has(e)))Uh({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:hh(t);Mh(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=Jh(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const d={},p=Rl();c.kill=ll.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:d,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?hh([e,t].filter(Boolean)):void 0)(c,r),Oy(c,r),((e,{ipc:t})=>{Object.assign(e,ih(e,!1,t))})(c,r);return{subprocess:c,promise:Ly({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:d,onInternalError:p,controller:l})}},Ly=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[d,[p,f],m,h,g]=await Yg({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=m.map((e,r)=>Lf(e,t,r)),b=Lf(h,t,"all"),v=My({errorInfo:d,exitCode:p,signal:f,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return tp(v,n,t)},My=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?Kd({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof gd,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Wd({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Ny=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,$y(t,e[t],r)]));return{...e,...r}},$y=(e,t,r)=>jy.has(e)&&Qs(t)&&Qs(r)?{...t,...r}:r,jy=new Set(["env",...$a]),By=(e,t,r,n)=>{const o=(e,t,n)=>By(e,t,r,n),i=(...i)=>Fy({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Fy=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Qs(i))return o(e,Ny(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=Hy({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Fm(e,t,r),d=Wm({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return tp(d,c,l)})(a,c,l):ky(a,c,l,o)},Hy=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=ha({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=ra(...i),u=Ny(Ny(n,o),l),{file:d=a,commandArguments:p=c,options:f=u,isSync:m=!1}=e({file:a,commandArguments:c,options:u});return{file:d,commandArguments:p,options:f,isSync:m}},Uy=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Gy(e);return{file:r,commandArguments:n}},Gy=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Wy)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Wy=/ +/g,Vy=({options:e})=>({...Ky(e),isSync:!0}),Ky=e=>({options:{...qy(e),...e}}),qy=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};By(()=>({}));const zy=By(()=>({isSync:!0}));By(({file:e,commandArguments:t})=>Uy(e,t)),By(({file:e,commandArguments:t})=>({...Uy(e,t),isSync:!0})),By(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}}),By(({options:e})=>Ky(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Vy,r),e.s=e.sync}),(()=>{const e=I,t=!0,r=void 0!==I.channel;ih(e,t,r),gu.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})(),u.enableCompileCache?.();const Xy=global,Yy=new Proxy(global.target,{set:function(e,t,r,n){return Reflect.set(e,t,r,n)},get:function(e,t,r){return console.log(`make ${t}`),Reflect.get(e,t,r)}}),Qy=["packages","codemods","eslint"],Zy=Xy.which("yarn").stdout,Jy=process.execPath;function eb(e,t,r,n=!0,o=!1){console.log(`${e.replaceAll(Zy,"yarn").replaceAll(Jy,"node")} ${t.join(" ")}`);try{return zy(e,t,{stdio:n?"inherit":void 0,cwd:r&&l.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function tb(e,t,r,n){return eb(Zy,e,t,r,n)}function rb(e,t,r){return eb(Jy,e,t,r)}function nb(e,t){const r=process.env;process.env={...r,...t},e(),process.env=r}function ob(...e){const t=["--format","codeframe","--concurrency","auto","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=16;e<r.length;e+=t)r.length-e===1?n.push([`packages/${r[e]}/**/*`]):n.push([`packages/{${r.slice(e,e+t)}}/**/*`]);const o=["eslint","codemods","scripts","benchmark","*.{js,cjs,mjs,ts}"];if(n.push(o),process.env.ESLINT_GO_BRRRR)nb(()=>tb(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=8192"});else{let e=null;for(const r of n)try{nb(()=>tb(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function ib(e,t,r){const n="./build/"+e.toLowerCase();Xy.rm("-rf",n),console.log("mkdir -p build"),v("build",{recursive:!0}),eb("git",["clone","--filter=blob:none","--sparse","--depth","1","--revision="+function(e){const t=p("./Makefile","utf8"),r=new RegExp(`${e}_COMMIT = (\\w{40})`).exec(t)[1];if(!r)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return r}(e),t,n]),eb("git",["sparse-checkout","set",...r],n)}Xy.config.verbose=!0,Yy["clean-all"]=function(){Xy.rm("-rf",["package-lock.json",".changelog"]),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/package-lock.json`)}),Yy.clean(),Yy["clean-lib"](),Yy["clean-node-modules"](),Yy["clean-ts"]()},Yy["clean-node-modules"]=function(){Xy.rm("-rf","node_modules"),Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/node_modules`)})},Yy.clean=function(){Yy["test-clean"](),Xy.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Yy["test-clean"]=function(){Qy.forEach(e=>{Xy.rm("-rf",`${e}/*/test/tmp`),Xy.rm("-rf",`${e}/*/test-fixtures.json`)})},Yy["clean-lib"]=function(){Xy.rm("-rf",Qy.map(e=>`${e}/*/lib`))},Yy["clean-runtime-helpers"]=function(){Xy.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Yy["bootstrap-only"]=function(){Yy["clean-all"](),tb(["install"])},Yy.bootstrap=function(){Yy["bootstrap-only"](),Yy["generate-tsconfig"](),Yy.build()},Yy.build=function(){Yy["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Yy["build-standalone"]()},Yy["build-standalone"]=function(){tb(["gulp","build-babel-standalone"])},Yy["build-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),tb(["gulp","build"]),Yy["build-dist"]()},Yy["build-no-bundle"]=function(){Yy.clean(),Yy["clean-lib"](),Yy["bundle-babel-parser-dts"](),nb(()=>{tb(["gulp","build-dev"])},{BABEL_ENV:"development"}),Yy["build-dist"]()},Yy["build-flow-typings"]=function(){m("packages/babel-types/lib/index.js.flow",rb(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Yy["build-dist"]=function(){Yy["build-plugin-transform-runtime-dist"]()},Yy["build-plugin-transform-runtime-dist"]=function(){rb(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Yy.prepublish=function(){Yy["bootstrap-only"](),nb(()=>{Yy["prepublish-build"](),Yy.test()},{IS_PUBLISH:"true"})},Yy["prepublish-build"]=function(){Yy["clean-lib"](),Yy["clean-runtime-helpers"](),rb(["scripts/generators/npm-ignore.ts"]),nb(()=>{Yy["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true",IS_PUBLISH:"true"}),nb(()=>{Yy["prepublish-build-standalone"](),Yy["clone-license"](),Yy["prepublish-prepare-dts"](),Yy["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_VERSION_FLAG:"true"})},Yy["prepublish-build-standalone"]=function(){nb(()=>{Yy["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Yy["prepublish-prepare-dts"]=function(){Yy["clean-ts"](),Yy.tscheck(),Yy["prepublish-prepare-dts-no-clean"]()},Yy["bundle-babel-parser-dts"]=function(){Yy["tscheck-babel-parser"](),tb(["gulp","bundle-babel-parser-dts"])},Yy["prepublish-prepare-dts-no-clean"]=function(){tb(["gulp","bundle-dts"]),Yy["build-typescript-legacy-typings"](),tb(["tsc","-p","tsconfig.dts-bundles.json"])},Yy.tscheck=function(){Yy["generate-tsconfig"](),rb(["scripts/parallel-tsc/tsc.ts","."]),Yy["tscheck-helpers"]()},Yy["tscheck-babel-parser"]=function(){rb(["scripts/parallel-tsc/tsc.ts","./packages/babel-parser"])},Yy["tscheck-helpers"]=function(){tb(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Yy["clean-ts"]=function(){Xy.rm("-rf","tsconfig.tsbuildinfo"),Xy.rm("-rf","*/*/tsconfig.tsbuildinfo"),Xy.rm("-rf","dts")},Yy["generate-tsconfig"]=function(){rb(["scripts/generators/tsconfig.ts"]),rb(["scripts/generators/archived-libs-typings.ts"])},Yy["generate-type-helpers"]=function(){tb(["gulp","generate-type-helpers"])},Yy["build-typescript-legacy-typings"]=function(){m("packages/babel-types/lib/index-legacy.d.ts",rb(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Yy["clone-license"]=function(){rb(["scripts/clone-license.ts"])},Yy.lint=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob(),tb(["tstyche"]),Yy["lint-prettier"]()},Yy["lint-ci"]=function(){Yy.tscheck(),ob(),tb(["tstyche"]),Yy["lint-prettier"](),Yy["prepublish-prepare-dts-no-clean"]()},Yy["lint-prettier"]=function(){tb(["prettier",".","--check"])},Yy.fix=function(){Yy["fix-js"](),Yy["fix-prettier"]()},Yy["fix-js"]=function(){nb(()=>Yy.tscheck(),{TSCHECK_SILENT:"true"}),ob("--fix")},Yy["fix-prettier"]=function(){tb(["prettier",".","--write"])},Yy.watch=function(){Yy["build-no-bundle"](),nb(()=>{tb(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Yy.test=function(){Yy.lint(),Yy["test-only"]()},Yy["test-only"]=function(e=[]){tb(["jest",...e])},Yy["test-cov"]=function(){Yy.build(),nb(()=>{tb(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Yy["bootstrap-test262"]=function(){ib("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Yy["bootstrap-typescript"]=function(){ib("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Yy["bootstrap-flow"]=function(){ib("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Yy["new-version-checklist"]=function(){},Yy["new-version"]=function(){Yy["new-version-checklist"](),eb("git",["pull","--rebase"]),tb(["release-tool","version","-f","@babel/standalone"])};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.BABEL_COVERAGE !== "true") {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(
"packages/babel-types/lib/index.js.flow",
node(["packages/babel-types/scripts/generators/flow.ts"], undefined, false)
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(
"packages/babel-types/lib/index-legacy.d.ts",
node(
["packages/babel-types/scripts/generators/typescript-legacy.ts"],
undefined,
false
)
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.ESLINT_GO_BRRRR) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = readFileSync("./Makefile", "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = readFileSync(src, { encoding: "utf8" });
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(
dest,
`${code}
//# sourceMappingURL=${path.basename(dest)}.map
`,
"utf8"
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(dest + ".map", JSON.stringify(map), "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(dest, code, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
value: bool(process.env.IS_PUBLISH),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
value: process.env.STRIP_BABEL_VERSION_FLAG
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
? bool(process.env.BABEL_9_BREAKING)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH || env === "standalone") {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (bool(process.env.BABEL_9_BREAKING)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
pkg = fs.readFileSync(pathUtils.join(dir, "package.json"), "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFileSync(tokenTypeSourcePath, {
encoding: "utf-8",
}),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = fs.readFileSync(file, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = readFileSync(packageJSONPath, "utf-8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(packageJSONPath, patchedContent);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return () => writeFileSync(packageJSONPath, content);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFileSync(new URL("./" + fixtureName, import.meta.url), {
encoding: "utf-8",
}),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFileSync(
new URL("./babel-parser-tokenizer-index.txt", import.meta.url),
{
encoding: "utf-8",
}
),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const input = readFileSync(
new URL("./babel-parser-tokenizer-index.txt", import.meta.url),
"utf-8"
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFileSync(new URL("./jquery-3.6.txt", import.meta.url), {
encoding: "utf-8",
}).repeat(length)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return readFileSync(new URL("ts-parser.txt", import.meta.url), {
encoding: "utf-8",
}).repeat(length);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return readFileSync(new URL("./jquery-3.6.txt", import.meta.url), {
encoding: "utf-8",
}).repeat(length);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const packageFile = readFileSync(packageFilePath, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFileSync(
path.join(
__dirname,
"../packages",
name.replace("@babel-baseline/", "babel-"),
"package.json"
)
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(packageFilePath, newFile, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
...(process.env.IS_PUBLISH ? testFiles : []),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.IS_PUBLISH) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const isPublishBundle = process.env.IS_PUBLISH;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
...(process.env.BABEL_COVERAGE === "true"
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(filePath, data);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
outputFileSync(dest, fs.readFileSync(src));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
mapLoc,
JSON.stringify(encodedMap(result.map as TraceMap)),
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(cliOptions.outFile, result.code);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!writeFile(maybeDefineLegacyPluginAliases(data), dataURL, filename)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const builtInDefinitions = fs.readFileSync(builtinDefinitionsURL, "utf-8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!writeFile(newData, dataURL, "plugin")) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFile(data, dataURL, "native-modules");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.CHECK_COMPAT_DATA) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const currentData = fs.readFileSync(dataPath, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(dataPath, stringified);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return fn(filepath, yield* fs.readFile(filepath, "utf8"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.BABEL_7_TO_8_DANGEROUSLY_DISABLE_VERSION_CHECK
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const version = process.env.BABEL_9_BREAKING
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const code = yield* fs.readFile(filename, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const inputMapContent = fs.readFileSync(inputMapPath, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH && depth > 0) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const options = JSON.parse(fs.readFileSync(ownOptions));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
browsers = process.env.BROWSERSLIST;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.BROWSERSLIST_CONFIG ||
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
(process.env.IS_PUBLISH ? taskOpts.SKIP_ON_PUBLISH : false);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
: (process.env.TEST_babel7plugins_babel8core &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return fs.readFileSync(filename, "utf8").trimRight();
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
() => fs.readFileSync(filename, "utf8"),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
!process.env.CI
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(expectedFile, `${outputCode}\n`);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.OVERWRITE && task.sourceMapVisual.code) throw e;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
task.sourceMapVisual.loc ?? task.taskDir + "/source-map-visual.txt",
visual + "\n",
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.OVERWRITE && task.sourceMap) throw e;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
task.sourceMapFile.loc,
JSON.stringify(result!.map, null, 2),
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.OVERWRITE) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(expectedLoc, `${actualCode}\n`);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
files[path.relative(loc, fullpath)] = readFile(fullpath);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(filePath, data);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.OVERWRITE) throw e;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.OVERWRITE) throw e;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.OVERWRITE) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const taskOpts = JSON.parse(readFileSync(optionsLoc, "utf8"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
opts[key] = readFile(loc);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
opts.inFiles[".babelrc"] = readFile(babelrcLoc);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
opts.inFiles[".babelignore"] = readFile(babelIgnoreLoc);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
new URL("../data/bmp-identifier-start.json", import.meta.url),
`"${startData.bmp}"`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
new URL("../data/bmp-identifier-continue.json", import.meta.url),
`"${contData.bmp}"`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
new URL("../data/supplementary-identifier-start.json", import.meta.url),
JSON.stringify(startData.supplementary)
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
new URL("../data/supplementary-identifier-continue.json", import.meta.url),
JSON.stringify(contData.supplementary)
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.IS_BABEL_OLD_E2E &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
let code = await fs.promises.readFile(filePath, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (onlyBabel8 && process.env.BABEL_9_BREAKING) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const REGENERATOR_RUNTIME_IN_FILE = fs.readFileSync(
import.meta.resolve("regenerator-runtime"),
"utf8"
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fs = require("fs");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fs = require("fs");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(__dirname, "..", "data", "node-flags-with-value.json"),
JSON.stringify(flags, null, 2) + "\n"
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const NODE_REPL_HISTORY = process.env.NODE_REPL_HISTORY;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const file = readFileSync(filename, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
let file = readFileSync(filename, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(filename, file);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH && node.end! > 0) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH && node.end! > 0) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.IS_PUBLISH) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(filePath, data);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFileSync(
new URL(`../../${pkgName}/package.json`, import.meta.url),
"utf-8"
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(pkgDirname, "helpers/esm/package.json"),
JSON.stringify(
{
type: "module",
},
undefined,
2
)
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(tempFolderPath, "package.json"),
`
{
"name": "babel-preset-env-smoke-test",
"private": true,
"version": "1.0.0",
"scripts": {
"build": "babel index.js --out-file index.es6"
},
"dependencies": {
"babel-cli": "${babelCliVersion}",
"babel-preset-env": "${packPath}"
}
}
`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(tempFolderPath, ".babelrc"),
`
{
"presets": [
["env", {
modules: false,
useBuiltIns: "usage"
}]
]
}
`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(tempFolderPath, "index.js"),
`
const foo = new Promise((resolve) => {
resolve(new Map());
});
`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(tempFolderPath, ".babelrc"),
`
{
"presets": [
["env", {
modules: false,
useBuiltIns: "entry"
}]
]
}
`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(tempFolderPath, "index.js"),
`
import "@babel/polyfill";
1 ** 2;
`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const isInRegisterWorker = process.env[envVarName] === envVarValue;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.BABEL_CACHE_PATH ||
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
globalDisableCache = !!process.env.BABEL_DISABLE_CACHE;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
: process.env.GITHUB_HEAD_REF
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.GITHUB_ACTIONS) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
? JSON.parse(readFileSync(optionsPath, "utf-8"))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
? JSON.parse(readFileSync(optionsPath, "utf-8"))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const testOptions = JSON.parse(readFileSync(optionsPath, "utf-8"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(optionsPath, JSON.stringify({ throws }, null, 2));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const LICENSE = readFileSync("LICENSE", "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path.join(dir, "LICENSE"), LICENSE);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path.join(dir, "LICENSE"), LICENSE);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(
joinPath(tmpDir, "package.json"),
JSON.stringify({
name: failure.name,
version: "0.0.0",
description: "Placeholder",
license: "MIT",
})
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const packageJson = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFileSync(".yarnrc.yml", "utf-8")
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
.update(fs.readFileSync(yarnPath))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
...JSON.parse(readFileSync(jsonFile, "utf-8")),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(jsonFile, JSON.stringify(options, null, 2) + "\n", "utf-8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(new URL("./lib/archived-libs.d.ts", root), output);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFileSync(path.join(packageDir, "package.json"), "utf8")
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(path.join(packageDir, ".npmignore"), ignore.join("\n") + "\n");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(readmePath, readme);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return JSON.parse(fs.readFileSync(path, "utf8"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (fs.readFileSync(url, "utf8") === contents) return;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(url, contents);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(packageJSONPath, JSON.stringify(content, undefined, 2));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
.update(readFileSync(inputPath, "utf8"))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (readFileSync(outputPath, "utf8").includes(hash)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(outputPath, output);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFileSync(resolvePath(project, "tsconfig.json"), "utf8")
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFileSync(resolvePath(project, "tsconfig.json"), "utf8")
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.TSCHECK_SILENT) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFile(noExt + ".js", "utf8"),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFile(noExt + ".tree.json", "utf8").catch(() => "{}"),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFile(noExt + ".options.json", "utf8").catch(() => "{}"),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
ignoredFeaturesJsonPath,
// editorconfig enables insert_final_newline
JSON.stringify(ignoredFeatures, undefined, 2) + "\n"
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFileSync(path).subarray(0, 2).toString("hex")
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
contents: fs.readFileSync(filename, encoding),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFileSync(
path.join(
TSTestsPath,
"baselines/reference",
TSBaselineErrorMap.get(testBasename)
),
"utf8"
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const contents = await fs.readFile(this.allowlist, "utf-8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const contents = await fs.readFile(this.allowlist, "utf-8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await fs.writeFile(this.allowlist, updated.join("") + "\n", "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const data = JSON.parse(readFileSync(path, "utf-8"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const optionsRaw = readFileSync(optionsURL, "utf-8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(
optionsURL,
optionsRaw
.replace(
/^\s*"BABEL_8_BREAKING"\s*:\s*true\s*(?:,\s*)?[\r\n]+/m,
""
)
// Remove trailing comma from the property before BABEL_8_BREAKING
.replace(/,(?=\s*\})/, ""),
"utf-8"
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(oldPackageJSONPath, JSON.stringify(pkgJSON, null, 2) + "\n");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
indexContents = fs.readFileSync(indexPath, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(indexPath, newContents);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
indexContents = fs.readFileSync(readmePath, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(readmePath, newContents);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const oldContents = fs.readFileSync(filename, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(filename, newContents);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.SKIP_BOOTSTRAP) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
exports.IS_BABEL_9 = () => bool(process.env.BABEL_9_BREAKING);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
exports.itBabel8 = bool(process.env.BABEL_9_BREAKING) ? dummy : it;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
exports.itBabel9 = bool(process.env.BABEL_9_BREAKING) ? it : dummy;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
exports.describeBabel8 = bool(process.env.BABEL_9_BREAKING)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
exports.describeBabel9 = bool(process.env.BABEL_9_BREAKING)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
packageJsonSource = fs.readFileSync(
path.join(packageFolder, "package.json"),
"utf8"
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.BABEL_CORE_DEV_DEP_VERSION) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.BABEL_CORE_DEV_DEP_VERSION
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-register
npm first-party await cacache.put(this.cacheDir, key, gzipSync(buf), {
algorithms: ["sha1"],
});
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
console.warn(
`Cache directory ${this.cacheDir} is a file, not a directory.`,
);
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
console.warn(`Failed to create cache directory ${this.cacheDir}`);
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
console.warn(
`Cache directory ${this.cacheDir} is not writable or readable.`,
);
User/PII-bearing data flows to an external sink — the classic data-exfiltration shape.
Fix: Confirm no user identifiers reach this sink; redact/hash before sending, or remove the flow.
expand_more 3 low-confidence finding(s)
const isInRegisterWorker = process.env[envVarName] === envVarValue;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.BABEL_CACHE_PATH ||
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
globalDisableCache = !!process.env.BABEL_DISABLE_CACHE;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): benchmark
npm first-partyexpand_more 12 low-confidence finding(s)
const content = readFileSync(packageJSONPath, "utf-8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(packageJSONPath, patchedContent);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return () => writeFileSync(packageJSONPath, content);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFileSync(new URL("./" + fixtureName, import.meta.url), {
encoding: "utf-8",
}),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFileSync(
new URL("./babel-parser-tokenizer-index.txt", import.meta.url),
{
encoding: "utf-8",
}
),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const input = readFileSync(
new URL("./babel-parser-tokenizer-index.txt", import.meta.url),
"utf-8"
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFileSync(new URL("./jquery-3.6.txt", import.meta.url), {
encoding: "utf-8",
}).repeat(length)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return readFileSync(new URL("ts-parser.txt", import.meta.url), {
encoding: "utf-8",
}).repeat(length);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return readFileSync(new URL("./jquery-3.6.txt", import.meta.url), {
encoding: "utf-8",
}).repeat(length);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const packageFile = readFileSync(packageFilePath, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
readFileSync(
path.join(
__dirname,
"../packages",
name.replace("@babel-baseline/", "babel-"),
"package.json"
)
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(packageFilePath, newFile, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): eslint/babel-eslint-parser
npm first-partyexpand_more 2 low-confidence finding(s)
if (process.env.IS_PUBLISH) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-cli
npm first-partyexpand_more 4 low-confidence finding(s)
fs.writeFileSync(filePath, data);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
outputFileSync(dest, fs.readFileSync(src));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
mapLoc,
JSON.stringify(encodedMap(result.map as TraceMap)),
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(cliOptions.outFile, result.code);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-compat-data
npm first-partyexpand_more 7 low-confidence finding(s)
if (!writeFile(maybeDefineLegacyPluginAliases(data), dataURL, filename)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const builtInDefinitions = fs.readFileSync(builtinDefinitionsURL, "utf-8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!writeFile(newData, dataURL, "plugin")) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFile(data, dataURL, "native-modules");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.CHECK_COMPAT_DATA) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const currentData = fs.readFileSync(dataPath, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(dataPath, stringified);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-core
npm first-partyexpand_more 9 low-confidence finding(s)
const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return fn(filepath, yield* fs.readFile(filepath, "utf8"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.BABEL_7_TO_8_DANGEROUSLY_DISABLE_VERSION_CHECK
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
export const version = process.env.BABEL_9_BREAKING
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const code = yield* fs.readFile(filename, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const inputMapContent = fs.readFileSync(inputMapPath, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH && depth > 0) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-generator
npm first-partyexpand_more 1 low-confidence finding(s)
const options = JSON.parse(fs.readFileSync(ownOptions));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-helper-compilation-targets
npm first-partyexpand_more 2 low-confidence finding(s)
browsers = process.env.BROWSERSLIST;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.BROWSERSLIST_CONFIG ||
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-helper-fixtures
npm first-partyexpand_more 3 low-confidence finding(s)
(process.env.IS_PUBLISH ? taskOpts.SKIP_ON_PUBLISH : false);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
: (process.env.TEST_babel7plugins_babel8core &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return fs.readFileSync(filename, "utf8").trimRight();
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-helper-transform-fixture-test-runner
npm first-partyexpand_more 18 low-confidence finding(s)
() => fs.readFileSync(filename, "utf8"),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
!process.env.CI
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(expectedFile, `${outputCode}\n`);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.OVERWRITE && task.sourceMapVisual.code) throw e;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
task.sourceMapVisual.loc ?? task.taskDir + "/source-map-visual.txt",
visual + "\n",
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.OVERWRITE && task.sourceMap) throw e;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
task.sourceMapFile.loc,
JSON.stringify(result!.map, null, 2),
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.OVERWRITE) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(expectedLoc, `${actualCode}\n`);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
files[path.relative(loc, fullpath)] = readFile(fullpath);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(filePath, data);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.OVERWRITE) throw e;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.OVERWRITE) throw e;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.OVERWRITE) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const taskOpts = JSON.parse(readFileSync(optionsLoc, "utf8"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
opts[key] = readFile(loc);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
opts.inFiles[".babelrc"] = readFile(babelrcLoc);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
opts.inFiles[".babelignore"] = readFile(babelIgnoreLoc);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-helper-validator-identifier
npm first-partyexpand_more 4 low-confidence finding(s)
fs.writeFileSync(
new URL("../data/bmp-identifier-start.json", import.meta.url),
`"${startData.bmp}"`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
new URL("../data/bmp-identifier-continue.json", import.meta.url),
`"${contData.bmp}"`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
new URL("../data/supplementary-identifier-start.json", import.meta.url),
JSON.stringify(startData.supplementary)
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
new URL("../data/supplementary-identifier-continue.json", import.meta.url),
JSON.stringify(contData.supplementary)
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-helpers
npm first-partyexpand_more 4 low-confidence finding(s)
process.env.IS_BABEL_OLD_E2E &&
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
let code = await fs.promises.readFile(filePath, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (onlyBabel8 && process.env.BABEL_9_BREAKING) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const REGENERATOR_RUNTIME_IN_FILE = fs.readFileSync(
import.meta.resolve("regenerator-runtime"),
"utf8"
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-node
npm first-partyexpand_more 4 low-confidence finding(s)
const fs = require("fs");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fs = require("fs");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(__dirname, "..", "data", "node-flags-with-value.json"),
JSON.stringify(flags, null, 2) + "\n"
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const NODE_REPL_HISTORY = process.env.NODE_REPL_HISTORY;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-parser
npm first-partyexpand_more 8 low-confidence finding(s)
const file = readFileSync(filename, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
let file = readFileSync(filename, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
writeFileSync(filename, file);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH && node.end! > 0) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH && node.end! > 0) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.IS_PUBLISH) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.IS_PUBLISH) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-plugin-transform-runtime
npm first-partyexpand_more 4 low-confidence finding(s)
fs.writeFileSync(filePath, data);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.readFileSync(
new URL(`../../${pkgName}/package.json`, import.meta.url),
"utf-8"
)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(pkgDirname, "helpers/esm/package.json"),
JSON.stringify(
{
type: "module",
},
undefined,
2
)
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
first-party (npm): packages/babel-preset-env
npm first-partyexpand_more 5 low-confidence finding(s)
fs.writeFileSync(
path.join(tempFolderPath, "package.json"),
`
{
"name": "babel-preset-env-smoke-test",
"private": true,
"version": "1.0.0",
"scripts": {
"build": "babel index.js --out-file index.es6"
},
"dependencies": {
"babel-cli": "${babelCliVersion}",
"babel-preset-env": "${packPath}"
}
}
`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(tempFolderPath, ".babelrc"),
`
{
"presets": [
["env", {
modules: false,
useBuiltIns: "usage"
}]
]
}
`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(tempFolderPath, "index.js"),
`
const foo = new Promise((resolve) => {
resolve(new Map());
});
`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(tempFolderPath, ".babelrc"),
`
{
"presets": [
["env", {
modules: false,
useBuiltIns: "entry"
}]
]
}
`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(
path.join(tempFolderPath, "index.js"),
`
import "@babel/polyfill";
1 ** 2;
`
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
</> Dependencies
@actions/github
npm dependencyexpand_more 23 low-confidence finding(s)
import { readFileSync, existsSync } from 'fs';
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.GITHUB_EVENT_PATH) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (existsSync(process.env.GITHUB_EVENT_PATH)) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.payload = JSON.parse(readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.payload = JSON.parse(readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const path = process.env.GITHUB_EVENT_PATH;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.eventName = process.env.GITHUB_EVENT_NAME;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.sha = process.env.GITHUB_SHA;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.ref = process.env.GITHUB_REF;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.workflow = process.env.GITHUB_WORKFLOW;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.action = process.env.GITHUB_ACTION;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.actor = process.env.GITHUB_ACTOR;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.job = process.env.GITHUB_JOB;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
(_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.GITHUB_REPOSITORY) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return process.env['GITHUB_API_URL'] || 'https://api.github.com';
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const orchId = (_a = process.env['ACTIONS_ORCHESTRATION_ID']) === null || _a === void 0 ? void 0 : _a.trim();
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
@babel/cli
npm dependencyexpand_more 4 low-confidence finding(s)
fs.writeFileSync(filePath, data);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
outputFileSync(dest, fs.readFileSync(src));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(mapLoc, JSON.stringify(encodedMap(result.map)));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(cliOptions.outFile, result.code);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
@babel/core
npm dependencyexpand_more 7 low-confidence finding(s)
return fn(filepath, yield* readFile(filepath, "utf8"));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (typeof process !== "undefined" && process.env.BABEL_7_TO_8_DANGEROUSLY_DISABLE_VERSION_CHECK) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const code = yield* readFile(filename, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const inputMapContent = fs.readFileSync(inputMapPath, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
@cspotcode/source-map-support
npm dependencyexpand_more 5 low-confidence finding(s)
(x.name||"Error")+": "+(x.message||""),E={nextPosition:null,curPosition:null},H=[],M=B.length-1;0<=M;M--)H.push("\n at "+r(B[M],E)),E.nextPosition=E.curPosition;E.curPosition=E.nextPosition=null;return F+H.reverse().join("")}function u(x){var B=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(x.stack);if(B){x=B[1];var F=+B[2];B=+B[3];var E=b[x];if(!E&&v&&v.existsSync(x))try{E=v.readFileSync(x,"utf8")}catch(H){E=""}if(E&&(E=E.split(/(?:\r\n|\r|\n)/)[F-1]))return x+":"+F+"\n"+E+"\n"+Array(B).join(" ")+
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
n=C("path");try{var v=C("fs");v.existsSync&&v.readFileSync||(v=null)}catch(x){}var z=C("buffer-from"),G=!1,D=!1,L=!1,a="auto",b={},h={},w=/^data:application\/json[^,]+base64,/,y=[],I=[],K=t(y);y.push(function(x){x=x.trim();/^file:/.test(x)&&(x=x.replace(/file:\/\/\/(\w:)?/,function(E,H){return H?"":"/"}));if(x in b)return b[x];var B="";try{if(v)v.existsSync(x)&&(B=v.readFileSync(x,"utf8"));else{var F=new XMLHttpRequest;F.open("GET",x,!1);F.send(null);4===F.readyState&&200===F.status&&(B=F.responseText)}}catch(E){}return b[x]=
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs = require('fs');
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
contents = fs.readFileSync(path, 'utf8');
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
contents = fs.readFileSync(sourceAsPath, 'utf8');
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
c8
npm dependencyexpand_more 14 low-confidence finding(s)
process.env.NODE_V8_COVERAGE = argv.tempDirectory
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
monocartArgv: (argv.experimentalMonocart || process.env.EXPERIMENTAL_MONOCART) ? argv : null
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const { readFileSync } = require('fs')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const { readFileSync } = require('fs')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const config = JSON.parse(readFileSync(path))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
default: process.env.NODE_V8_COVERAGE
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
;({ readFile } = require('fs').promises)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const { readdirSync, readFileSync, statSync } = require('fs')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const { readdirSync, readFileSync, statSync } = require('fs')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
reports.push(JSON.parse(readFileSync(
resolve(this.tempDirectory, file),
'utf8'
)))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const { readFileSync } = require('fs')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const { readFileSync } = require('fs')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fileBody = readFileSync(filename).toString()
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = readFileSync(fileURLToPath(mapURL), 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
core-js
npm dependencyexpand_more 7 low-confidence finding(s)
|| new URL('https://a@b').username !== 'a'
Data is sent to a hardcoded external endpoint; review what leaves the process.
Fix: Verify the destination and that only non-sensitive data is sent; pin and audit the dependency.
|| new URL('https://тест').host !== 'xn--e1aybc'
Data is sent to a hardcoded external endpoint; review what leaves the process.
Fix: Verify the destination and that only non-sensitive data is sent; pin and audit the dependency.
|| new URL('https://a#б').hash !== '#%D0%B1'
Data is sent to a hardcoded external endpoint; review what leaves the process.
Fix: Verify the destination and that only non-sensitive data is sent; pin and audit the dependency.
var fs = require('fs');
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var fs = require('fs');
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
banners = JSON.parse(fs.readFileSync(file));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fs.writeFileSync(file, JSON.stringify(banners), 'utf8');
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
eslint
npm dependencyexpand_more 13 low-confidence finding(s)
results.source = fs.readFileSync(filePath, "utf-8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
await writeFile(filePath, output);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const text = await fsp.readFile(filePath, {
encoding: "utf8",
signal: controller?.signal,
});
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (!process.env.ESLINT_FLAGS) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const envFlags = process.env.ESLINT_FLAGS.trim().split(/\s*,\s*/gu);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
retrier.retry(() => fs.writeFile(r.filePath, r.output)),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const enabled = !!process.env.TIMING;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (typeof process.env.TIMING !== "string") {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.TIMING.toLowerCase() === "all") {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const TIMING_ENV_VAR_AS_INTEGER = Number.parseInt(process.env.TIMING, 10);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
let content = readFileSync(sourceFile, "utf8")
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const data = await fs.promises.readFile(this.filePath, "utf8");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return fs.promises.writeFile(
this.filePath,
stringify(suppressions, { space: 2 }),
);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
eslint-config-prettier
npm dependencyexpand_more 2 low-confidence finding(s)
switch (process.env.ESLINT_USE_FLAT_CONFIG) {
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const includeDeprecated = !process.env.ESLINT_CONFIG_PRETTIER_NO_DEPRECATED;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
eslint-plugin-import
npm dependencyexpand_more 9 low-confidence finding(s)
'use strict';Object.defineProperty(exports, "__esModule", { value: true });var _createClass = function () {function defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}return function (Constructor, protoProps, staticProps) {if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;};}();var _fs = require('fs');var _fs2 = _interopRequireDefault(_fs);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
'use strict';Object.defineProperty(exports, "__esModule", { value: true });var _createClass = function () {function defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}return function (Constructor, protoProps, staticProps) {if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;};}();var _fs = require('fs');var _fs2 = _interopRequireDefault(_fs);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var content = _fs2['default'].readFileSync(path, { encoding: 'utf8' });
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
isEsModuleInterop = isEsModuleInterop;var _path = require('path');var _tsconfigLoader = require('tsconfig-paths/lib/tsconfig-loader');var _hash = require('eslint-module-utils/hash');var ts = void 0;var tsconfigCache = new Map();function readTsConfig(context) {var tsconfigInfo = (0, _tsconfigLoader.tsConfigLoader)({ cwd: context.parserOptions && context.parserOptions.tsconfigRootDir || process.cwd(), getEnv: function () {function getEnv(key) {return process.env[key];}return getEnv;}() });try {if (tsconfigInfo.tsConfigPath !== undefined) {// Projects not using TypeScript won't have `typescript` installed.
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var _fs = require('fs');var _fs2 = _interopRequireDefault(_fs);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var _fs = require('fs');var _fs2 = _interopRequireDefault(_fs);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return JSON.parse(_fs2['default'].readFileSync(jsonPath, 'utf8'));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
ESLINT_USE_FLAT_CONFIG = process.env.ESLINT_USE_FLAT_CONFIG;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var isUsingFlatConfig = ESLINT_USE_FLAT_CONFIG && process.env.ESLINT_USE_FLAT_CONFIG !== 'false';
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
eslint-plugin-jest
npm dependencyexpand_more 4 low-confidence finding(s)
var _fs = require("fs");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var _fs = require("fs");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var _fs = require("fs");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
var _fs = require("fs");
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
eslint-plugin-n
npm dependencyexpand_more 2 low-confidence finding(s)
ig.add(fs.readFileSync(filePath, "utf8"))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const text = fs.readFileSync(filePath, "utf8")
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
eslint-plugin-unicorn
npm dependencyexpand_more 1 low-confidence finding(s)
packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
execa
npm dependencyexpand_more 4 low-confidence finding(s)
writeFileSync(path, serializedResult);
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
fileUrl: ({value}) => ({contents: [bufferToUint8Array(readFileSync(value))]}),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
filePath: ({value: {file}}) => ({contents: [bufferToUint8Array(readFileSync(file))]}),
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
return {type: 'uint8Array', value: bufferToUint8Array(readFileSync(targetFdNumber)), optionName};
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
husky
npm dependencyexpand_more 9 low-confidence finding(s)
import f, { writeFileSync as w } from 'fs'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
s = f.readFileSync(n)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
w(n, JSON.stringify(o, 0, /\t/.test(s) ? '\t' : 2) + '\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
w('.husky/pre-commit', (p.env.npm_config_user_agent?.split('/')[0] ?? 'npm') + ' test\n')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
import f, { readdir, writeFileSync as w } from 'fs'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
if (process.env.HUSKY === '0') return 'HUSKY=0 skip install'
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
w(_('.gitignore'), '*')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
l.forEach(h => w(_(h), `#!/usr/bin/env sh\n. "\$(dirname "\$0")/h"`, { mode: 0o755 }))
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
w(_('husky.sh'), msg)
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
jest-light-runner
npm dependencyexpand_more 4 low-confidence finding(s)
JEST_WORKER_ID: process.env.JEST_WORKER_ID,
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.JEST_WORKER_ID = workerId || 1;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
delete process.env.JEST_WORKER_ID;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
process.env.JEST_WORKER_ID = JEST_WORKER_ID;
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
json5
npm dependencyexpand_more 5 low-confidence finding(s)
const fs = require('fs')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fs = require('fs')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fs = require('fs')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const fs = require('fs')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
const content = fs.readFileSync(filename, 'utf8')
Reads environment variables or the filesystem — an inventory-level capability, not a leak on its own.
Fix: Usually benign; confirm any secret read here is not later sent externally.
Skipped dependencies
Production
- @babel/plugin-syntax-async-do-expressions prod — scan budget exceeded
- @babel/plugin-syntax-decorators prod — scan budget exceeded
- @babel/plugin-syntax-do-expressions prod — scan budget exceeded
- @babel/plugin-syntax-export-default-from prod — scan budget exceeded
- @babel/plugin-syntax-flow prod — scan budget exceeded
- @babel/plugin-syntax-jsx prod — scan budget exceeded
- @babel/plugin-syntax-pipeline-operator prod — scan budget exceeded
- @babel/eslint-plugin prod — scan budget exceeded
- @babel/parser prod — scan budget exceeded
- @babel/plugin-proposal-decorators prod — scan budget exceeded
- @babel/plugin-proposal-do-expressions prod — scan budget exceeded
- @babel/preset-flow prod — scan budget exceeded
- @babel/preset-react prod — scan budget exceeded
- dedent prod — scan budget exceeded
- npm-babel-parser prod — scan budget exceeded
- eslint-scope prod — scan budget exceeded
- eslint-visitor-keys prod — scan budget exceeded
- @babel/helper-module-transforms prod — scan budget exceeded
- @babel/helper-plugin-utils prod — scan budget exceeded
- @babel/helper-validator-identifier prod — scan budget exceeded
- @babel/traverse prod — scan budget exceeded
- @babel/types prod — scan budget exceeded
- @babel/helper-skip-transparent-expression-wrappers prod — scan budget exceeded
- @babel/helper-annotate-as-pure prod — scan budget exceeded
- @jridgewell/gen-mapping prod — scan budget exceeded
- @jridgewell/trace-mapping prod — scan budget exceeded
- @types/jsesc prod — scan budget exceeded
- jsesc prod — scan budget exceeded
- @babel/helper-replace-supers prod — scan budget exceeded
- @babel/helper-compilation-targets prod — scan budget exceeded
- @babel/helper-globals prod — scan budget exceeded
- regexpu-core prod — scan budget exceeded
- @babel/helper-create-regexp-features-plugin prod — scan budget exceeded
- @babel/helper-member-expression-to-functions prod — scan budget exceeded
- @babel/helper-optimise-call-expression prod — scan budget exceeded
- @babel/helper-module-imports prod — scan budget exceeded
- @babel/code-frame prod — scan budget exceeded
- @babel/helper-check-duplicate-nodes prod — scan budget exceeded
- jest-diff prod — scan budget exceeded
- lru-cache prod — scan budget exceeded
- resolve prod — scan budget exceeded
- @babel/helper-validator-option prod — scan budget exceeded
- @babel/compat-data prod — scan budget exceeded
- browserslist prod — scan budget exceeded
- @babel/helper-string-parser prod — scan budget exceeded
- @babel/template prod — scan budget exceeded
- @babel/plugin-syntax-optional-chaining-assign prod — scan budget exceeded
- @babel/plugin-transform-optional-chaining prod — scan budget exceeded
- @babel/plugin-transform-react-jsx prod — scan budget exceeded
- @babel/register prod — scan budget exceeded
- commander prod — scan budget exceeded
- v8flags prod — scan budget exceeded
- @babel/plugin-transform-destructuring prod — scan budget exceeded
- @babel/plugin-bugfix-firefox-class-in-computed-class-key prod — scan budget exceeded
- @babel/plugin-bugfix-safari-class-field-initializer-scope prod — scan budget exceeded
- @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression prod — scan budget exceeded
- @babel/plugin-bugfix-safari-rest-destructuring-rhs-array prod — scan budget exceeded
- @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining prod — scan budget exceeded
- @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly prod — scan budget exceeded
- @babel/plugin-transform-async-generator-functions prod — scan budget exceeded
- @babel/plugin-transform-async-to-generator prod — scan budget exceeded
- @babel/plugin-transform-block-scoped-functions prod — scan budget exceeded
- @babel/plugin-transform-class-static-block prod — scan budget exceeded
- @babel/plugin-transform-computed-properties prod — scan budget exceeded
- @babel/plugin-transform-dotall-regex prod — scan budget exceeded
- @babel/plugin-transform-duplicate-keys prod — scan budget exceeded
- @babel/plugin-transform-duplicate-named-capturing-groups-regex prod — scan budget exceeded
- @babel/plugin-transform-explicit-resource-management prod — scan budget exceeded
- @babel/plugin-transform-exponentiation-operator prod — scan budget exceeded
- @babel/plugin-transform-function-name prod — scan budget exceeded
- @babel/plugin-transform-json-strings prod — scan budget exceeded
- @babel/plugin-transform-literals prod — scan budget exceeded
- @babel/plugin-transform-logical-assignment-operators prod — scan budget exceeded
- @babel/plugin-transform-member-expression-literals prod — scan budget exceeded
- @babel/plugin-transform-modules-amd prod — scan budget exceeded
- @babel/plugin-transform-modules-systemjs prod — scan budget exceeded
- @babel/plugin-transform-modules-umd prod — scan budget exceeded
- @babel/plugin-transform-named-capturing-groups-regex prod — scan budget exceeded
- @babel/plugin-transform-new-target prod — scan budget exceeded
- @babel/plugin-transform-numeric-separator prod — scan budget exceeded
- @babel/plugin-transform-object-super prod — scan budget exceeded
- @babel/plugin-transform-optional-catch-binding prod — scan budget exceeded
- @babel/plugin-transform-private-methods prod — scan budget exceeded
- @babel/plugin-transform-private-property-in-object prod — scan budget exceeded
- @babel/plugin-transform-property-literals prod — scan budget exceeded
- @babel/plugin-transform-regenerator prod — scan budget exceeded
- @babel/plugin-transform-regexp-modifiers prod — scan budget exceeded
- @babel/plugin-transform-reserved-words prod — scan budget exceeded
- @babel/plugin-transform-shorthand-properties prod — scan budget exceeded
- @babel/plugin-transform-spread prod — scan budget exceeded
- @babel/plugin-transform-sticky-regex prod — scan budget exceeded
- @babel/plugin-transform-template-literals prod — scan budget exceeded
- @babel/plugin-transform-typeof-symbol prod — scan budget exceeded
- @babel/plugin-transform-unicode-escapes prod — scan budget exceeded
- @babel/plugin-transform-unicode-property-regex prod — scan budget exceeded
- @babel/plugin-transform-unicode-regex prod — scan budget exceeded
- @babel/plugin-transform-unicode-sets-regex prod — scan budget exceeded
- @babel/preset-modules prod — scan budget exceeded
- core-js-compat prod — scan budget exceeded
- @babel/helper-create-class-features-plugin prod — scan budget exceeded
Development
- $repo-utils dev — registry 404
- @babel/eslint-plugin-development-internal dev — registry 404
- eslint-plugin-regexp dev — dist-only: no readable source
- glob dev — dist-only: no readable source
- lint-staged dev — scan budget exceeded
- mergeiterator dev — scan budget exceeded
- open dev — scan budget exceeded
- p-limit dev — scan budget exceeded
- pkg-pr-new dev — scan budget exceeded
- prettier dev — scan budget exceeded
- publint dev — scan budget exceeded
- rollup dev — scan budget exceeded
- rollup-plugin-dts dev — scan budget exceeded
- rollup-plugin-polyfill-node dev — scan budget exceeded
- semver dev — scan budget exceeded
- shelljs dev — scan budget exceeded
- terser dev — scan budget exceeded
- test262-stream dev — scan budget exceeded
- tstyche dev — scan budget exceeded
- typescript dev — scan budget exceeded
- typescript-eslint dev — scan budget exceeded
- @babel/helper-plugin-test-runner dev — scan budget exceeded
- @babel/helper-fixtures dev — scan budget exceeded
- @types/estree dev — scan budget exceeded
- @babel/helper-transform-fixture-test-runner dev — scan budget exceeded
- @babel/plugin-transform-block-scoping dev — scan budget exceeded
- @babel/plugin-transform-typescript dev — scan budget exceeded
- @jridgewell/sourcemap-codec dev — scan budget exceeded
- @babel/plugin-transform-arrow-functions dev — scan budget exceeded
- @babel/plugin-transform-class-properties dev — scan budget exceeded
- @unicode/unicode-17.0.0 dev — scan budget exceeded
- @babel/plugin-proposal-function-sent dev — scan budget exceeded
- @babel/plugin-transform-classes dev — scan budget exceeded
- @babel/plugin-transform-for-of dev — scan budget exceeded
- @babel/plugin-transform-parameters dev — scan budget exceeded
- babel-plugin-polyfill-regenerator dev — scan budget exceeded
- recast dev — scan budget exceeded
- uglify-js dev — scan budget exceeded
- @types/semver dev — scan budget exceeded
- @babel/plugin-proposal-record-and-tuple dev — scan budget exceeded
- @babel/generator dev — scan budget exceeded
- @babel/helpers dev — scan budget exceeded
- @babel/runtime-corejs3 dev — scan budget exceeded
- babel-plugin-polyfill-corejs3 dev — scan budget exceeded
- regenerator-runtime dev — scan budget exceeded
- @babel/plugin-external-helpers dev — scan budget exceeded
- @types/v8flags dev — scan budget exceeded
- @babel/plugin-transform-nullish-coalescing-operator dev — scan budget exceeded
- @babel/core-7.12 dev — scan budget exceeded
- array.prototype.concat dev — scan budget exceeded
- babel-plugin-polyfill-es-shims dev — scan budget exceeded
- object.getownpropertydescriptors dev — scan budget exceeded