codigo0/node_modules/tsx/dist/cli.cjs

55 lines
118 KiB
JavaScript
Raw Normal View History

"use strict";var bn=Object.defineProperty;var a=(t,e)=>bn(t,"name",{value:e,configurable:!0});var ct=require("node:os"),vn=require("tty"),Sn=require("esbuild"),Bn=require("./package-Dxt5kIHw.cjs"),he=require("./get-pipe-path-BoR10qr8.cjs"),_u=require("node:url"),$n=require("child_process"),z=require("path"),oe=require("fs"),ke=require("./node-features-roYmp9jK.cjs"),Tn=require("node:path"),xn=require("events"),_e=require("util"),On=require("stream"),Au=require("os"),ue=require("./index-BWFBUo6r.cjs"),Nn=require("node:net"),ft=require("node:fs"),Hn=require("./temporary-directory-B83uKxJF.cjs");require("module");const Pn="known-flag",Ln="unknown-flag",In="argument",{stringify:Ae}=JSON,kn=/\B([A-Z])/g,Mn=a(t=>t.replace(kn,"-$1").toLowerCase(),"v$1"),{hasOwnProperty:Gn}=Object.prototype,ye=a((t,e)=>Gn.call(t,e),"w$2"),Wn=a(t=>Array.isArray(t),"L$2"),yu=a(t=>typeof t=="function"?[t,!1]:Wn(t)?[t[0],!0]:yu(t.type),"b$2"),jn=a((t,e)=>t===Boolean?e!=="false":e,"d$2"),Un=a((t,e)=>typeof e=="boolean"?e:t===Number&&e===""?Number.NaN:t(e),"m$1"),Kn=/[\s.:=]/,Vn=a(t=>{const e=`Flag name ${Ae(t)}`;if(t.length===0)throw new Error(`${e} cannot be empty`);if(t.length===1)throw new Error(`${e} must be longer than a character`);const u=t.match(Kn);if(u)throw new Error(`${e} cannot contain ${Ae(u?.[0])}`)},"B"),zn=a(t=>{const e={},u=a((r,n)=>{if(ye(e,r))throw new Error(`Duplicate flags named ${Ae(r)}`);e[r]=n},"r");for(const r in t){if(!ye(t,r))continue;Vn(r);const n=t[r],s=[[],...yu(n),n];u(r,s);const i=Mn(r);if(r!==i&&u(i,s),"alias"in n&&typeof n.alias=="string"){const{alias:D}=n,o=`Flag alias ${Ae(D)} for flag ${Ae(r)}`;if(D.length===0)throw new Error(`${o} cannot be empty`);if(D.length>1)throw new Error(`${o} must be a single character`);u(D,s)}}return e},"K$1"),Yn=a((t,e)=>{const u={};for(const r in t){if(!ye(t,r))continue;const[n,,s,i]=e[r];if(n.length===0&&"default"in i){let{default:D}=i;typeof D=="function"&&(D=D()),u[r]=D}else u[r]=s?n:n.pop()}return u},"_$2"),Me="--",qn=/[.:=]/,Xn=/^-{1,2}\w/,Qn=a(t=>{if(!Xn.test(t))return;const e=!t.startsWith(Me);let u=t.slice(e?1:2),r;const n=u.match(qn);if(n){const{index:s}=n;r=u.slice(s+1),u=u.slice(0,s)}return[u,r,e]},"N"),Zn=a((t,{onFlag:e,onArgument:u})=>{let r;const n=a((s,i)=>{if(typeof r!="function")return!0;r(s,i),r=void 0},"o");for(let s=0;s<t.length;s+=1){const i=t[s];if(i===Me){n();const o=t.slice(s+1);u?.(o,[s],!0);break}const D=Qn(i);if(D){if(n(),!e)continue;const[o,c,f]=D;if(f)for(let h=0;h<o.length;h+=1){n();const l=h===o.length-1;r=e(o[h],l?c:void 0,[s,h+1,l])}else r=e(o,c,[s])}else n(i,[s])&&u?.([i],[s])}n()},"$$1"),Jn=a((t,e)=>{for(const[u,r,n]of e.reverse()){if(r){const s=t[u];let i=s.slice(0,r);if(n||(i+=s.slice(r+1)),i!=="-"){t[u]=i;continue}}t.splice(u,1)}},"E"),wu=a((t,e=process.argv.slice(2),{ignore:u}={})=>{const r=[],n=zn(t),s={},i=[];return i[Me]=[],Zn(e,{onFlag(D,o,c){const f=ye(n,D);if(!u?.(f?Pn:Ln,D,o)){if(f){const[h,l]=n[D],p=jn(l,o),C=a((g,y)=>{r.push(c),y&&r.push(y),h.push(Un(l,g||""))},"p");return p===void 0?C:C(p)}ye(s,D)||(s[D]=[]),s[D].push(o===void 0?!0:o),r.push(c)}},onArgument(D,o,c){u?.(In,e[o[0]])||(i.push(...D),c?(i[Me]=D,e.splice(o[0])):r.push(o))}}),Jn(e,r),{flags:Yn(t,n),unknownFlags:s,_:i}},"U$2");var es=Object.create,Ge=Object.defineProperty,ts=Object.defineProperties,us=Object.getOwnPropertyDescriptor,rs=Object.getOwnPropertyDescriptors,ns=Object.getOwnPropertyNames,Ru=Object.getOwnPropertySymbols,ss=Object.getPrototypeOf,bu=Object.prototype.hasOwnProperty,is=Object.prototype.propertyIsEnumerable,vu=a((t,e,u)=>e in t?Ge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,"W$1"),We=a((t,e)=>{for(var u in e||(e={}))bu.call(e,u)&&vu(t,u,e[u]);if(Ru)for(var u of Ru(e))is.call(e,u)&&vu(t,u,e[u]);return t},"p"),ht=a((t,e)=>ts(t,rs(e)),"c"),Ds=a(t=>Ge(t,"__esModule",{value:!0}),"nD"),os=a((t,e)=>()=>(t&&(e=t(t=0)),e),"rD"),as=a((t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),"iD"),ls=a((t,e,u,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ns(e))!bu.call(t,n)&&n!=="default"&&Ge(t,n,{get:a(()=>e[n],"get"),enumerable:
`).map(ae)),"b$1"),Cs=a(t=>{let e=[];for(let u of t){let{length:r}=u,n=r-e.length;for(let s=0;s<n;s+=1)e.push(0);for(let s=0;s<r;s+=1){let i=Bu(u[s]);i>e[s]&&(e[s]=i)}}return e},"k$1");K();var $u=/^\d+%$/,Tu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Fs=a((t,e)=>{var u;let r=[];for(let n=0;n<t.length;n+=1){let s=(u=e[n])!=null?u:"auto";if(typeof s=="number"||s==="auto"||s==="content-width"||typeof s=="string"&&$u.test(s)){r.push(ht(We({},Tu),{width:s,contentWidth:t[n]}));continue}if(s&&typeof s=="object"){let i=ht(We(We({},Tu),s),{contentWidth:t[n]});i.horizontalPadding=i.paddingLeft+i.paddingRight,r.push(i);continue}throw new Error(`Invalid column width: ${JSON.stringify(s)}`)}return r},"sD");function gs(t,e){for(let u of t){let{width:r}=u;if(r==="content-width"&&(u.width=u.contentWidth),r==="auto"){let o=Math.min(20,u.contentWidth);u.width=o,u.autoOverflow=u.contentWidth-o}if(typeof r=="string"&&$u.test(r)){let o=Number.parseFloat(r.slice(0,-1))/100;u.width=Math.floor(e*o)-(u.paddingLeft+u.paddingRight)}let{horizontalPadding:n}=u,s=1,i=s+n;if(i>=e){let o=i-e,c=Math.ceil(u.paddingLeft/n*o),f=o-c;u.paddingLeft-=c,u.paddingRight-=f,u.horizontalPadding=u.paddingLeft+u.paddingRight}u.paddingLeftString=u.paddingLeft?" ".repeat(u.paddingLeft):"",u.paddingRightString=u.paddingRight?" ".repeat(u.paddingRight):"";let D=e-u.horizontalPadding;u.width=Math.max(Math.min(u.width,D),s)}}a(gs,"aD");var xu=a(()=>Object.assign([],{columns:0}),"G$1");function ms(t,e){let u=[xu()],[r]=u;for(let n of t){let s=n.width+n.horizontalPadding;r.columns+s>e&&(r=xu(),u.push(r)),r.push(n),r.columns+=s}for(let n of u){let s=n.reduce((l,p)=>l+p.width+p.horizontalPadding,0),i=e-s;if(i===0)continue;let D=n.filter(l=>"autoOverflow"in l),o=D.filter(l=>l.autoOverflow>0),c=o.reduce((l,p)=>l+p.autoOverflow,0),f=Math.min(c,i);for(let l of o){let p=Math.floor(l.autoOverflow/c*f);l.width+=p,i-=p}let h=Math.floor(i/D.length);for(let l=0;l<D.length;l+=1){let p=D[l];l===D.length-1?p.width+=i:p.width+=h,i-=h}}return u}a(ms,"lD");function _s(t,e,u){let r=Fs(u,e);return gs(r,t),ms(r,t)}a(_s,"Z$1"),K(),K(),K();var dt=10,Ou=a((t=0)=>e=>`\x1B[${e+t}m`,"U$1"),Nu=a((t=0)=>e=>`\x1B[${38+t};5;${e}m`,"V$1"),Hu=a((t=0)=>(e,u,r)=>`\x1B[${38+t};2;${e};${u};${r}m`,"Y");function As(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[u,r]of Object.entries(e)){for(let[n,s]of Object.entries(r))e[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[n]=e[n],t.set(s[0],s[1]);Object.defineProperty(e,u,{value:r,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Ou(),e.color.ansi256=Nu(),e.color.ansi16m=Hu(),e.bgColor.ansi=Ou(dt),e.bgColor.ansi256=Nu(dt),e.bgColor.ansi16m=Hu(dt),Object.defineProperties(e,{rgbToAnsi256:{value:a((u,r,n)=>u===r&&r===n?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),"value"),enumerable:!1},hexToRgb:{value:a(u=>{let r=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));if(!r)return[0,0,0];let{colorString:n}=r.groups;n.length===
`)];for(let[c,f]of o.entries()){if(r+=f,je.has(f)){let{groups:l}=new RegExp(`(?:\\${Pu}(?<code>\\d+)m|\\${pt}(?<uri>.*)${Et})`).exec(o.slice(c).join(""))||{groups:{}};if(l.code!==void 0){let p=Number.parseFloat(l.code);n=p===Rs?void 0:p}else l.uri!==void 0&&(s=l.uri.length===0?void 0:l.uri)}let h=ws.codes.get(Number(n));o[c+1]===`
`?(s&&(r+=ku("")),n&&h&&(r+=Iu(h))):f===`
`&&(n&&h&&(r+=Iu(n)),s&&(r+=ku(s)))}return r},"dD");function $s(t,e,u){return String(t).normalize().replace(/\r\n/g,`
`).split(`
`).map(r=>Bs(r,e,u)).join(`
`)}a($s,"T$1");var Mu=a(t=>Array.from({length:t}).fill(""),"X");function Ts(t,e){let u=[],r=0;for(let n of t){let s=0,i=n.map(o=>{var c;let f=(c=e[r])!=null?c:"";r+=1,o.preprocess&&(f=o.preprocess(f)),Bu(f)>o.width&&(f=$s(f,o.width,{hard:!0}));let h=f.split(`
`);if(o.postprocess){let{postprocess:l}=o;h=h.map((p,C)=>l.call(o,p,C))}return o.paddingTop&&h.unshift(...Mu(o.paddingTop)),o.paddingBottom&&h.push(...Mu(o.paddingBottom)),h.length>s&&(s=h.length),ht(We({},o),{lines:h})}),D=[];for(let o=0;o<s;o+=1){let c=i.map(f=>{var h;let l=(h=f.lines[o])!=null?h:"",p=Number.isFinite(f.width)?" ".repeat(f.width-ae(l)):"",C=f.paddingLeftString;return f.align==="right"&&(C+=p),C+=l,f.align==="left"&&(C+=p),C+f.paddingRightString}).join("");D.push(c)}u.push(D.join(`
`))}return u.join(`
`)}a(Ts,"P");function xs(t,e){if(!t||t.length===0)return"";let u=Cs(t),r=u.length;if(r===0)return"";let{stdoutColumns:n,columns:s}=hs(e);if(s.length>r)throw new Error(`${s.length} columns defined, but only ${r} columns found`);let i=_s(n,s,u);return t.map(D=>Ts(i,D)).join(`
`)}a(xs,"mD"),K();var Os=["<",">","=",">=","<="];function Ns(t){if(!Os.includes(t))throw new TypeError(`Invalid breakpoint operator: ${t}`)}a(Ns,"xD");function Hs(t){let e=Object.keys(t).map(u=>{let[r,n]=u.split(" ");Ns(r);let s=Number.parseInt(n,10);if(Number.isNaN(s))throw new TypeError(`Invalid breakpoint value: ${n}`);let i=t[u];return{operator:r,breakpoint:s,value:i}}).sort((u,r)=>r.breakpoint-u.breakpoint);return u=>{var r;return(r=e.find(({operator:n,breakpoint:s})=>n==="="&&u===s||n===">"&&u>s||n==="<"&&u<s||n===">="&&u>=s||n==="<="&&u<=s))==null?void 0:r.value}}a(Hs,"wD");const Ps=a(t=>t.replace(/[\W_]([a-z\d])?/gi,(e,u)=>u?u.toUpperCase():""),"S"),Ls=a(t=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q"),Is={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:a(t=>t.trim(),"preprocess")},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function ks(t){let e=!1;return{type:"table",data:{tableData:Object.keys(t).sort((u,r)=>u.localeCompare(r)).map(u=>{const r=t[u],n="alias"in r;return n&&(e=!0),{name:u,flag:r,flagFormatted:`--${Ls(u)}`,aliasesEnabled:e,aliasFormatted:n?`-${r.alias}`:void 0}}).map(u=>(u.aliasesEnabled=e,[{type:"flagName",data:u},{type:"flagDescription",data:u}])),tableBreakpoints:Is}}}a(ks,"D");const Gu=a(t=>!t||(t.version??(t.help?t.help.version:void 0)),"A"),Wu=a(t=>{const e="parent"in t&&t.parent?.name;return(e?`${e} `:"")+t.name},"C");function Ms(t){const e=[];t.name&&e.push(Wu(t));const u=Gu(t)??("parent"in t&&Gu(t.parent));if(u&&e.push(`v${u}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
`}}a(Ms,"R");function Gs(t){const{help:e}=t;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
`}}a(Gs,"L");function Ws(t){const e=t.help||{};if("usage"in e)return e.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(e.usage)?e.usage.join(`
`):e.usage}}:void 0;if(t.name){const u=[],r=[Wu(t)];if(t.flags&&Object.keys(t.flags).length>0&&r.push("[flags...]"),t.parameters&&t.parameters.length>0){const{parameters:n}=t,s=n.indexOf("--"),i=s>-1&&n.slice(s+1).some(D=>D.startsWith("<"));r.push(n.map(D=>D!=="--"?D:i?"--":"[--]").join(" "))}if(r.length>1&&u.push(r.join(" ")),"commands"in t&&t.commands?.length&&u.push(`${t.name} <command>`),u.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:u.join(`
`)}}}}a(Ws,"T");function js(t){return!("commands"in t)||!t.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:t.commands.map(e=>[e.options.name,e.options.help?e.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}a(js,"_");function Us(t){if(!(!t.flags||Object.keys(t.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:ks(t.flags),indentBody:0}}}a(Us,"k");function Ks(t){const{help:e}=t;if(!e||!e.examples||e.examples.length===0)return;let{examples:u}=e;if(Array.isArray(u)&&(u=u.join(`
`)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}a(Ks,"F");function Vs(t){if(!("alias"in t)||!t.alias)return;const{alias:e}=t;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(e)?e.join(", "):e}}}a(Vs,"H");const zs=a(t=>[Ms,Gs,Ws,js,Us,Ks,Vs].map(e=>e(t)).filter(Boolean),"U"),Ys=vn.WriteStream.prototype.hasColors();class qs{static{a(this,"M")}text(e){return e}bold(e){return Ys?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:u}){return e.replace(/^/gm," ".repeat(u))}heading(e){return this.bold(e)}section({title:e,body:u,indentBody:r=2}){return`${(e?`${this.heading(e)}
`:"")+(u?this.indentText({text:this.render(u),spaces:r}):"")}
`}table({tableData:e,tableOptions:u,tableBreakpoints:r}){return xs(e.map(n=>n.map(s=>this.render(s))),r?Hs(r):u)}flagParameter(e){return e===Boolean?"":e===String?"<string>":e===Number?"<number>":Array.isArray(e)?this.flagParameter(e[0]):"<value>"}flagOperator(e){return" "}flagName(e){const{flag:u,flagFormatted:r,aliasesEnabled:n,aliasFormatted:s}=e;let i="";if(s?i+=`${s}, `:n&&(i+=" "),i+=r,"placeholder"in u&&typeof u.placeholder=="string")i+=`${this.flagOperator(e)}${u.placeholder}`;else{const D=this.flagParameter("type"in u?u.type:u);D&&(i+=`${this.flagOperator(e)}${D}`)}return i}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){let u="description"in e?e.description??"":"";if("default"in e){let{default:r}=e;typeof r=="function"&&(r=r()),r&&(u+=` (default: ${this.flagDefault(r)})`)}return u}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(u=>this.render(u)).join(`
`);if("type"in e&&this[e.type]){const u=this[e.type];if(typeof u=="function")return u.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}}const Ft=/^[\w.-]+$/,{stringify:ee}=JSON,Xs=/[|\\{}()[\]^$+*?.]/;function gt(t){const e=[];let u,r;for(const n of t){if(r)throw new Error(`Invalid parameter: Spread parameter ${ee(r)} must be last`);const s=n[0],i=n[n.length-1];let D;if(s==="<"&&i===">"&&(D=!0,u))throw new Error(`Invalid parameter: Required parameter ${ee(n)} cannot come after optional parameter ${ee(u)}`);if(s==="["&&i==="]"&&(D=!1,u=n),D===void 0)throw new Error(`Invalid parameter: ${ee(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let o=n.slice(1,-1);const c=o.slice(-3)==="...";c&&(r=n,o=o.slice(0,-3));const f=o.match(Xs);if(f)throw new Error(`Invalid parameter: ${ee(n)}. Invalid character found ${ee(f[0])}`);e.push({name:o,required:D,spread:c})}return e}a(gt,"w");function mt(t,e,u,r){for(let n=0;n<e.length;n+=1){const{name:s,required:i,spread:D}=e[n],o=Ps(s);if(o in t)throw new Error(`Invalid parameter: ${ee(s)} is used more than once.`);const c=D?u.slice(n):u[n];if(D&&(n=e.length),i&&(!c||D&&c.length===0))return console.error(`Error: Missing required parameter ${ee(s)}
`),r(),process.exit(1);t[o]=c}}a(mt,"b");function Qs(t){return t===void 0||t!==!1}a(Qs,"W");function ju(t,e,u,r){const n={...e.flags},s=e.version;s&&(n.version={type:Boolean,description:"Show version"});const{help:i}=e,D=Qs(i);D&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const o=wu(n,r,{ignore:e.ignoreArgv}),c=a(()=>{console.log(e.version)},"f");if(s&&o.flags.version===!0)return c(),process.exit(0);const f=new qs,h=D&&i?.render?i.render:C=>f.render(C),l=a(C=>{const g=zs({...e,...C?{help:C}:{},flags:n});console.log(h(g,f))},"u");if(D&&o.flags.help===!0)return l(),process.exit(0);if(e.parameters){let{parameters:C}=e,g=o._;const y=C.indexOf("--"),B=C.slice(y+1),H=Object.create(null);if(y>-1&&B.length>0){C=C.slice(0,y);const $=o._["--"];g=g.slice(0,-$.length||void 0),mt(H,gt(C),g,l),mt(H,gt(B),$,l)}else mt(H,gt(C),g,l);Object.assign(o._,H)}const p={...o,showVersion:c,showHelp:l};return typeof u=="function"&&u(p),{command:t,...p}}a(ju,"x");function Zs(t,e){const u=new Map;for(const r of e){const n=[r.options.name],{alias:s}=r.options;s&&(Array.isArray(s)?n.push(...s):n.push(s));for(const i of n){if(u.has(i))throw new Error(`Duplicate command name found: ${ee(i)}`);u.set(i,r)}}return u.get(t)}a(Zs,"z");function Uu(t,e,u=process.argv.slice(2)){if(!t)throw new Error("Options is required");if("name"in t&&(!t.name||!Ft.test(t.name)))throw new Error(`Invalid script name: ${ee(t.name)}`);const r=u[0];if(t.commands&&Ft.test(r)){const n=Zs(r,t.commands);if(n)return ju(n.options.name,{...n.options,parent:t},n.callback,u.slice(1))}return ju(void 0,t,e,u)}a(Uu,"Z");function Js(t,e){if(!t)throw new Error("Command options are required");const{name:u}=t;if(t.name===void 0)throw new Error("Command name is required");if(!Ft.test(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:t,callback:e}}a(Js,"G");var ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ti(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}a(ti,"getDefaultExportFromCjs");var de={exports:{}},_t,Ku;function ui(){if(Ku)return _t;Ku=1,_t=r,r.sync=n;var t=oe;function e(s,i){var D=i.pathExt!==void 0?i.pathExt:process.env.PATHEXT;if(!D||(D=D.split(";"),D.indexOf("")!==-1))return!0;for(var o=0;o<D.length;o++){var c=D[o].toLowerCase();if(c&&s.substr(-c.length).toLowerCase()===c)return!0}return!1}a(e,"checkPathExt");function u(s,i,D){return!s.isSymbolicLink()&&!s.isFile()?!1:e(i,D)}a(u,"checkStat");function r(s,i,D){t.stat(s,function(o,c){D(o,o?!1:u(c,s,i))})}a(r,"isexe");function n(s,i){return u(t.statSync(s),s,i)}return a(n,"sync"),_t}a(ui,"requireWindows");var At,Vu;function ri(){if(Vu)return At;Vu=1,At=e,e.sync=u;var t=oe;function e(s,i,D){t.stat(s,function(o,c){D(o,o?!1:r(c,i))})}a(e,"isexe");function u(s,i){return r(t.statSync(s),i)}a(u,"sync");function r(s,i){return s.isFile()&&n(s,i)}a(r,"checkStat");function n(s,i){var D=s.mode,o=s.uid,c=s.gid,f=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),h=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),l=parseInt("100",8),p=parseInt("010",8),C=parseInt("001",8),g=l|p,y=D&C||D&p&&c===h||D&l&&o===f||D&g&&f===0;return y}return a(n,"checkMode"),At}a(ri,"requireMode");var Ue;process.platform==="win32"||ei.TESTING_WINDOWS?Ue=ui():Ue=ri();var ni=yt;yt.sync=si;function yt(t,e,u){if(typeof e=="function"&&(u=e,e={}),!u){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,n){yt(t,e||{},function(s,i){s?n(s):r(i)})})}Ue(t,e||{},function(r,n){r&&(r.code==="EACCES"||e&&e.ignoreErrors)&&(r=null,n=!1),u(r,n)})}a(yt,"isexe$1");function si(t,e){try{return Ue.sync(t,e||{})}catch(u){if(e&&e.ignoreErrors||u.code==="EACCES")return!1;throw u}}a(si,"sync");const Ee=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",zu=z,ii=Ee?";":":",Yu=ni,qu=a(t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),"getNotFoundError"),Xu=a((t,e)=>{const u=e.colon||ii,r=t.ma
* normalize-path <https://github.com/jonschlinkert/normalize-path>
*
* Copyright (c) 2014-2018, Jon Schlinkert.
* Released under the MIT License.
*/var Rr=a(function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var u=t.length;if(u<=1)return t;var r="";if(u>4&&t[3]==="\\"){var n=t[2];(n==="?"||n===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),r="//")}var s=t.split(/[/\\]+/);return e!==!1&&s[s.length-1]===""&&s.pop(),r+s.join("/")},"normalizePath$2"),wD=Ut.exports;Object.defineProperty(wD,"__esModule",{value:!0});const br=Fr,RD=Rr,vr="!",bD={returnIndex:!1},vD=a(t=>Array.isArray(t)?t:[t],"arrify$1"),SD=a((t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){const u=br(t,e);return r=>t===r||u(r)}return t instanceof RegExp?u=>t.test(u):u=>!1},"createPattern"),Sr=a((t,e,u,r)=>{const n=Array.isArray(u),s=n?u[0]:u;if(!n&&typeof s!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(s));const i=RD(s,!1);for(let o=0;o<e.length;o++){const c=e[o];if(c(i))return r?-1:!1}const D=n&&[i].concat(u.slice(1));for(let o=0;o<t.length;o++){const c=t[o];if(n?c(...D):c(i))return r?o:!0}return r?-1:!1},"matchPatterns"),Kt=a((t,e,u=bD)=>{if(t==null)throw new TypeError("anymatch: specify first argument");const r=typeof u=="boolean"?{returnIndex:u}:u,n=r.returnIndex||!1,s=vD(t),i=s.filter(o=>typeof o=="string"&&o.charAt(0)===vr).map(o=>o.slice(1)).map(o=>br(o,r)),D=s.filter(o=>typeof o!="string"||typeof o=="string"&&o.charAt(0)!==vr).map(o=>SD(o,r));return e==null?(o,c=!1)=>Sr(D,i,o,typeof c=="boolean"?c:!1):Sr(D,i,e,n)},"anymatch$1");Kt.default=Kt,Ut.exports=Kt;var BD=Ut.exports;/*!
* is-extglob <https://github.com/jonschlinkert/is-extglob>
*
* Copyright (c) 2014-2016, Jon Schlinkert.
* Licensed under the MIT License.
*/var $D=a(function(e){if(typeof e!="string"||e==="")return!1;for(var u;u=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(u[2])return!0;e=e.slice(u.index+u[0].length)}return!1},"isExtglob");/*!
* is-glob <https://github.com/jonschlinkert/is-glob>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/var TD=$D,Br={"{":"}","(":")","[":"]"},xD=a(function(t){if(t[0]==="!")return!0;for(var e=0,u=-2,r=-2,n=-2,s=-2,i=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||r!==-1&&t[e]==="["&&t[e+1]!=="]"&&(r<e&&(r=t.indexOf("]",e)),r>e&&(i===-1||i>r||(i=t.indexOf("\\",e),i===-1||i>r)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(i=t.indexOf("\\",e),i===-1||i>n))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(i=t.indexOf("\\",e),i===-1||i>s))||u!==-1&&t[e]==="("&&t[e+1]!=="|"&&(u<e&&(u=t.indexOf("|",e)),u!==-1&&t[u+1]!==")"&&(s=t.indexOf(")",u),s>u&&(i=t.indexOf("\\",u),i===-1||i>s))))return!0;if(t[e]==="\\"){var D=t[e+1];e+=2;var o=Br[D];if(o){var c=t.indexOf(o,e);c!==-1&&(e=c+1)}if(t[e]==="!")return!0}else e++}return!1},"strictCheck"),OD=a(function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var u=t[e+1];e+=2;var r=Br[u];if(r){var n=t.indexOf(r,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1},"relaxedCheck"),$r=a(function(e,u){if(typeof e!="string"||e==="")return!1;if(TD(e))return!0;var r=xD;return u&&u.strict===!1&&(r=OD),r(e)},"isGlob"),ND=$r,HD=z.posix.dirname,PD=Au.platform()==="win32",Vt="/",LD=/\\/g,ID=/[\{\[].*[\}\]]$/,kD=/(^|[^\\])([\{\[]|\([^\)]+$)/,MD=/\\([\!\*\?\|\[\]\(\)\{\}])/g,GD=a(function(e,u){var r=Object.assign({flipBackslashes:!0},u);r.flipBackslashes&&PD&&e.indexOf(Vt)<0&&(e=e.replace(LD,Vt)),ID.test(e)&&(e+=Vt),e+="a";do e=HD(e);while(ND(e)||kD.test(e));return e.replace(MD,"$1")},"globParent"),Je={};(function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,u)=>e.nodes.find(r=>r.type===u),t.exceedsLimit=(e,u,r=1,n)=>n===!1||!t.isInteger(e)||!t.isInteger(u)?!1:(Number(u)-Number(e))/Number(r)>=n,t.escapeNode=(e,u=0,r)=>{let n=e.nodes[u];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0),t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((u,r)=>(r.type==="text"&&u.push(r.value),r.type==="range"&&(r.type="text"),u),[]),t.flatten=(...e)=>{const u=[],r=a(n=>{for(let s=0;s<n.length;s++){let i=n[s];Array.isArray(i)?r(i):i!==void 0&&u.push(i)}return u},"flat");return r(e),u}})(Je);const Tr=Je;var zt=a((t,e={})=>{let u=a((r,n={})=>{let s=e.escapeInvalid&&Tr.isInvalidBrace(n),i=r.invalid===!0&&e.escapeInvalid===!0,D="";if(r.value)return(s||i)&&Tr.isOpenOrClose(r)?"\\"+r.value:r.value;if(r.value)return r.value;if(r.nodes)for(let o of r.nodes)D+=u(o);return D},"stringify");return u(t)},"stringify$4");/*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*/var WD=a(function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1},"isNumber$2");/*!
* to-regex-range <https://github.com/micromatch/to-regex-range>
*
* Copyright (c) 2015-present, Jon Schlinkert.
* Released under the MIT License.
*/const xr=WD,le=a((t,e,u)=>{if(xr(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(xr(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let r={relaxZeros:!0,...u};typeof r.strictZeros=="boolean"&&(r.relaxZeros=r.strictZeros===!1);let n=String(r.relaxZeros),s=String(r.shorthand),i=String(r.capture),D=String(r.wrap),o=t+":"+e+"="+n+s+i+D;if(le.cache.hasOwnProperty(o))return le.cache[o].result;let c=Math.min(t,e),f=Math.max(t,e);if(Math.abs(c-f)===1){let g=t+"|"+e;return r.capture?`(${g})`:r.wrap===!1?g:`(?:${g})`}let h=Ir(t)||Ir(e),l={min:t,max:e,a:c,b:f},p=[],C=[];if(h&&(l.isPadded=h,l.maxLen=String(l.max).length),c<0){let g=f<0?Math.abs(f):1;C=Or(g,Math.abs(c),l,r),c=l.a=0}return f>=0&&(p=Or(c,f,l,r)),l.negatives=C,l.positives=p,l.result=jD(C,p),r.capture===!0?l.result=`(${l.result})`:r.wrap!==!1&&p.length+C.length>1&&(l.result=`(?:${l.result})`),le.cache[o]=l,l.result},"toRegexRange$1");function jD(t,e,u){let r=Yt(t,e,"-",!1)||[],n=Yt(e,t,"",!1)||[],s=Yt(t,e,"-?",!0)||[];return r.concat(s).concat(n).join("|")}a(jD,"collatePatterns");function UD(t,e){let u=1,r=1,n=Hr(t,u),s=new Set([e]);for(;t<=n&&n<=e;)s.add(n),u+=1,n=Hr(t,u);for(n=Pr(e+1,r)-1;t<n&&n<=e;)s.add(n),r+=1,n=Pr(e+1,r)-1;return s=[...s],s.sort(zD),s}a(UD,"splitToRanges");function KD(t,e,u){if(t===e)return{pattern:t,count:[],digits:0};let r=VD(t,e),n=r.length,s="",i=0;for(let D=0;D<n;D++){let[o,c]=r[D];o===c?s+=o:o!=="0"||c!=="9"?s+=YD(o,c):i++}return i&&(s+=u.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[i],digits:n}}a(KD,"rangeToPattern");function Or(t,e,u,r){let n=UD(t,e),s=[],i=t,D;for(let o=0;o<n.length;o++){let c=n[o],f=KD(String(i),String(c),r),h="";if(!u.isPadded&&D&&D.pattern===f.pattern){D.count.length>1&&D.count.pop(),D.count.push(f.count[0]),D.string=D.pattern+Lr(D.count),i=c+1;continue}u.isPadded&&(h=qD(c,u,r)),f.string=h+f.pattern+Lr(f.count),s.push(f),i=c+1,D=f}return s}a(Or,"splitToPatterns");function Yt(t,e,u,r,n){let s=[];for(let i of t){let{string:D}=i;!r&&!Nr(e,"string",D)&&s.push(u+D),r&&Nr(e,"string",D)&&s.push(u+D)}return s}a(Yt,"filterPatterns");function VD(t,e){let u=[];for(let r=0;r<t.length;r++)u.push([t[r],e[r]]);return u}a(VD,"zip");function zD(t,e){return t>e?1:e>t?-1:0}a(zD,"compare");function Nr(t,e,u){return t.some(r=>r[e]===u)}a(Nr,"contains");function Hr(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}a(Hr,"countNines");function Pr(t,e){return t-t%Math.pow(10,e)}a(Pr,"countZeros");function Lr(t){let[e=0,u=""]=t;return u||e>1?`{${e+(u?","+u:"")}}`:""}a(Lr,"toQuantifier");function YD(t,e,u){return`[${t}${e-t===1?"":"-"}${e}]`}a(YD,"toCharacterClass");function Ir(t){return/^-?(0+)\d/.test(t)}a(Ir,"hasPadding");function qD(t,e,u){if(!e.isPadded)return t;let r=Math.abs(e.maxLen-String(t).length),n=u.relaxZeros!==!1;switch(r){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${r}}`:`0{${r}}`}}a(qD,"padZeros"),le.cache={},le.clearCache=()=>le.cache={};var XD=le;/*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Licensed under the MIT License.
*/const QD=_e,kr=XD,Mr=a(t=>t!==null&&typeof t=="object"&&!Array.isArray(t),"isObject"),ZD=a(t=>e=>t===!0?Number(e):String(e),"transform"),qt=a(t=>typeof t=="number"||typeof t=="string"&&t!=="","isValidValue"),ve=a(t=>Number.isInteger(+t),"isNumber"),Xt=a(t=>{let e=`${t}`,u=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++u]==="0";);return u>0},"zeros"),JD=a((t,e,u)=>typeof t=="string"||typeof e=="string"?!0:u.stringify===!0,"stringify$3"),eo=a((t,e,u)=>{if(e>0){let r=t[0]==="-"?"-":"";r&&(t=t.slice(1)),t=r+t.padStart(r?e-1:e,"0")}return u===!1?String(t):t},"pad"),Gr=a((t,e)=>{let u=t[0]==="-"?"-":"";for(u&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return u?"-"+t:t},"toMaxLen"),to=a((t,e)=>{t.negatives.sort((i,D)=>i<D?-1:i>D?1:0),t.positives.sort((i,D)=>i<D?-1:i>D?1:0);let u=e.capture?"":"?:",r="",n="",s;return t.positives.length&&(r=t.positives.join("|")),t.negatives.length&&(n=`-(${u}${t.negatives.join("|")})`),r&&n?s=`${r}|${n}`:s=r||n,e.wrap?`(${u}${s})`:s},"toSequence"),Wr=a((t,e,u,r)=>{if(u)return kr(t,e,{wrap:!1,...r});let n=String.fromCharCode(t);if(t===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},"toRange"),jr=a((t,e,u)=>{if(Array.isArray(t)){let r=u.wrap===!0,n=u.capture?"":"?:";return r?`(${n}${t.join("|")})`:t.join("|")}return kr(t,e,u)},"toRegex"),Ur=a((...t)=>new RangeError("Invalid range arguments: "+QD.inspect(...t)),"rangeError"),Kr=a((t,e,u)=>{if(u.strictRanges===!0)throw Ur([t,e]);return[]},"invalidRange"),uo=a((t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},"invalidStep"),ro=a((t,e,u=1,r={})=>{let n=Number(t),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(r.strictRanges===!0)throw Ur([t,e]);return[]}n===0&&(n=0),s===0&&(s=0);let i=n>s,D=String(t),o=String(e),c=String(u);u=Math.max(Math.abs(u),1);let f=Xt(D)||Xt(o)||Xt(c),h=f?Math.max(D.length,o.length,c.length):0,l=f===!1&&JD(t,e,r)===!1,p=r.transform||ZD(l);if(r.toRegex&&u===1)return Wr(Gr(t,h),Gr(e,h),!0,r);let C={negatives:[],positives:[]},g=a(H=>C[H<0?"negatives":"positives"].push(Math.abs(H)),"push"),y=[],B=0;for(;i?n>=s:n<=s;)r.toRegex===!0&&u>1?g(n):y.push(eo(p(n,B),h,l)),n=i?n-u:n+u,B++;return r.toRegex===!0?u>1?to(C,r):jr(y,null,{wrap:!1,...r}):y},"fillNumbers"),no=a((t,e,u=1,r={})=>{if(!ve(t)&&t.length>1||!ve(e)&&e.length>1)return Kr(t,e,r);let n=r.transform||(l=>String.fromCharCode(l)),s=`${t}`.charCodeAt(0),i=`${e}`.charCodeAt(0),D=s>i,o=Math.min(s,i),c=Math.max(s,i);if(r.toRegex&&u===1)return Wr(o,c,!1,r);let f=[],h=0;for(;D?s>=i:s<=i;)f.push(n(s,h)),s=D?s-u:s+u,h++;return r.toRegex===!0?jr(f,null,{wrap:!1,options:r}):f},"fillLetters"),et=a((t,e,u,r={})=>{if(e==null&&qt(t))return[t];if(!qt(t)||!qt(e))return Kr(t,e,r);if(typeof u=="function")return et(t,e,1,{transform:u});if(Mr(u))return et(t,e,0,u);let n={...r};return n.capture===!0&&(n.wrap=!0),u=u||n.step||1,ve(u)?ve(t)&&ve(e)?ro(t,e,u,n):no(t,e,Math.max(Math.abs(u),1),n):u!=null&&!Mr(u)?uo(u,n):et(t,e,1,u)},"fill$2");var Vr=et;const so=Vr,zr=Je,io=a((t,e={})=>{let u=a((r,n={})=>{let s=zr.isInvalidBrace(n),i=r.invalid===!0&&e.escapeInvalid===!0,D=s===!0||i===!0,o=e.escapeInvalid===!0?"\\":"",c="";if(r.isOpen===!0||r.isClose===!0)return o+r.value;if(r.type==="open")return D?o+r.value:"(";if(r.type==="close")return D?o+r.value:")";if(r.type==="comma")return r.prev.type==="comma"?"":D?r.value:"|";if(r.value)return r.value;if(r.nodes&&r.ranges>0){let f=zr.reduce(r.nodes),h=so(...f,{...e,wrap:!1,toRegex:!0});if(h.length!==0)return f.length>1&&h.length>1?`(${h})`:h}if(r.nodes)for(let f of r.nodes)c+=u(f,r);return c},"walk");return u(t)},"compile$1");var Do=io;const oo=Vr,Yr=zt,Fe=Je,ce=a((t="",e="",u=!1)=>{let r=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return u?Fe.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let s of n)r.push(ce(s,e,u));else for(let s of e)u===!0&&typeof s=="string"&&(s=`{${s}}`),r.push(Array.isArray(s)?ce(n,s,u):n+s);return Fe.flatten(r)},"append"),ao=a((t,e={})=>{let u=e.rangeLimit===void 0?1e3:e.rangeLimit,r=a((n,s={})=>{n.queue=[];
`,CHAR_NO_BREAK_SPACE:"\xA0",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:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const fo=zt,{MAX_LENGTH:qr,CHAR_BACKSLASH:Qt,CHAR_BACKTICK:ho,CHAR_COMMA:Eo,CHAR_DOT:po,CHAR_LEFT_PARENTHESES:Co,CHAR_RIGHT_PARENTHESES:Fo,CHAR_LEFT_CURLY_BRACE:go,CHAR_RIGHT_CURLY_BRACE:mo,CHAR_LEFT_SQUARE_BRACKET:Xr,CHAR_RIGHT_SQUARE_BRACKET:Qr,CHAR_DOUBLE_QUOTE:_o,CHAR_SINGLE_QUOTE:Ao,CHAR_NO_BREAK_SPACE:yo,CHAR_ZERO_WIDTH_NOBREAK_SPACE:wo}=co,Ro=a((t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},r=typeof u.maxLength=="number"?Math.min(qr,u.maxLength):qr;if(t.length>r)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${r})`);let n={type:"root",input:t,nodes:[]},s=[n],i=n,D=n,o=0,c=t.length,f=0,h=0,l;const p=a(()=>t[f++],"advance"),C=a(g=>{if(g.type==="text"&&D.type==="dot"&&(D.type="text"),D&&D.type==="text"&&g.type==="text"){D.value+=g.value;return}return i.nodes.push(g),g.parent=i,g.prev=D,D=g,g},"push");for(C({type:"bos"});f<c;)if(i=s[s.length-1],l=p(),!(l===wo||l===yo)){if(l===Qt){C({type:"text",value:(e.keepEscaping?l:"")+p()});continue}if(l===Qr){C({type:"text",value:"\\"+l});continue}if(l===Xr){o++;let g;for(;f<c&&(g=p());){if(l+=g,g===Xr){o++;continue}if(g===Qt){l+=p();continue}if(g===Qr&&(o--,o===0))break}C({type:"text",value:l});continue}if(l===Co){i=C({type:"paren",nodes:[]}),s.push(i),C({type:"text",value:l});continue}if(l===Fo){if(i.type!=="paren"){C({type:"text",value:l});continue}i=s.pop(),C({type:"text",value:l}),i=s[s.length-1];continue}if(l===_o||l===Ao||l===ho){let g=l,y;for(e.keepQuotes!==!0&&(l="");f<c&&(y=p());){if(y===Qt){l+=y+p();continue}if(y===g){e.keepQuotes===!0&&(l+=y);break}l+=y}C({type:"text",value:l});continue}if(l===go){h++;let y={type:"brace",open:!0,close:!1,dollar:D.value&&D.value.slice(-1)==="$"||i.dollar===!0,depth:h,commas:0,ranges:0,nodes:[]};i=C(y),s.push(i),C({type:"open",value:l});continue}if(l===mo){if(i.type!=="brace"){C({type:"text",value:l});continue}let g="close";i=s.pop(),i.close=!0,C({type:g,value:l}),h--,i=s[s.length-1];continue}if(l===Eo&&h>0){if(i.ranges>0){i.ranges=0;let g=i.nodes.shift();i.nodes=[g,{type:"text",value:fo(i)}]}C({type:"comma",value:l}),i.commas++;continue}if(l===po&&h>0&&i.commas===0){let g=i.nodes;if(h===0||g.length===0){C({type:"text",value:l});continue}if(D.type==="dot"){if(i.range=[],D.value+=l,D.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,D.type="text";continue}i.ranges++,i.args=[];continue}if(D.type==="range"){g.pop();let y=g[g.length-1];y.value+=D.value+l,D=y,i.ranges--;continue}C({type:"dot",value:l});continue}C({type:"text",value:l})}do if(i=s.pop(),i.type!=="root"){i.nodes.forEach(B=>{B.nodes||(B.type==="open"&&(B.isOpen=!0),B.type==="close"&&(B.isClose=!0),B.nodes||(B.type="text"),B.invalid=!0)});let g=s[s.length-1],y=g.nodes.indexOf(i);g.nodes.splice(y,1,...i.nodes)}while(s.length>0);return C({type:"eos"}),n},"parse$1");var bo=Ro;const Zr=zt,vo=Do,So=lo,Bo=bo,q=a((t,e={})=>{let u=[];if(Array.isArray(t))for(let r of t){let n=q.create(r,e);Array.isArray(n)?u.push(...n):u.push(n)}else u=[].concat(q.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u},"braces$1");q.parse=(t,e={})=>Bo(t,e),q.stringify=(t,e={})=>Zr(typeof t=="string"?q.parse(t,e):t,e),q.compile=(t,e={})=>(typeof t=="string"&&(t=q.parse(t,e)),vo(t,e)),q.expand=(t,e={})=>{typeof t=="string"&&(t=q.parse(t,e));let u=So(t,e);return e.noempty===!0&&(u=u.filter(Boolean)),e.nodupes===!0&&(u=[...new Set(u)]),u},q.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?q.compile(t,e):q.expand(t,e);var $o=q,To=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2",
node `):t.flags.help&&(t.showHelp({description:"Node.js runtime enhanced with esbuild for loading TypeScript & ESM"}),console.log(`${"-".repeat(45)}
`));const e={eval:{type:String,alias:"e"},print:{type:String,alias:"p"}},{_:u,flags:r}=Uu({flags:{...e,inputType:String,test:Boolean},help:!1,ignoreArgv:ot(!1)}),n=mn({...yn,...e}),i=["print","eval"].find(c=>!!r[c]);if(i){const{inputType:c}=r,f=r[i],h=Sn.transformSync(f,{loader:"default",sourcefile:"/eval.ts",format:c==="module"?"esm":"cjs"});n.unshift(`--${i}`,h.code)}ke.isFeatureSupported(ke.testRunnerGlob)&&r.test&&u.length===0&&n.push("**/{test,test/**/*,test-*,*[.-_]test}.?(c|m)@(t|j)s");const D=await _n(),o=ir(n,{noCache:!!t.flags.noCache,tsconfigPath:t.flags.tsconfig});El(o,D),process.send&&o.on("message",c=>{process.send(c)}),o.send&&process.on("message",c=>{o.send(c)}),o.on("close",c=>{c===null&&(c=ct.constants.signals[o.signalCode]+128),process.exit(c)})});