@tsmodule/tsmodule 41.4.0 → 41.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/dist/bin.js +78 -20
  2. package/dist/loader/index.js +6 -6
  3. package/package.json +5 -3
  4. package/dist/bin.d.ts +0 -2
  5. package/dist/commands/build/index.d.ts +0 -21
  6. package/dist/commands/build/index.js +0 -62
  7. package/dist/commands/build/lib/emitTsDeclarations.d.ts +0 -13
  8. package/dist/commands/build/lib/emitTsDeclarations.js +0 -18
  9. package/dist/commands/convert/index.d.ts +0 -7
  10. package/dist/commands/convert/index.js +0 -4
  11. package/dist/commands/create/index.d.ts +0 -3
  12. package/dist/commands/create/index.js +0 -18
  13. package/dist/commands/create/lib/templates.d.ts +0 -32
  14. package/dist/commands/create/lib/templates.js +0 -51
  15. package/dist/commands/dev/index.d.ts +0 -1
  16. package/dist/commands/dev/index.js +0 -20
  17. package/dist/commands/execute/index.d.ts +0 -1
  18. package/dist/commands/execute/index.js +0 -10
  19. package/dist/commands/index.d.ts +0 -5
  20. package/dist/commands/index.js +0 -4
  21. package/dist/commands/normalize/index.d.ts +0 -10
  22. package/dist/commands/normalize/index.js +0 -45
  23. package/dist/commands/normalize/lib/typescriptApi.d.ts +0 -7
  24. package/dist/commands/normalize/lib/typescriptApi.js +0 -14
  25. package/dist/constants.d.ts +0 -2
  26. package/dist/constants.js +0 -4
  27. package/dist/index.d.ts +0 -3
  28. package/dist/index.js +0 -4
  29. package/dist/loader/index.d.ts +0 -11
  30. package/dist/loader/types.d.ts +0 -22
  31. package/dist/loader/types.js +0 -3
  32. package/dist/package.json +0 -3
  33. package/dist/specification/externs.d.ts +0 -2
  34. package/dist/specification/externs.js +0 -4
  35. package/dist/specification/index.d.ts +0 -6
  36. package/dist/specification/index.js +0 -4
  37. package/dist/specification/shim.d.ts +0 -9
  38. package/dist/specification/shim.js +0 -4
  39. package/dist/specification/types.d.ts +0 -11
  40. package/dist/specification/types.js +0 -3
  41. package/dist/types/index.js +0 -4
  42. package/dist/utils/cwd.d.ts +0 -7
  43. package/dist/utils/cwd.js +0 -8
  44. package/dist/utils/packageJson.d.ts +0 -24
  45. package/dist/utils/packageJson.js +0 -4
  46. package/dist/utils/programCatch.d.ts +0 -1
  47. package/dist/utils/programCatch.js +0 -8
  48. package/dist/utils/require.d.ts +0 -9
  49. package/dist/utils/require.js +0 -4
  50. package/dist/utils/resolve.d.ts +0 -28
  51. package/dist/utils/resolve.js +0 -4
  52. package/dist/utils/showProgress.d.ts +0 -11
  53. package/dist/utils/showProgress.js +0 -12
  54. package/dist/utils/stdin.d.ts +0 -1
  55. package/dist/utils/stdin.js +0 -12
package/dist/bin.js CHANGED
@@ -2,30 +2,88 @@
2
2
 
3
3
  if(typeof process<"u"){let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");globalThis.__filename=i(import.meta.url),globalThis.__dirname=e(globalThis.__filename);let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}
4
4
 
5
- var Re=Object.create;var re=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var Me=Object.getOwnPropertyNames;var De=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty;var $=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+s+'" is not supported')});var w=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var Be=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Me(e))!Pe.call(s,n)&&n!==t&&re(s,n,{get:()=>e[n],enumerable:!(i=Ie(e,n))||i.enumerable});return s};var je=(s,e,t)=>(t=s!=null?Re(De(s)):{},Be(e||!s||!s.__esModule?re(t,"default",{value:s,enumerable:!0}):t,s));var V=w(G=>{var R=class extends Error{constructor(e,t,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},U=class extends R{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};G.CommanderError=R;G.InvalidArgumentError=U});var I=w(K=>{var{InvalidArgumentError:tt}=V(),Y=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new tt(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function it(s){let e=s.name()+(s.variadic===!0?"...":"");return s.required?"<"+e+">":"["+e+"]"}K.Argument=Y;K.humanReadableArgName=it});var z=w(be=>{var{humanReadableArgName:nt}=I(),J=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden);if(e._hasImplicitHelpCommand()){let[,i,n]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),r=e.createCommand(i).helpOption(!1);r.description(e._helpCommandDescription),n&&r.arguments(n),t.push(r)}return this.sortSubcommands&&t.sort((i,n)=>i.name().localeCompare(n.name())),t}visibleOptions(e){let t=e.options.filter(r=>!r.hidden),i=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),n=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(i||n){let r;i?n?r=e.createOption(e._helpFlags,e._helpDescription):r=e.createOption(e._helpShortFlag,e._helpDescription):r=e.createOption(e._helpLongFlag,e._helpDescription),t.push(r)}if(this.sortOptions){let r=o=>o.short?o.short.replace(/^-/,""):o.long.replace(/^--/,"");t.sort((o,l)=>r(o).localeCompare(r(l)))}return t}visibleArguments(e){return e._argsDescription&&e._args.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e._args.find(t=>t.description)?e._args:[]}subcommandTerm(e){let t=e._args.map(i=>nt(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((i,n)=>Math.max(i,t.subcommandTerm(n).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((i,n)=>Math.max(i,t.optionTerm(n).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((i,n)=>Math.max(i,t.argumentTerm(n).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let i="";for(let n=e.parent;n;n=n.parent)i=n.name()+" "+i;return i+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let i=`(${t.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatHelp(e,t){let i=t.padWidth(e,t),n=t.helpWidth||80,r=2,o=2;function l(d,ne){if(ne){let ke=`${d.padEnd(i+o)}${ne}`;return t.wrap(ke,n-r,i+o)}return d}function a(d){return d.join(`
6
- `).replace(/^/gm," ".repeat(r))}let u=[`Usage: ${t.commandUsage(e)}`,""],h=t.commandDescription(e);h.length>0&&(u=u.concat([h,""]));let c=t.visibleArguments(e).map(d=>l(t.argumentTerm(d),t.argumentDescription(d)));c.length>0&&(u=u.concat(["Arguments:",a(c),""]));let _=t.visibleOptions(e).map(d=>l(t.optionTerm(d),t.optionDescription(d)));_.length>0&&(u=u.concat(["Options:",a(_),""]));let S=t.visibleCommands(e).map(d=>l(t.subcommandTerm(d),t.subcommandDescription(d)));return S.length>0&&(u=u.concat(["Commands:",a(S),""])),u.join(`
7
- `)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,i,n=40){if(e.match(/[\n]\s+/))return e;let r=t-i;if(r<n)return e;let o=e.slice(0,i),l=e.slice(i),a=" ".repeat(i),u=new RegExp(".{1,"+(r-1)+"}([\\s​]|$)|[^\\s​]+?([\\s​]|$)","g"),h=l.match(u)||[];return o+h.map((c,_)=>(c.slice(-1)===`
8
- `&&(c=c.slice(0,c.length-1)),(_>0?a:"")+c.trimRight())).join(`
9
- `)}};be.Help=J});var Z=w(M=>{var{InvalidArgumentError:rt}=V(),Q=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let i=Oe(e);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){return this.implied=Object.assign(this.implied||{},e),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new rt(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return st(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},X=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(e,t){let i=t.attributeName();if(!this.dualOptions.has(i))return!0;let n=this.negativeOptions.get(i).presetArg,r=n!==void 0?n:!1;return t.negate===(r===e)}};function st(s){return s.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Oe(s){let e,t,i=s.split(/[ |,]+/);return i.length>1&&!/^[[<]/.test(i[1])&&(e=i.shift()),t=i.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}M.Option=Q;M.splitOptionFlags=Oe;M.DualOptions=X});var Ae=w(Ce=>{function ot(s,e){if(Math.abs(s.length-e.length)>3)return Math.max(s.length,e.length);let t=[];for(let i=0;i<=s.length;i++)t[i]=[i];for(let i=0;i<=e.length;i++)t[0][i]=i;for(let i=1;i<=e.length;i++)for(let n=1;n<=s.length;n++){let r=1;s[n-1]===e[i-1]?r=0:r=1,t[n][i]=Math.min(t[n-1][i]+1,t[n][i-1]+1,t[n-1][i-1]+r),n>1&&i>1&&s[n-1]===e[i-2]&&s[n-2]===e[i-1]&&(t[n][i]=Math.min(t[n][i],t[n-2][i-2]+1))}return t[s.length][e.length]}function at(s,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=s.startsWith("--");t&&(s=s.slice(2),e=e.map(o=>o.slice(2)));let i=[],n=3,r=.4;return e.forEach(o=>{if(o.length<=1)return;let l=ot(s,o),a=Math.max(s.length,o.length);(a-l)/a>r&&(l<n?(n=l,i=[o]):l===n&&i.push(o))}),i.sort((o,l)=>o.localeCompare(l)),t&&(i=i.map(o=>`--${o}`)),i.length>1?`
5
+ var vp=Object.create;var ga=Object.defineProperty;var xp=Object.getOwnPropertyDescriptor;var wp=Object.getOwnPropertyNames;var Sp=Object.getPrototypeOf,Bp=Object.prototype.hasOwnProperty;var w=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Qp=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of wp(e))!Bp.call(t,n)&&n!==r&&ga(t,n,{get:()=>e[n],enumerable:!(i=xp(e,n))||i.enumerable});return t};var Ie=(t,e,r)=>(r=t!=null?vp(Sp(t)):{},Qp(e||!t||!t.__esModule?ga(r,"default",{value:t,enumerable:!0}):r,t));var er=g(ln=>{var Fr=class extends Error{constructor(e,r,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},an=class extends Fr{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};ln.CommanderError=Fr;ln.InvalidArgumentError=an});var Mr=g(cn=>{var{InvalidArgumentError:jp}=er(),un=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new jp(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,i):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function $p(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}cn.Argument=un;cn.humanReadableArgName=$p});var hn=g(Ia=>{var{humanReadableArgName:Kp}=Mr(),fn=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1}visibleCommands(e){let r=e.commands.filter(i=>!i._hidden);if(e._hasImplicitHelpCommand()){let[,i,n]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),s=e.createCommand(i).helpOption(!1);s.description(e._helpCommandDescription),n&&s.arguments(n),r.push(s)}return this.sortSubcommands&&r.sort((i,n)=>i.name().localeCompare(n.name())),r}visibleOptions(e){let r=e.options.filter(s=>!s.hidden),i=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),n=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(i||n){let s;i?n?s=e.createOption(e._helpFlags,e._helpDescription):s=e.createOption(e._helpShortFlag,e._helpDescription):s=e.createOption(e._helpLongFlag,e._helpDescription),r.push(s)}if(this.sortOptions){let s=o=>o.short?o.short.replace(/^-/,""):o.long.replace(/^--/,"");r.sort((o,a)=>s(o).localeCompare(s(a)))}return r}visibleArguments(e){return e._argsDescription&&e._args.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e._args.find(r=>r.description)?e._args:[]}subcommandTerm(e){let r=e._args.map(i=>Kp(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((i,n)=>Math.max(i,r.subcommandTerm(n).length),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((i,n)=>Math.max(i,r.optionTerm(n).length),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((i,n)=>Math.max(i,r.argumentTerm(n).length),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let i="";for(let n=e.parent;n;n=n.parent)i=n.name()+" "+i;return i+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];return e.argChoices&&r.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0?`${e.description} (${r.join(", ")})`:e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let i=`(${r.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatHelp(e,r){let i=r.padWidth(e,r),n=r.helpWidth||80,s=2,o=2;function a(A,_){if(_){let v=`${A.padEnd(i+o)}${_}`;return r.wrap(v,n-s,i+o)}return A}function l(A){return A.join(`
6
+ `).replace(/^/gm," ".repeat(s))}let u=[`Usage: ${r.commandUsage(e)}`,""],c=r.commandDescription(e);c.length>0&&(u=u.concat([c,""]));let f=r.visibleArguments(e).map(A=>a(r.argumentTerm(A),r.argumentDescription(A)));f.length>0&&(u=u.concat(["Arguments:",l(f),""]));let h=r.visibleOptions(e).map(A=>a(r.optionTerm(A),r.optionDescription(A)));h.length>0&&(u=u.concat(["Options:",l(h),""]));let y=r.visibleCommands(e).map(A=>a(r.subcommandTerm(A),r.subcommandDescription(A)));return y.length>0&&(u=u.concat(["Commands:",l(y),""])),u.join(`
7
+ `)}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}wrap(e,r,i,n=40){if(e.match(/[\n]\s+/))return e;let s=r-i;if(s<n)return e;let o=e.slice(0,i),a=e.slice(i),l=" ".repeat(i),u=new RegExp(".{1,"+(s-1)+"}([\\s​]|$)|[^\\s​]+?([\\s​]|$)","g"),c=a.match(u)||[];return o+c.map((f,h)=>(f.slice(-1)===`
8
+ `&&(f=f.slice(0,f.length-1)),(h>0?l:"")+f.trimRight())).join(`
9
+ `)}};Ia.Help=fn});var An=g(qr=>{var{InvalidArgumentError:Up}=er(),pn=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let i=Oa(e);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){return this.implied=Object.assign(this.implied||{},e),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new Up(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,i):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Gp(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},dn=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(e,r){let i=r.attributeName();if(!this.dualOptions.has(i))return!0;let n=this.negativeOptions.get(i).presetArg,s=n!==void 0?n:!1;return r.negate===(s===e)}};function Gp(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function Oa(t){let e,r,i=t.split(/[ |,]+/);return i.length>1&&!/^[[<]/.test(i[1])&&(e=i.shift()),r=i.shift(),!e&&/^-[^-]$/.test(r)&&(e=r,r=void 0),{shortFlag:e,longFlag:r}}qr.Option=pn;qr.splitOptionFlags=Oa;qr.DualOptions=dn});var ka=g(Ta=>{function Jp(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let i=0;i<=t.length;i++)r[i]=[i];for(let i=0;i<=e.length;i++)r[0][i]=i;for(let i=1;i<=e.length;i++)for(let n=1;n<=t.length;n++){let s=1;t[n-1]===e[i-1]?s=0:s=1,r[n][i]=Math.min(r[n-1][i]+1,r[n][i-1]+1,r[n-1][i-1]+s),n>1&&i>1&&t[n-1]===e[i-2]&&t[n-2]===e[i-1]&&(r[n][i]=Math.min(r[n][i],r[n-2][i-2]+1))}return r[t.length][e.length]}function Yp(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(o=>o.slice(2)));let i=[],n=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=Jp(t,o),l=Math.max(t.length,o.length);(l-a)/l>s&&(a<n?(n=a,i=[o]):a===n&&i.push(o))}),i.sort((o,a)=>o.localeCompare(a)),r&&(i=i.map(o=>`--${o}`)),i.length>1?`
10
10
  (Did you mean one of ${i.join(", ")}?)`:i.length===1?`
11
- (Did you mean ${i[0]}?)`:""}Ce.suggestSimilar=at});var Se=w(ve=>{var lt=$("events").EventEmitter,ee=$("child_process"),C=$("path"),te=$("fs"),m=$("process"),{Argument:ut,humanReadableArgName:ht}=I(),{CommanderError:ie}=V(),{Help:ct}=z(),{Option:Ee,splitOptionFlags:pt,DualOptions:mt}=Z(),{suggestSimilar:we}=Ae(),N=class extends lt{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:t=>m.stdout.write(t),writeErr:t=>m.stderr.write(t),getOutHelpWidth:()=>m.stdout.isTTY?m.stdout.columns:void 0,getErrHelpWidth:()=>m.stderr.isTTY?m.stderr.columns:void 0,outputError:(t,i)=>i(t)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,t,i){let n=t,r=i;typeof n=="object"&&n!==null&&(r=n,n=null),r=r||{};let[,o,l]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return n&&(a.description(n),a._executableHandler=!0),r.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(r.noHelp||r.hidden),a._executableFile=r.executableFile||null,l&&a.arguments(l),this.commands.push(a),a.parent=this,a.copyInheritedSettings(this),n?this:a}createCommand(e){return new N(e)}createHelp(){return Object.assign(new ct,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
12
- - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,t){return new ut(e,t)}argument(e,t,i,n){let r=this.createArgument(e,t);return typeof i=="function"?r.default(n).argParser(i):r.default(i),this.addArgument(r),this}arguments(e){return e.split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this._args.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this._args.push(e),this}addHelpCommand(e,t){return e===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,t){let i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
13
- Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,i){this._exitCallback&&this._exitCallback(new ie(e,t,i)),m.exit(e)}action(e){let t=i=>{let n=this._args.length,r=i.slice(0,n);return this._storeOptionsAsProperties?r[n]=this:r[n]=this.opts(),r.push(this),e.apply(this,r)};return this._actionHandler=t,this}createOption(e,t){return new Ee(e,t)}addOption(e){let t=e.name(),i=e.attributeName();if(e.negate){let r=e.long.replace(/^--no-/,"--");this._findOption(r)||this.setOptionValueWithSource(i,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");this.options.push(e);let n=(r,o,l)=>{r==null&&e.presetArg!==void 0&&(r=e.presetArg);let a=this.getOptionValue(i);if(r!==null&&e.parseArg)try{r=e.parseArg(r,a)}catch(u){if(u.code==="commander.invalidArgument"){let h=`${o} ${u.message}`;this.error(h,{exitCode:u.exitCode,code:u.code})}throw u}else r!==null&&e.variadic&&(r=e._concatValue(r,a));r==null&&(e.negate?r=!1:e.isBoolean()||e.optional?r=!0:r=""),this.setOptionValueWithSource(i,r,l)};return this.on("option:"+t,r=>{let o=`error: option '${e.flags}' argument '${r}' is invalid.`;n(r,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,r=>{let o=`error: option '${e.flags}' value '${r}' from env '${e.envVar}' is invalid.`;n(r,o,"env")}),this}_optionEx(e,t,i,n,r){if(typeof t=="object"&&t instanceof Ee)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,i);if(o.makeOptionMandatory(!!e.mandatory),typeof n=="function")o.default(r).argParser(n);else if(n instanceof RegExp){let l=n;n=(a,u)=>{let h=l.exec(a);return h?h[0]:u},o.default(r).argParser(n)}else o.default(n);return this.addOption(o)}option(e,t,i,n){return this._optionEx({},e,t,i,n)}requiredOption(e,t,i,n){return this._optionEx({mandatory:!0},e,t,i,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,!!this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,i){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=m.argv,m.versions&&m.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let i;switch(t.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":m.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(e,t){let i=this._prepareUserArgs(e,t);return this._parseCommand([],i),this}async parseAsync(e,t){let i=this._prepareUserArgs(e,t);return await this._parseCommand([],i),this}_executeSubCommand(e,t){t=t.slice();let i=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function r(h,c){let _=C.resolve(h,c);if(te.existsSync(_))return _;if(n.includes(C.extname(c)))return;let S=n.find(d=>te.existsSync(`${_}${d}`));if(S)return`${_}${S}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,l=this._executableDir||"";if(this._scriptPath){let h;try{h=te.realpathSync(this._scriptPath)}catch{h=this._scriptPath}l=C.resolve(C.dirname(h),l)}if(l){let h=r(l,o);if(!h&&!e._executableFile&&this._scriptPath){let c=C.basename(this._scriptPath,C.extname(this._scriptPath));c!==this._name&&(h=r(l,`${c}-${e._name}`))}o=h||o}i=n.includes(C.extname(o));let a;m.platform!=="win32"?i?(t.unshift(o),t=ye(m.execArgv).concat(t),a=ee.spawn(m.argv[0],t,{stdio:"inherit"})):a=ee.spawn(o,t,{stdio:"inherit"}):(t.unshift(o),t=ye(m.execArgv).concat(t),a=ee.spawn(m.execPath,t,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{m.on(c,()=>{a.killed===!1&&a.exitCode===null&&a.kill(c)})});let u=this._exitCallback;u?a.on("close",()=>{u(new ie(m.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):a.on("close",m.exit.bind(m)),a.on("error",h=>{if(h.code==="ENOENT"){let c=l?`searched for local subcommand relative to directory '${l}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",_=`'${o}' does not exist
11
+ (Did you mean ${i[0]}?)`:""}Ta.suggestSimilar=Yp});var Ma=g(Fa=>{var Vp=w("events").EventEmitter,gn=w("child_process"),qe=w("path"),mn=w("fs"),J=w("process"),{Argument:Wp,humanReadableArgName:Xp}=Mr(),{CommanderError:_n}=er(),{Help:Zp}=hn(),{Option:Da,splitOptionFlags:zp,DualOptions:ed}=An(),{suggestSimilar:Pa}=ka(),tr=class extends Vp{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:r=>J.stdout.write(r),writeErr:r=>J.stderr.write(r),getOutHelpWidth:()=>J.stdout.isTTY?J.stdout.columns:void 0,getErrHelpWidth:()=>J.stderr.isTTY?J.stderr.columns:void 0,outputError:(r,i)=>i(r)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,r,i){let n=r,s=i;typeof n=="object"&&n!==null&&(s=n,n=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return n&&(l.description(n),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,a&&l.arguments(a),this.commands.push(l),l.parent=this,l.copyInheritedSettings(this),n?this:l}createCommand(e){return new tr(e)}createHelp(){return Object.assign(new Zp,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
12
+ - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,r){return new Wp(e,r)}argument(e,r,i,n){let s=this.createArgument(e,r);return typeof i=="function"?s.default(n).argParser(i):s.default(i),this.addArgument(s),this}arguments(e){return e.split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this._args.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this._args.push(e),this}addHelpCommand(e,r){return e===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=r||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,r){let i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
13
+ Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,i){this._exitCallback&&this._exitCallback(new _n(e,r,i)),J.exit(e)}action(e){let r=i=>{let n=this._args.length,s=i.slice(0,n);return this._storeOptionsAsProperties?s[n]=this:s[n]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=r,this}createOption(e,r){return new Da(e,r)}addOption(e){let r=e.name(),i=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(i,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");this.options.push(e);let n=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(i);if(s!==null&&e.parseArg)try{s=e.parseArg(s,l)}catch(u){if(u.code==="commander.invalidArgument"){let c=`${o} ${u.message}`;this.error(c,{exitCode:u.exitCode,code:u.code})}throw u}else s!==null&&e.variadic&&(s=e._concatValue(s,l));s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(i,s,a)};return this.on("option:"+r,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;n(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+r,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;n(s,o,"env")}),this}_optionEx(e,r,i,n,s){if(typeof r=="object"&&r instanceof Da)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(r,i);if(o.makeOptionMandatory(!!e.mandatory),typeof n=="function")o.default(s).argParser(n);else if(n instanceof RegExp){let a=n;n=(l,u)=>{let c=a.exec(l);return c?c[0]:u},o.default(s).argParser(n)}else o.default(n);return this.addOption(o)}option(e,r,i,n){return this._optionEx({},e,r,i,n)}requiredOption(e,r,i,n){return this._optionEx({mandatory:!0},e,r,i,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,!!this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,i){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");r=r||{},e===void 0&&(e=J.argv,J.versions&&J.versions.electron&&(r.from="electron")),this.rawArgs=e.slice();let i;switch(r.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":J.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(e,r){let i=this._prepareUserArgs(e,r);return this._parseCommand([],i),this}async parseAsync(e,r){let i=this._prepareUserArgs(e,r);return await this._parseCommand([],i),this}_executeSubCommand(e,r){r=r.slice();let i=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function s(c,f){let h=qe.resolve(c,f);if(mn.existsSync(h))return h;if(n.includes(qe.extname(f)))return;let y=n.find(A=>mn.existsSync(`${h}${A}`));if(y)return`${h}${y}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let c;try{c=mn.realpathSync(this._scriptPath)}catch{c=this._scriptPath}a=qe.resolve(qe.dirname(c),a)}if(a){let c=s(a,o);if(!c&&!e._executableFile&&this._scriptPath){let f=qe.basename(this._scriptPath,qe.extname(this._scriptPath));f!==this._name&&(c=s(a,`${f}-${e._name}`))}o=c||o}i=n.includes(qe.extname(o));let l;J.platform!=="win32"?i?(r.unshift(o),r=Na(J.execArgv).concat(r),l=gn.spawn(J.argv[0],r,{stdio:"inherit"})):l=gn.spawn(o,r,{stdio:"inherit"}):(r.unshift(o),r=Na(J.execArgv).concat(r),l=gn.spawn(J.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{J.on(f,()=>{l.killed===!1&&l.exitCode===null&&l.kill(f)})});let u=this._exitCallback;u?l.on("close",()=>{u(new _n(J.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):l.on("close",J.exit.bind(J)),l.on("error",c=>{if(c.code==="ENOENT"){let f=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",h=`'${o}' does not exist
14
14
  - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
15
15
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
16
- - ${c}`;throw new Error(_)}else if(h.code==="EACCES")throw new Error(`'${o}' not executable`);if(!u)m.exit(1);else{let c=new ie(1,"commander.executeSubCommandAsync","(error)");c.nestedError=h,u(c)}}),this.runningCommand=a}_dispatchSubcommand(e,t,i){let n=this._findCommand(e);n||this.help({error:!0});let r;return r=this._chainOrCallSubCommandHook(r,n,"preSubcommand"),r=this._chainOrCall(r,()=>{if(n._executableHandler)this._executeSubCommand(n,t.concat(i));else return n._parseCommand(t,i)}),r}_checkNumberOfArguments(){this._args.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this._args.length>0&&this._args[this._args.length-1].variadic)&&this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){let e=(i,n,r)=>{let o=n;if(n!==null&&i.parseArg)try{o=i.parseArg(n,r)}catch(l){if(l.code==="commander.invalidArgument"){let a=`error: command-argument value '${n}' is invalid for argument '${i.name()}'. ${l.message}`;this.error(a,{exitCode:l.exitCode,code:l.code})}throw l}return o};this._checkNumberOfArguments();let t=[];this._args.forEach((i,n)=>{let r=i.defaultValue;i.variadic?n<this.args.length?(r=this.args.slice(n),i.parseArg&&(r=r.reduce((o,l)=>e(i,l,o),i.defaultValue))):r===void 0&&(r=[]):n<this.args.length&&(r=this.args[n],i.parseArg&&(r=e(i,r,i.defaultValue))),t[n]=r}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let i=e,n=[];return D(this).reverse().filter(r=>r._lifeCycleHooks[t]!==void 0).forEach(r=>{r._lifeCycleHooks[t].forEach(o=>{n.push({hookedCommand:r,callback:o})})}),t==="postAction"&&n.reverse(),n.forEach(r=>{i=this._chainOrCall(i,()=>r.callback(r.hookedCommand,this))}),i}_chainOrCallSubCommandHook(e,t,i){let n=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(r=>{n=this._chainOrCall(n,()=>r(this,t))}),n}_parseCommand(e,t){let i=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),t=i.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return e.length===1&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return xe(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),xe(this,i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},r=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(r,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(r))n(),this._processArguments(),this.parent.emit(r,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(!!e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})}_checkForConflictingLocalOptions(){let e=this.options.filter(i=>{let n=i.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{let n=e.find(r=>i.conflictsWith.includes(r.attributeName()));n&&this._conflictingOption(i,n)})}_checkForConflictingOptions(){for(let e=this;e;e=e.parent)e._checkForConflictingLocalOptions()}parseOptions(e){let t=[],i=[],n=t,r=e.slice();function o(a){return a.length>1&&a[0]==="-"}let l=null;for(;r.length;){let a=r.shift();if(a==="--"){n===i&&n.push(a),n.push(...r);break}if(l&&!o(a)){this.emit(`option:${l.name()}`,a);continue}if(l=null,o(a)){let u=this._findOption(a);if(u){if(u.required){let h=r.shift();h===void 0&&this.optionMissingArgument(u),this.emit(`option:${u.name()}`,h)}else if(u.optional){let h=null;r.length>0&&!o(r[0])&&(h=r.shift()),this.emit(`option:${u.name()}`,h)}else this.emit(`option:${u.name()}`);l=u.variadic?u:null;continue}}if(a.length>2&&a[0]==="-"&&a[1]!=="-"){let u=this._findOption(`-${a[1]}`);if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${u.name()}`,a.slice(2)):(this.emit(`option:${u.name()}`),r.unshift(`-${a.slice(2)}`));continue}}if(/^--[^=]+=/.test(a)){let u=a.indexOf("="),h=this._findOption(a.slice(0,u));if(h&&(h.required||h.optional)){this.emit(`option:${h.name()}`,a.slice(u+1));continue}}if(o(a)&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&i.length===0){if(this._findCommand(a)){t.push(a),r.length>0&&i.push(...r);break}else if(a===this._helpCommandName&&this._hasImplicitHelpCommand()){t.push(a),r.length>0&&t.push(...r);break}else if(this._defaultCommandName){i.push(a),r.length>0&&i.push(...r);break}}if(this._passThroughOptions){n.push(a),r.length>0&&n.push(...r);break}n.push(a)}return{operands:t,unknown:i}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let i=0;i<t;i++){let n=this.options[i].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}optsWithGlobals(){return D(this).reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
16
+ - ${f}`;throw new Error(h)}else if(c.code==="EACCES")throw new Error(`'${o}' not executable`);if(!u)J.exit(1);else{let f=new _n(1,"commander.executeSubCommandAsync","(error)");f.nestedError=c,u(f)}}),this.runningCommand=l}_dispatchSubcommand(e,r,i){let n=this._findCommand(e);n||this.help({error:!0});let s;return s=this._chainOrCallSubCommandHook(s,n,"preSubcommand"),s=this._chainOrCall(s,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(i));else return n._parseCommand(r,i)}),s}_checkNumberOfArguments(){this._args.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this._args.length>0&&this._args[this._args.length-1].variadic)&&this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){let e=(i,n,s)=>{let o=n;if(n!==null&&i.parseArg)try{o=i.parseArg(n,s)}catch(a){if(a.code==="commander.invalidArgument"){let l=`error: command-argument value '${n}' is invalid for argument '${i.name()}'. ${a.message}`;this.error(l,{exitCode:a.exitCode,code:a.code})}throw a}return o};this._checkNumberOfArguments();let r=[];this._args.forEach((i,n)=>{let s=i.defaultValue;i.variadic?n<this.args.length?(s=this.args.slice(n),i.parseArg&&(s=s.reduce((o,a)=>e(i,a,o),i.defaultValue))):s===void 0&&(s=[]):n<this.args.length&&(s=this.args[n],i.parseArg&&(s=e(i,s,i.defaultValue))),r[n]=s}),this.processedArgs=r}_chainOrCall(e,r){return e&&e.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let i=e,n=[];return Hr(this).reverse().filter(s=>s._lifeCycleHooks[r]!==void 0).forEach(s=>{s._lifeCycleHooks[r].forEach(o=>{n.push({hookedCommand:s,callback:o})})}),r==="postAction"&&n.reverse(),n.forEach(s=>{i=this._chainOrCall(i,()=>s.callback(s.hookedCommand,this))}),i}_chainOrCallSubCommandHook(e,r,i){let n=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(s=>{n=this._chainOrCall(n,()=>s(this,r))}),n}_parseCommand(e,r){let i=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),r=i.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return e.length===1&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return La(this,r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),La(this,i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,r)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))n(),this._processArguments(),this.parent.emit(s,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(!!e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})}_checkForConflictingLocalOptions(){let e=this.options.filter(i=>{let n=i.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{let n=e.find(s=>i.conflictsWith.includes(s.attributeName()));n&&this._conflictingOption(i,n)})}_checkForConflictingOptions(){for(let e=this;e;e=e.parent)e._checkForConflictingLocalOptions()}parseOptions(e){let r=[],i=[],n=r,s=e.slice();function o(l){return l.length>1&&l[0]==="-"}let a=null;for(;s.length;){let l=s.shift();if(l==="--"){n===i&&n.push(l),n.push(...s);break}if(a&&!o(l)){this.emit(`option:${a.name()}`,l);continue}if(a=null,o(l)){let u=this._findOption(l);if(u){if(u.required){let c=s.shift();c===void 0&&this.optionMissingArgument(u),this.emit(`option:${u.name()}`,c)}else if(u.optional){let c=null;s.length>0&&!o(s[0])&&(c=s.shift()),this.emit(`option:${u.name()}`,c)}else this.emit(`option:${u.name()}`);a=u.variadic?u:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let u=this._findOption(`-${l[1]}`);if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${u.name()}`,l.slice(2)):(this.emit(`option:${u.name()}`),s.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let u=l.indexOf("="),c=this._findOption(l.slice(0,u));if(c&&(c.required||c.optional)){this.emit(`option:${c.name()}`,l.slice(u+1));continue}}if(o(l)&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&i.length===0){if(this._findCommand(l)){r.push(l),s.length>0&&i.push(...s);break}else if(l===this._helpCommandName&&this._hasImplicitHelpCommand()){r.push(l),s.length>0&&r.push(...s);break}else if(this._defaultCommandName){i.push(l),s.length>0&&i.push(...s);break}}if(this._passThroughOptions){n.push(l),s.length>0&&n.push(...s);break}n.push(l)}return{operands:r,unknown:i}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let i=0;i<r;i++){let n=this.options[i].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}optsWithGlobals(){return Hr(this).reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
17
17
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
18
18
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
19
- `),this.outputHelp({error:!0}));let i=t||{},n=i.exitCode||1,r=i.code||"commander.error";this._exit(n,r,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in m.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,m.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new mt(this.options),t=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&t(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(n=>!t(n)).forEach(n=>{this.setOptionValueWithSource(n,i.implied[n],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let i=o=>{let l=o.attributeName(),a=this.getOptionValue(l),u=this.options.find(c=>c.negate&&l===c.attributeName()),h=this.options.find(c=>!c.negate&&l===c.attributeName());return u&&(u.presetArg===void 0&&a===!1||u.presetArg!==void 0&&a===u.presetArg)?u:h||o},n=o=>{let l=i(o),a=l.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${l.envVar}'`:`option '${l.flags}'`},r=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],r=this;do{let o=r.createHelp().visibleOptions(r).filter(l=>l.long).map(l=>l.long);n=n.concat(o),r=r.parent}while(r&&!r._enablePositionalOptions);t=we(e,n)}let i=`error: unknown option '${e}'${t}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this._args.length,i=t===1?"":"s",r=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${i} but got ${e.length}.`;this.error(r,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(r=>{n.push(r.name()),r.alias()&&n.push(r.alias())}),t=we(e,n)}let i=`error: unknown command '${e}'${t}`;this.error(i,{code:"commander.unknownCommand"})}version(e,t,i){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",i=i||"output the version number";let n=this.createOption(t,i);return this._versionOptionName=n.attributeName(),this.options.push(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
20
- `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this._args.map(i=>ht(i));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=C.basename(e,C.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e=e||{};let t={error:!!e.error},i;return t.error?i=n=>this._outputConfiguration.writeErr(n):i=n=>this._outputConfiguration.writeOut(n),t.write=e.write||i,t.command=this,t}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let i=this._getHelpContext(e);D(this).reverse().forEach(r=>r.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation(i);if(t&&(n=t(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),this.emit(this._helpLongFlag),this.emit("afterHelp",i),D(this).forEach(r=>r.emit("afterAllHelp",i))}helpOption(e,t){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;let i=pt(this._helpFlags);return this._helpShortFlag=i.shortFlag,this._helpLongFlag=i.longFlag,this}help(e){this.outputHelp(e);let t=m.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
21
- Expecting one of '${i.join("', '")}'`);let n=`${e}Help`;return this.on(n,r=>{let o;typeof t=="function"?o=t({error:r.error,command:r.command}):o=t,o&&r.write(`${o}
22
- `)}),this}};function xe(s,e){s._hasHelpOption&&e.find(i=>i===s._helpLongFlag||i===s._helpShortFlag)&&(s.outputHelp(),s._exit(0,"commander.helpDisplayed","(outputHelp)"))}function ye(s){return s.map(e=>{if(!e.startsWith("--inspect"))return e;let t,i="127.0.0.1",n="9229",r;return(r=e.match(/^(--inspect(-brk)?)$/))!==null?t=r[1]:(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=r[1],/^\d+$/.test(r[3])?n=r[3]:i=r[3]):(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=r[1],i=r[3],n=r[4]),t&&n!=="0"?`${t}=${i}:${parseInt(n)+1}`:e})}function D(s){let e=[];for(let t=s;t;t=t.parent)e.push(t);return e}ve.Command=N});var Ve=w((O,Te)=>{var{Argument:ft}=I(),{Command:$e}=Se(),{CommanderError:dt,InvalidArgumentError:Fe}=V(),{Help:gt}=z(),{Option:_t}=Z();O=Te.exports=new $e;O.program=O;O.Argument=ft;O.Command=$e;O.CommanderError=dt;O.Help=gt;O.InvalidArgumentError=Fe;O.InvalidOptionArgumentError=Fe;O.Option=_t});var se=(s=0)=>e=>`\x1B[${e+s}m`,oe=(s=0)=>e=>`\x1B[${38+s};5;${e}m`,ae=(s=0)=>(e,t,i)=>`\x1B[${38+s};2;${e};${t};${i}m`,p={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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},le=Object.keys(p.modifier),P=Object.keys(p.color),B=Object.keys(p.bgColor),ue=[...P,...B];function Le(){let s=new Map;for(let[e,t]of Object.entries(p)){for(let[i,n]of Object.entries(t))p[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},t[i]=p[i],s.set(n[0],n[1]);Object.defineProperty(p,e,{value:t,enumerable:!1})}return Object.defineProperty(p,"codes",{value:s,enumerable:!1}),p.color.close="\x1B[39m",p.bgColor.close="\x1B[49m",p.color.ansi=se(),p.color.ansi256=oe(),p.color.ansi16m=ae(),p.bgColor.ansi=se(10),p.bgColor.ansi256=oe(10),p.bgColor.ansi16m=ae(10),Object.defineProperties(p,{rgbToAnsi256:{value(e,t,i){return e===t&&t===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[i]=t;i.length===3&&(i=[...i].map(r=>r+r).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:e=>p.rgbToAnsi256(...p.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,i,n;if(e>=232)t=((e-232)*10+8)/255,i=t,n=t;else{e-=16;let l=e%36;t=Math.floor(e/36)/5,i=Math.floor(l/6)/5,n=l%6/5}let r=Math.max(t,i,n)*2;if(r===0)return 30;let o=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(t));return r===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,t,i)=>p.ansi256ToAnsi(p.rgbToAnsi256(e,t,i)),enumerable:!1},hexToAnsi:{value:e=>p.ansi256ToAnsi(p.hexToAnsi256(e)),enumerable:!1}}),p}var qe=Le(),b=qe;import j from"node:process";import We from"node:os";import he from"node:tty";function g(s,e=j.argv){let t=s.startsWith("-")?"":s.length===1?"-":"--",i=e.indexOf(t+s),n=e.indexOf("--");return i!==-1&&(n===-1||i<n)}var{env:f}=j,H;g("no-color")||g("no-colors")||g("color=false")||g("color=never")?H=0:(g("color")||g("colors")||g("color=true")||g("color=always"))&&(H=1);function Ue(){if("FORCE_COLOR"in f)return f.FORCE_COLOR==="true"?1:f.FORCE_COLOR==="false"?0:f.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(f.FORCE_COLOR,10),3)}function Ge(s){return s===0?!1:{level:s,hasBasic:!0,has256:s>=2,has16m:s>=3}}function Ye(s,{streamIsTTY:e,sniffFlags:t=!0}={}){let i=Ue();i!==void 0&&(H=i);let n=t?H:i;if(n===0)return 0;if(t){if(g("color=16m")||g("color=full")||g("color=truecolor"))return 3;if(g("color=256"))return 2}if(s&&!e&&n===void 0)return 0;let r=n||0;if(f.TERM==="dumb")return r;if(j.platform==="win32"){let o=We.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in f)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in f)||f.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in f)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(f.TEAMCITY_VERSION)?1:0;if("TF_BUILD"in f&&"AGENT_NAME"in f)return 1;if(f.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in f){let o=Number.parseInt((f.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(f.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(f.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(f.TERM)||"COLORTERM"in f?1:r}function ce(s,e={}){let t=Ye(s,{streamIsTTY:s&&s.isTTY,...e});return Ge(t)}var Ke={stdout:ce({isTTY:he.isatty(1)}),stderr:ce({isTTY:he.isatty(2)})},pe=Ke;function me(s,e,t){let i=s.indexOf(e);if(i===-1)return s;let n=e.length,r=0,o="";do o+=s.slice(r,i)+e+t,r=i+n,i=s.indexOf(e,r);while(i!==-1);return o+=s.slice(r),o}function fe(s,e,t,i){let n=0,r="";do{let o=s[i-1]==="\r";r+=s.slice(n,o?i-1:i)+e+(o?`\r
19
+ `),this.outputHelp({error:!0}));let i=r||{},n=i.exitCode||1,s=i.code||"commander.error";this._exit(n,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in J.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,J.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new ed(this.options),r=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&r(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,i.implied[n],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let i=o=>{let a=o.attributeName(),l=this.getOptionValue(a),u=this.options.find(f=>f.negate&&a===f.attributeName()),c=this.options.find(f=>!f.negate&&a===f.attributeName());return u&&(u.presetArg===void 0&&l===!1||u.presetArg!==void 0&&l===u.presetArg)?u:c||o},n=o=>{let a=i(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${n(e)} cannot be used with ${n(r)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);n=n.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);r=Pa(e,n)}let i=`error: unknown option '${e}'${r}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this._args.length,i=r===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${i} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(s=>{n.push(s.name()),s.alias()&&n.push(s.alias())}),r=Pa(e,n)}let i=`error: unknown command '${e}'${r}`;this.error(i,{code:"commander.unknownCommand"})}version(e,r,i){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",i=i||"output the version number";let n=this.createOption(r,i);return this._versionOptionName=n.attributeName(),this.options.push(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
20
+ `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this._args.map(i=>Xp(i));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=qe.basename(e,qe.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp();return r.helpWidth===void 0&&(r.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),r.formatHelp(this,r)}_getHelpContext(e){e=e||{};let r={error:!!e.error},i;return r.error?i=n=>this._outputConfiguration.writeErr(n):i=n=>this._outputConfiguration.writeOut(n),r.write=e.write||i,r.command=this,r}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let i=this._getHelpContext(e);Hr(this).reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation(i);if(r&&(n=r(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),this.emit(this._helpLongFlag),this.emit("afterHelp",i),Hr(this).forEach(s=>s.emit("afterAllHelp",i))}helpOption(e,r){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=r||this._helpDescription;let i=zp(this._helpFlags);return this._helpShortFlag=i.shortFlag,this._helpLongFlag=i.longFlag,this}help(e){this.outputHelp(e);let r=J.exitCode||0;r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
21
+ Expecting one of '${i.join("', '")}'`);let n=`${e}Help`;return this.on(n,s=>{let o;typeof r=="function"?o=r({error:s.error,command:s.command}):o=r,o&&s.write(`${o}
22
+ `)}),this}};function La(t,e){t._hasHelpOption&&e.find(i=>i===t._helpLongFlag||i===t._helpShortFlag)&&(t.outputHelp(),t._exit(0,"commander.helpDisplayed","(outputHelp)"))}function Na(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,i="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?r=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=s[1],/^\d+$/.test(s[3])?n=s[3]:i=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=s[1],i=s[3],n=s[4]),r&&n!=="0"?`${r}=${i}:${parseInt(n)+1}`:e})}function Hr(t){let e=[];for(let r=t;r;r=r.parent)e.push(r);return e}Fa.Command=tr});var $a=g((xe,ja)=>{var{Argument:td}=Mr(),{Command:qa}=Ma(),{CommanderError:rd,InvalidArgumentError:Ha}=er(),{Help:id}=hn(),{Option:nd}=An();xe=ja.exports=new qa;xe.program=xe;xe.Argument=td;xe.Command=qa;xe.CommanderError=rd;xe.Help=id;xe.InvalidArgumentError=Ha;xe.InvalidOptionArgumentError=Ha;xe.Option=nd});var Ga=g(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.splitWhen=wt.flatten=void 0;function sd(t){return t.reduce((e,r)=>[].concat(e,r),[])}wt.flatten=sd;function od(t,e){let r=[[]],i=0;for(let n of t)e(n)?(i++,r[i]=[]):r[i].push(n);return r}wt.splitWhen=od});var Ja=g(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.isEnoentCodeError=void 0;function ad(t){return t.code==="ENOENT"}jr.isEnoentCodeError=ad});var Ya=g($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.createDirentFromStats=void 0;var En=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function ld(t,e){return new En(t,e)}$r.createDirentFromStats=ld});var Va=g(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.removeLeadingDotSegment=Oe.escape=Oe.makeAbsolute=Oe.unixify=void 0;var ud=w("path"),cd=2,fd=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function hd(t){return t.replace(/\\/g,"/")}Oe.unixify=hd;function pd(t,e){return ud.resolve(t,e)}Oe.makeAbsolute=pd;function dd(t){return t.replace(fd,"\\$2")}Oe.escape=dd;function Ad(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(cd)}return t}Oe.removeLeadingDotSegment=Ad});var Xa=g((RC,Wa)=>{Wa.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var el=g((IC,za)=>{var gd=Xa(),Za={"{":"}","(":")","[":"]"},md=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,i=-2,n=-2,s=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||i!==-1&&t[e]==="["&&t[e+1]!=="]"&&(i<e&&(i=t.indexOf("]",e)),i>e&&(o===-1||o>i||(o=t.indexOf("\\",e),o===-1||o>i)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(o=t.indexOf("\\",e),o===-1||o>n))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(o=t.indexOf("\\",e),o===-1||o>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(o=t.indexOf("\\",r),o===-1||o>s))))return!0;if(t[e]==="\\"){var a=t[e+1];e+=2;var l=Za[a];if(l){var u=t.indexOf(l,e);u!==-1&&(e=u+1)}if(t[e]==="!")return!0}else e++}return!1},_d=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var i=Za[r];if(i){var n=t.indexOf(i,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1};za.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(gd(e))return!0;var i=md;return r&&r.strict===!1&&(i=_d),i(e)}});var rl=g((OC,tl)=>{"use strict";var Ed=el(),yd=w("path").posix.dirname,Cd=w("os").platform()==="win32",yn="/",bd=/\\/g,vd=/[\{\[].*[\}\]]$/,xd=/(^|[^\\])([\{\[]|\([^\)]+$)/,wd=/\\([\!\*\?\|\[\]\(\)\{\}])/g;tl.exports=function(e,r){var i=Object.assign({flipBackslashes:!0},r);i.flipBackslashes&&Cd&&e.indexOf(yn)<0&&(e=e.replace(bd,yn)),vd.test(e)&&(e+=yn),e+="a";do e=yd(e);while(Ed(e)||xd.test(e));return e.replace(wd,"$1")}});var Kr=g(me=>{"use strict";me.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;me.find=(t,e)=>t.nodes.find(r=>r.type===e);me.exceedsLimit=(t,e,r=1,i)=>i===!1||!me.isInteger(t)||!me.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=i;me.escapeNode=(t,e=0,r)=>{let i=t.nodes[e];!i||(r&&i.type===r||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)};me.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;me.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;me.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;me.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);me.flatten=(...t)=>{let e=[],r=i=>{for(let n=0;n<i.length;n++){let s=i[n];Array.isArray(s)?r(s,e):s!==void 0&&e.push(s)}return e};return r(t),e}});var Ur=g((kC,nl)=>{"use strict";var il=Kr();nl.exports=(t,e={})=>{let r=(i,n={})=>{let s=e.escapeInvalid&&il.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a="";if(i.value)return(s||o)&&il.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(let l of i.nodes)a+=r(l);return a};return r(t)}});var ol=g((DC,sl)=>{"use strict";sl.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var Al=g((PC,dl)=>{"use strict";var al=ol(),ot=(t,e,r)=>{if(al(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(al(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...r};typeof i.strictZeros=="boolean"&&(i.relaxZeros=i.strictZeros===!1);let n=String(i.relaxZeros),s=String(i.shorthand),o=String(i.capture),a=String(i.wrap),l=t+":"+e+"="+n+s+o+a;if(ot.cache.hasOwnProperty(l))return ot.cache[l].result;let u=Math.min(t,e),c=Math.max(t,e);if(Math.abs(u-c)===1){let _=t+"|"+e;return i.capture?`(${_})`:i.wrap===!1?_:`(?:${_})`}let f=pl(t)||pl(e),h={min:t,max:e,a:u,b:c},y=[],A=[];if(f&&(h.isPadded=f,h.maxLen=String(h.max).length),u<0){let _=c<0?Math.abs(c):1;A=ll(_,Math.abs(u),h,i),u=h.a=0}return c>=0&&(y=ll(u,c,h,i)),h.negatives=A,h.positives=y,h.result=Sd(A,y,i),i.capture===!0?h.result=`(${h.result})`:i.wrap!==!1&&y.length+A.length>1&&(h.result=`(?:${h.result})`),ot.cache[l]=h,h.result};function Sd(t,e,r){let i=Cn(t,e,"-",!1,r)||[],n=Cn(e,t,"",!1,r)||[],s=Cn(t,e,"-?",!0,r)||[];return i.concat(s).concat(n).join("|")}function Bd(t,e){let r=1,i=1,n=cl(t,r),s=new Set([e]);for(;t<=n&&n<=e;)s.add(n),r+=1,n=cl(t,r);for(n=fl(e+1,i)-1;t<n&&n<=e;)s.add(n),i+=1,n=fl(e+1,i)-1;return s=[...s],s.sort(Id),s}function Qd(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let i=Rd(t,e),n=i.length,s="",o=0;for(let a=0;a<n;a++){let[l,u]=i[a];l===u?s+=l:l!=="0"||u!=="9"?s+=Od(l,u,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:n}}function ll(t,e,r,i){let n=Bd(t,e),s=[],o=t,a;for(let l=0;l<n.length;l++){let u=n[l],c=Qd(String(o),String(u),i),f="";if(!r.isPadded&&a&&a.pattern===c.pattern){a.count.length>1&&a.count.pop(),a.count.push(c.count[0]),a.string=a.pattern+hl(a.count),o=u+1;continue}r.isPadded&&(f=Td(u,r,i)),c.string=f+c.pattern+hl(c.count),s.push(c),o=u+1,a=c}return s}function Cn(t,e,r,i,n){let s=[];for(let o of t){let{string:a}=o;!i&&!ul(e,"string",a)&&s.push(r+a),i&&ul(e,"string",a)&&s.push(r+a)}return s}function Rd(t,e){let r=[];for(let i=0;i<t.length;i++)r.push([t[i],e[i]]);return r}function Id(t,e){return t>e?1:e>t?-1:0}function ul(t,e,r){return t.some(i=>i[e]===r)}function cl(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function fl(t,e){return t-t%Math.pow(10,e)}function hl(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function Od(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function pl(t){return/^-?(0+)\d/.test(t)}function Td(t,e,r){if(!e.isPadded)return t;let i=Math.abs(e.maxLen-String(t).length),n=r.relaxZeros!==!1;switch(i){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${i}}`:`0{${i}}`}}ot.cache={};ot.clearCache=()=>ot.cache={};dl.exports=ot});var xn=g((LC,vl)=>{"use strict";var kd=w("util"),_l=Al(),gl=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Dd=t=>e=>t===!0?Number(e):String(e),bn=t=>typeof t=="number"||typeof t=="string"&&t!=="",rr=t=>Number.isInteger(+t),vn=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},Pd=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,Ld=(t,e,r)=>{if(e>0){let i=t[0]==="-"?"-":"";i&&(t=t.slice(1)),t=i+t.padStart(i?e-1:e,"0")}return r===!1?String(t):t},ml=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},Nd=(t,e)=>{t.negatives.sort((o,a)=>o<a?-1:o>a?1:0),t.positives.sort((o,a)=>o<a?-1:o>a?1:0);let r=e.capture?"":"?:",i="",n="",s;return t.positives.length&&(i=t.positives.join("|")),t.negatives.length&&(n=`-(${r}${t.negatives.join("|")})`),i&&n?s=`${i}|${n}`:s=i||n,e.wrap?`(${r}${s})`:s},El=(t,e,r,i)=>{if(r)return _l(t,e,{wrap:!1,...i});let n=String.fromCharCode(t);if(t===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},yl=(t,e,r)=>{if(Array.isArray(t)){let i=r.wrap===!0,n=r.capture?"":"?:";return i?`(${n}${t.join("|")})`:t.join("|")}return _l(t,e,r)},Cl=(...t)=>new RangeError("Invalid range arguments: "+kd.inspect(...t)),bl=(t,e,r)=>{if(r.strictRanges===!0)throw Cl([t,e]);return[]},Fd=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},Md=(t,e,r=1,i={})=>{let n=Number(t),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(i.strictRanges===!0)throw Cl([t,e]);return[]}n===0&&(n=0),s===0&&(s=0);let o=n>s,a=String(t),l=String(e),u=String(r);r=Math.max(Math.abs(r),1);let c=vn(a)||vn(l)||vn(u),f=c?Math.max(a.length,l.length,u.length):0,h=c===!1&&Pd(t,e,i)===!1,y=i.transform||Dd(h);if(i.toRegex&&r===1)return El(ml(t,f),ml(e,f),!0,i);let A={negatives:[],positives:[]},_=D=>A[D<0?"negatives":"positives"].push(Math.abs(D)),v=[],b=0;for(;o?n>=s:n<=s;)i.toRegex===!0&&r>1?_(n):v.push(Ld(y(n,b),f,h)),n=o?n-r:n+r,b++;return i.toRegex===!0?r>1?Nd(A,i):yl(v,null,{wrap:!1,...i}):v},qd=(t,e,r=1,i={})=>{if(!rr(t)&&t.length>1||!rr(e)&&e.length>1)return bl(t,e,i);let n=i.transform||(h=>String.fromCharCode(h)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,l=Math.min(s,o),u=Math.max(s,o);if(i.toRegex&&r===1)return El(l,u,!1,i);let c=[],f=0;for(;a?s>=o:s<=o;)c.push(n(s,f)),s=a?s-r:s+r,f++;return i.toRegex===!0?yl(c,null,{wrap:!1,options:i}):c},Gr=(t,e,r,i={})=>{if(e==null&&bn(t))return[t];if(!bn(t)||!bn(e))return bl(t,e,i);if(typeof r=="function")return Gr(t,e,1,{transform:r});if(gl(r))return Gr(t,e,0,r);let n={...i};return n.capture===!0&&(n.wrap=!0),r=r||n.step||1,rr(r)?rr(t)&&rr(e)?Md(t,e,r,n):qd(t,e,Math.max(Math.abs(r),1),n):r!=null&&!gl(r)?Fd(r,n):Gr(t,e,1,r)};vl.exports=Gr});var Sl=g((NC,wl)=>{"use strict";var Hd=xn(),xl=Kr(),jd=(t,e={})=>{let r=(i,n={})=>{let s=xl.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,l=e.escapeInvalid===!0?"\\":"",u="";if(i.isOpen===!0||i.isClose===!0)return l+i.value;if(i.type==="open")return a?l+i.value:"(";if(i.type==="close")return a?l+i.value:")";if(i.type==="comma")return i.prev.type==="comma"?"":a?i.value:"|";if(i.value)return i.value;if(i.nodes&&i.ranges>0){let c=xl.reduce(i.nodes),f=Hd(...c,{...e,wrap:!1,toRegex:!0});if(f.length!==0)return c.length>1&&f.length>1?`(${f})`:f}if(i.nodes)for(let c of i.nodes)u+=r(c,i);return u};return r(t)};wl.exports=jd});var Rl=g((FC,Ql)=>{"use strict";var $d=xn(),Bl=Ur(),St=Kr(),at=(t="",e="",r=!1)=>{let i=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?St.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let s of n)i.push(at(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),i.push(Array.isArray(s)?at(n,s,r):n+s);return St.flatten(i)},Kd=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,i=(n,s={})=>{n.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(n.invalid||n.dollar){a.push(at(a.pop(),Bl(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){a.push(at(a.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let f=St.reduce(n.nodes);if(St.exceedsLimit(...f,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let h=$d(...f,e);h.length===0&&(h=Bl(n,e)),a.push(at(a.pop(),h)),n.nodes=[];return}let l=St.encloseBrace(n),u=n.queue,c=n;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,u=c.queue;for(let f=0;f<n.nodes.length;f++){let h=n.nodes[f];if(h.type==="comma"&&n.type==="brace"){f===1&&u.push(""),u.push("");continue}if(h.type==="close"){a.push(at(a.pop(),u,l));continue}if(h.value&&h.type!=="open"){u.push(at(u.pop(),h.value));continue}h.nodes&&i(h,n)}return u};return St.flatten(i(t))};Ql.exports=Kd});var Ol=g((MC,Il)=>{"use strict";Il.exports={MAX_LENGTH:1024*64,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:`
23
+ `,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:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Ll=g((qC,Pl)=>{"use strict";var Ud=Ur(),{MAX_LENGTH:Tl,CHAR_BACKSLASH:wn,CHAR_BACKTICK:Gd,CHAR_COMMA:Jd,CHAR_DOT:Yd,CHAR_LEFT_PARENTHESES:Vd,CHAR_RIGHT_PARENTHESES:Wd,CHAR_LEFT_CURLY_BRACE:Xd,CHAR_RIGHT_CURLY_BRACE:Zd,CHAR_LEFT_SQUARE_BRACKET:kl,CHAR_RIGHT_SQUARE_BRACKET:Dl,CHAR_DOUBLE_QUOTE:zd,CHAR_SINGLE_QUOTE:eA,CHAR_NO_BREAK_SPACE:tA,CHAR_ZERO_WIDTH_NOBREAK_SPACE:rA}=Ol(),iA=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},i=typeof r.maxLength=="number"?Math.min(Tl,r.maxLength):Tl;if(t.length>i)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${i})`);let n={type:"root",input:t,nodes:[]},s=[n],o=n,a=n,l=0,u=t.length,c=0,f=0,h,y={},A=()=>t[c++],_=v=>{if(v.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&v.type==="text"){a.value+=v.value;return}return o.nodes.push(v),v.parent=o,v.prev=a,a=v,v};for(_({type:"bos"});c<u;)if(o=s[s.length-1],h=A(),!(h===rA||h===tA)){if(h===wn){_({type:"text",value:(e.keepEscaping?h:"")+A()});continue}if(h===Dl){_({type:"text",value:"\\"+h});continue}if(h===kl){l++;let v=!0,b;for(;c<u&&(b=A());){if(h+=b,b===kl){l++;continue}if(b===wn){h+=A();continue}if(b===Dl&&(l--,l===0))break}_({type:"text",value:h});continue}if(h===Vd){o=_({type:"paren",nodes:[]}),s.push(o),_({type:"text",value:h});continue}if(h===Wd){if(o.type!=="paren"){_({type:"text",value:h});continue}o=s.pop(),_({type:"text",value:h}),o=s[s.length-1];continue}if(h===zd||h===eA||h===Gd){let v=h,b;for(e.keepQuotes!==!0&&(h="");c<u&&(b=A());){if(b===wn){h+=b+A();continue}if(b===v){e.keepQuotes===!0&&(h+=b);break}h+=b}_({type:"text",value:h});continue}if(h===Xd){f++;let b={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:f,commas:0,ranges:0,nodes:[]};o=_(b),s.push(o),_({type:"open",value:h});continue}if(h===Zd){if(o.type!=="brace"){_({type:"text",value:h});continue}let v="close";o=s.pop(),o.close=!0,_({type:v,value:h}),f--,o=s[s.length-1];continue}if(h===Jd&&f>0){if(o.ranges>0){o.ranges=0;let v=o.nodes.shift();o.nodes=[v,{type:"text",value:Ud(o)}]}_({type:"comma",value:h}),o.commas++;continue}if(h===Yd&&f>0&&o.commas===0){let v=o.nodes;if(f===0||v.length===0){_({type:"text",value:h});continue}if(a.type==="dot"){if(o.range=[],a.value+=h,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){v.pop();let b=v[v.length-1];b.value+=a.value+h,a=b,o.ranges--;continue}_({type:"dot",value:h});continue}_({type:"text",value:h})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(D=>{D.nodes||(D.type==="open"&&(D.isOpen=!0),D.type==="close"&&(D.isClose=!0),D.nodes||(D.type="text"),D.invalid=!0)});let v=s[s.length-1],b=v.nodes.indexOf(o);v.nodes.splice(b,1,...o.nodes)}while(s.length>0);return _({type:"eos"}),n};Pl.exports=iA});var Ml=g((HC,Fl)=>{"use strict";var Nl=Ur(),nA=Sl(),sA=Rl(),oA=Ll(),pe=(t,e={})=>{let r=[];if(Array.isArray(t))for(let i of t){let n=pe.create(i,e);Array.isArray(n)?r.push(...n):r.push(n)}else r=[].concat(pe.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};pe.parse=(t,e={})=>oA(t,e);pe.stringify=(t,e={})=>Nl(typeof t=="string"?pe.parse(t,e):t,e);pe.compile=(t,e={})=>(typeof t=="string"&&(t=pe.parse(t,e)),nA(t,e));pe.expand=(t,e={})=>{typeof t=="string"&&(t=pe.parse(t,e));let r=sA(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};pe.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?pe.compile(t,e):pe.expand(t,e);Fl.exports=pe});var ir=g((jC,Kl)=>{"use strict";var aA=w("path"),Te="\\\\/",ql=`[^${Te}]`,He="\\.",lA="\\+",uA="\\?",Jr="\\/",cA="(?=.)",Hl="[^/]",Sn=`(?:${Jr}|$)`,jl=`(?:^|${Jr})`,Bn=`${He}{1,2}${Sn}`,fA=`(?!${He})`,hA=`(?!${jl}${Bn})`,pA=`(?!${He}{0,1}${Sn})`,dA=`(?!${Bn})`,AA=`[^.${Jr}]`,gA=`${Hl}*?`,$l={DOT_LITERAL:He,PLUS_LITERAL:lA,QMARK_LITERAL:uA,SLASH_LITERAL:Jr,ONE_CHAR:cA,QMARK:Hl,END_ANCHOR:Sn,DOTS_SLASH:Bn,NO_DOT:fA,NO_DOTS:hA,NO_DOT_SLASH:pA,NO_DOTS_SLASH:dA,QMARK_NO_DOT:AA,STAR:gA,START_ANCHOR:jl},mA={...$l,SLASH_LITERAL:`[${Te}]`,QMARK:ql,STAR:`${ql}*?`,DOTS_SLASH:`${He}{1,2}(?:[${Te}]|$)`,NO_DOT:`(?!${He})`,NO_DOTS:`(?!(?:^|[${Te}])${He}{1,2}(?:[${Te}]|$))`,NO_DOT_SLASH:`(?!${He}{0,1}(?:[${Te}]|$))`,NO_DOTS_SLASH:`(?!${He}{1,2}(?:[${Te}]|$))`,QMARK_NO_DOT:`[^.${Te}]`,START_ANCHOR:`(?:^|[${Te}])`,END_ANCHOR:`(?:[${Te}]|$)`},_A={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"};Kl.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:_A,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:aA.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?mA:$l}}});var nr=g(ce=>{"use strict";var EA=w("path"),yA=process.platform==="win32",{REGEX_BACKSLASH:CA,REGEX_REMOVE_BACKSLASH:bA,REGEX_SPECIAL_CHARS:vA,REGEX_SPECIAL_CHARS_GLOBAL:xA}=ir();ce.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);ce.hasRegexChars=t=>vA.test(t);ce.isRegexChar=t=>t.length===1&&ce.hasRegexChars(t);ce.escapeRegex=t=>t.replace(xA,"\\$1");ce.toPosixSlashes=t=>t.replace(CA,"/");ce.removeBackslashes=t=>t.replace(bA,e=>e==="\\"?"":e);ce.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};ce.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:yA===!0||EA.sep==="\\";ce.escapeLast=(t,e,r)=>{let i=t.lastIndexOf(e,r);return i===-1?t:t[i-1]==="\\"?ce.escapeLast(t,e,i-1):`${t.slice(0,i)}\\${t.slice(i)}`};ce.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};ce.wrapOutput=(t,e={},r={})=>{let i=r.contains?"":"^",n=r.contains?"":"$",s=`${i}(?:${t})${n}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var Zl=g((KC,Xl)=>{"use strict";var Ul=nr(),{CHAR_ASTERISK:Qn,CHAR_AT:wA,CHAR_BACKWARD_SLASH:sr,CHAR_COMMA:SA,CHAR_DOT:Rn,CHAR_EXCLAMATION_MARK:In,CHAR_FORWARD_SLASH:Wl,CHAR_LEFT_CURLY_BRACE:On,CHAR_LEFT_PARENTHESES:Tn,CHAR_LEFT_SQUARE_BRACKET:BA,CHAR_PLUS:QA,CHAR_QUESTION_MARK:Gl,CHAR_RIGHT_CURLY_BRACE:RA,CHAR_RIGHT_PARENTHESES:Jl,CHAR_RIGHT_SQUARE_BRACKET:IA}=ir(),Yl=t=>t===Wl||t===sr,Vl=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},OA=(t,e)=>{let r=e||{},i=t.length-1,n=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],l=t,u=-1,c=0,f=0,h=!1,y=!1,A=!1,_=!1,v=!1,b=!1,D=!1,F=!1,ie=!1,Q=!1,M=0,I,x,L={value:"",depth:0,isGlob:!1},te=()=>u>=i,m=()=>l.charCodeAt(u+1),j=()=>(I=x,l.charCodeAt(++u));for(;u<i;){x=j();let se;if(x===sr){D=L.backslashes=!0,x=j(),x===On&&(b=!0);continue}if(b===!0||x===On){for(M++;te()!==!0&&(x=j());){if(x===sr){D=L.backslashes=!0,j();continue}if(x===On){M++;continue}if(b!==!0&&x===Rn&&(x=j())===Rn){if(h=L.isBrace=!0,A=L.isGlob=!0,Q=!0,n===!0)continue;break}if(b!==!0&&x===SA){if(h=L.isBrace=!0,A=L.isGlob=!0,Q=!0,n===!0)continue;break}if(x===RA&&(M--,M===0)){b=!1,h=L.isBrace=!0,Q=!0;break}}if(n===!0)continue;break}if(x===Wl){if(s.push(u),o.push(L),L={value:"",depth:0,isGlob:!1},Q===!0)continue;if(I===Rn&&u===c+1){c+=2;continue}f=u+1;continue}if(r.noext!==!0&&(x===QA||x===wA||x===Qn||x===Gl||x===In)===!0&&m()===Tn){if(A=L.isGlob=!0,_=L.isExtglob=!0,Q=!0,x===In&&u===c&&(ie=!0),n===!0){for(;te()!==!0&&(x=j());){if(x===sr){D=L.backslashes=!0,x=j();continue}if(x===Jl){A=L.isGlob=!0,Q=!0;break}}continue}break}if(x===Qn){if(I===Qn&&(v=L.isGlobstar=!0),A=L.isGlob=!0,Q=!0,n===!0)continue;break}if(x===Gl){if(A=L.isGlob=!0,Q=!0,n===!0)continue;break}if(x===BA){for(;te()!==!0&&(se=j());){if(se===sr){D=L.backslashes=!0,j();continue}if(se===IA){y=L.isBracket=!0,A=L.isGlob=!0,Q=!0;break}}if(n===!0)continue;break}if(r.nonegate!==!0&&x===In&&u===c){F=L.negated=!0,c++;continue}if(r.noparen!==!0&&x===Tn){if(A=L.isGlob=!0,n===!0){for(;te()!==!0&&(x=j());){if(x===Tn){D=L.backslashes=!0,x=j();continue}if(x===Jl){Q=!0;break}}continue}break}if(A===!0){if(Q=!0,n===!0)continue;break}}r.noext===!0&&(_=!1,A=!1);let $=l,B="",p="";c>0&&(B=l.slice(0,c),l=l.slice(c),f-=c),$&&A===!0&&f>0?($=l.slice(0,f),p=l.slice(f)):A===!0?($="",p=l):$=l,$&&$!==""&&$!=="/"&&$!==l&&Yl($.charCodeAt($.length-1))&&($=$.slice(0,-1)),r.unescape===!0&&(p&&(p=Ul.removeBackslashes(p)),$&&D===!0&&($=Ul.removeBackslashes($)));let d={prefix:B,input:t,start:c,base:$,glob:p,isBrace:h,isBracket:y,isGlob:A,isExtglob:_,isGlobstar:v,negated:F,negatedExtglob:ie};if(r.tokens===!0&&(d.maxDepth=0,Yl(x)||o.push(L),d.tokens=o),r.parts===!0||r.tokens===!0){let se;for(let N=0;N<s.length;N++){let Qe=se?se+1:c,Re=s[N],he=t.slice(Qe,Re);r.tokens&&(N===0&&c!==0?(o[N].isPrefix=!0,o[N].value=B):o[N].value=he,Vl(o[N]),d.maxDepth+=o[N].depth),(N!==0||he!=="")&&a.push(he),se=Re}if(se&&se+1<t.length){let N=t.slice(se+1);a.push(N),r.tokens&&(o[o.length-1].value=N,Vl(o[o.length-1]),d.maxDepth+=o[o.length-1].depth)}d.slashes=s,d.parts=a}return d};Xl.exports=OA});var tu=g((UC,eu)=>{"use strict";var Yr=ir(),de=nr(),{MAX_LENGTH:Vr,POSIX_REGEX_SOURCE:TA,REGEX_NON_SPECIAL_CHARS:kA,REGEX_SPECIAL_CHARS_BACKREF:DA,REPLACEMENTS:zl}=Yr,PA=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(n=>de.escapeRegex(n)).join("..")}return r},Bt=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,kn=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=zl[t]||t;let r={...e},i=typeof r.maxLength=="number"?Math.min(Vr,r.maxLength):Vr,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",l=de.isWindows(e),u=Yr.globChars(l),c=Yr.extglobChars(u),{DOT_LITERAL:f,PLUS_LITERAL:h,SLASH_LITERAL:y,ONE_CHAR:A,DOTS_SLASH:_,NO_DOT:v,NO_DOT_SLASH:b,NO_DOTS_SLASH:D,QMARK:F,QMARK_NO_DOT:ie,STAR:Q,START_ANCHOR:M}=u,I=C=>`(${a}(?:(?!${M}${C.dot?_:f}).)*?)`,x=r.dot?"":v,L=r.dot?F:ie,te=r.bash===!0?I(r):Q;r.capture&&(te=`(${te})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let m={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=de.removePrefix(t,m),n=t.length;let j=[],$=[],B=[],p=s,d,se=()=>m.index===n-1,N=m.peek=(C=1)=>t[m.index+C],Qe=m.advance=()=>t[++m.index]||"",Re=()=>t.slice(m.index+1),he=(C="",U=0)=>{m.consumed+=C,m.index+=U},Tr=C=>{m.output+=C.output!=null?C.output:C.value,he(C.value)},Cp=()=>{let C=1;for(;N()==="!"&&(N(2)!=="("||N(3)==="?");)Qe(),m.start++,C++;return C%2===0?!1:(m.negated=!0,m.start++,!0)},kr=C=>{m[C]++,B.push(C)},st=C=>{m[C]--,B.pop()},k=C=>{if(p.type==="globstar"){let U=m.braces>0&&(C.type==="comma"||C.type==="brace"),E=C.extglob===!0||j.length&&(C.type==="pipe"||C.type==="paren");C.type!=="slash"&&C.type!=="paren"&&!U&&!E&&(m.output=m.output.slice(0,-p.output.length),p.type="star",p.value="*",p.output=te,m.output+=p.output)}if(j.length&&C.type!=="paren"&&(j[j.length-1].inner+=C.value),(C.value||C.output)&&Tr(C),p&&p.type==="text"&&C.type==="text"){p.value+=C.value,p.output=(p.output||"")+C.value;return}C.prev=p,o.push(C),p=C},Dr=(C,U)=>{let E={...c[U],conditions:1,inner:""};E.prev=p,E.parens=m.parens,E.output=m.output;let O=(r.capture?"(":"")+E.open;kr("parens"),k({type:C,value:U,output:m.output?"":A}),k({type:"paren",extglob:!0,value:Qe(),output:O}),j.push(E)},bp=C=>{let U=C.close+(r.capture?")":""),E;if(C.type==="negate"){let O=te;if(C.inner&&C.inner.length>1&&C.inner.includes("/")&&(O=I(r)),(O!==te||se()||/^\)+$/.test(Re()))&&(U=C.close=`)$))${O}`),C.inner.includes("*")&&(E=Re())&&/^\.[^\\/.]+$/.test(E)){let W=kn(E,{...e,fastpaths:!1}).output;U=C.close=`)${W})${O})`}C.prev.type==="bos"&&(m.negatedExtglob=!0)}k({type:"paren",extglob:!0,value:d,output:U}),st("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let C=!1,U=t.replace(DA,(E,O,W,ue,re,zi)=>ue==="\\"?(C=!0,E):ue==="?"?O?O+ue+(re?F.repeat(re.length):""):zi===0?L+(re?F.repeat(re.length):""):F.repeat(W.length):ue==="."?f.repeat(W.length):ue==="*"?O?O+ue+(re?te:""):te:O?E:`\\${E}`);return C===!0&&(r.unescape===!0?U=U.replace(/\\/g,""):U=U.replace(/\\+/g,E=>E.length%2===0?"\\\\":E?"\\":"")),U===t&&r.contains===!0?(m.output=t,m):(m.output=de.wrapOutput(U,m,e),m)}for(;!se();){if(d=Qe(),d==="\0")continue;if(d==="\\"){let E=N();if(E==="/"&&r.bash!==!0||E==="."||E===";")continue;if(!E){d+="\\",k({type:"text",value:d});continue}let O=/^\\+/.exec(Re()),W=0;if(O&&O[0].length>2&&(W=O[0].length,m.index+=W,W%2!==0&&(d+="\\")),r.unescape===!0?d=Qe():d+=Qe(),m.brackets===0){k({type:"text",value:d});continue}}if(m.brackets>0&&(d!=="]"||p.value==="["||p.value==="[^")){if(r.posix!==!1&&d===":"){let E=p.value.slice(1);if(E.includes("[")&&(p.posix=!0,E.includes(":"))){let O=p.value.lastIndexOf("["),W=p.value.slice(0,O),ue=p.value.slice(O+2),re=TA[ue];if(re){p.value=W+re,m.backtrack=!0,Qe(),!s.output&&o.indexOf(p)===1&&(s.output=A);continue}}}(d==="["&&N()!==":"||d==="-"&&N()==="]")&&(d=`\\${d}`),d==="]"&&(p.value==="["||p.value==="[^")&&(d=`\\${d}`),r.posix===!0&&d==="!"&&p.value==="["&&(d="^"),p.value+=d,Tr({value:d});continue}if(m.quotes===1&&d!=='"'){d=de.escapeRegex(d),p.value+=d,Tr({value:d});continue}if(d==='"'){m.quotes=m.quotes===1?0:1,r.keepQuotes===!0&&k({type:"text",value:d});continue}if(d==="("){kr("parens"),k({type:"paren",value:d});continue}if(d===")"){if(m.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Bt("opening","("));let E=j[j.length-1];if(E&&m.parens===E.parens+1){bp(j.pop());continue}k({type:"paren",value:d,output:m.parens?")":"\\)"}),st("parens");continue}if(d==="["){if(r.nobracket===!0||!Re().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Bt("closing","]"));d=`\\${d}`}else kr("brackets");k({type:"bracket",value:d});continue}if(d==="]"){if(r.nobracket===!0||p&&p.type==="bracket"&&p.value.length===1){k({type:"text",value:d,output:`\\${d}`});continue}if(m.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Bt("opening","["));k({type:"text",value:d,output:`\\${d}`});continue}st("brackets");let E=p.value.slice(1);if(p.posix!==!0&&E[0]==="^"&&!E.includes("/")&&(d=`/${d}`),p.value+=d,Tr({value:d}),r.literalBrackets===!1||de.hasRegexChars(E))continue;let O=de.escapeRegex(p.value);if(m.output=m.output.slice(0,-p.value.length),r.literalBrackets===!0){m.output+=O,p.value=O;continue}p.value=`(${a}${O}|${p.value})`,m.output+=p.value;continue}if(d==="{"&&r.nobrace!==!0){kr("braces");let E={type:"brace",value:d,output:"(",outputIndex:m.output.length,tokensIndex:m.tokens.length};$.push(E),k(E);continue}if(d==="}"){let E=$[$.length-1];if(r.nobrace===!0||!E){k({type:"text",value:d,output:d});continue}let O=")";if(E.dots===!0){let W=o.slice(),ue=[];for(let re=W.length-1;re>=0&&(o.pop(),W[re].type!=="brace");re--)W[re].type!=="dots"&&ue.unshift(W[re].value);O=PA(ue,r),m.backtrack=!0}if(E.comma!==!0&&E.dots!==!0){let W=m.output.slice(0,E.outputIndex),ue=m.tokens.slice(E.tokensIndex);E.value=E.output="\\{",d=O="\\}",m.output=W;for(let re of ue)m.output+=re.output||re.value}k({type:"brace",value:d,output:O}),st("braces"),$.pop();continue}if(d==="|"){j.length>0&&j[j.length-1].conditions++,k({type:"text",value:d});continue}if(d===","){let E=d,O=$[$.length-1];O&&B[B.length-1]==="braces"&&(O.comma=!0,E="|"),k({type:"comma",value:d,output:E});continue}if(d==="/"){if(p.type==="dot"&&m.index===m.start+1){m.start=m.index+1,m.consumed="",m.output="",o.pop(),p=s;continue}k({type:"slash",value:d,output:y});continue}if(d==="."){if(m.braces>0&&p.type==="dot"){p.value==="."&&(p.output=f);let E=$[$.length-1];p.type="dots",p.output+=d,p.value+=d,E.dots=!0;continue}if(m.braces+m.parens===0&&p.type!=="bos"&&p.type!=="slash"){k({type:"text",value:d,output:f});continue}k({type:"dot",value:d,output:f});continue}if(d==="?"){if(!(p&&p.value==="(")&&r.noextglob!==!0&&N()==="("&&N(2)!=="?"){Dr("qmark",d);continue}if(p&&p.type==="paren"){let O=N(),W=d;if(O==="<"&&!de.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(p.value==="("&&!/[!=<:]/.test(O)||O==="<"&&!/<([!=]|\w+>)/.test(Re()))&&(W=`\\${d}`),k({type:"text",value:d,output:W});continue}if(r.dot!==!0&&(p.type==="slash"||p.type==="bos")){k({type:"qmark",value:d,output:ie});continue}k({type:"qmark",value:d,output:F});continue}if(d==="!"){if(r.noextglob!==!0&&N()==="("&&(N(2)!=="?"||!/[!=<:]/.test(N(3)))){Dr("negate",d);continue}if(r.nonegate!==!0&&m.index===0){Cp();continue}}if(d==="+"){if(r.noextglob!==!0&&N()==="("&&N(2)!=="?"){Dr("plus",d);continue}if(p&&p.value==="("||r.regex===!1){k({type:"plus",value:d,output:h});continue}if(p&&(p.type==="bracket"||p.type==="paren"||p.type==="brace")||m.parens>0){k({type:"plus",value:d});continue}k({type:"plus",value:h});continue}if(d==="@"){if(r.noextglob!==!0&&N()==="("&&N(2)!=="?"){k({type:"at",extglob:!0,value:d,output:""});continue}k({type:"text",value:d});continue}if(d!=="*"){(d==="$"||d==="^")&&(d=`\\${d}`);let E=kA.exec(Re());E&&(d+=E[0],m.index+=E[0].length),k({type:"text",value:d});continue}if(p&&(p.type==="globstar"||p.star===!0)){p.type="star",p.star=!0,p.value+=d,p.output=te,m.backtrack=!0,m.globstar=!0,he(d);continue}let C=Re();if(r.noextglob!==!0&&/^\([^?]/.test(C)){Dr("star",d);continue}if(p.type==="star"){if(r.noglobstar===!0){he(d);continue}let E=p.prev,O=E.prev,W=E.type==="slash"||E.type==="bos",ue=O&&(O.type==="star"||O.type==="globstar");if(r.bash===!0&&(!W||C[0]&&C[0]!=="/")){k({type:"star",value:d,output:""});continue}let re=m.braces>0&&(E.type==="comma"||E.type==="brace"),zi=j.length&&(E.type==="pipe"||E.type==="paren");if(!W&&E.type!=="paren"&&!re&&!zi){k({type:"star",value:d,output:""});continue}for(;C.slice(0,3)==="/**";){let Pr=t[m.index+4];if(Pr&&Pr!=="/")break;C=C.slice(3),he("/**",3)}if(E.type==="bos"&&se()){p.type="globstar",p.value+=d,p.output=I(r),m.output=p.output,m.globstar=!0,he(d);continue}if(E.type==="slash"&&E.prev.type!=="bos"&&!ue&&se()){m.output=m.output.slice(0,-(E.output+p.output).length),E.output=`(?:${E.output}`,p.type="globstar",p.output=I(r)+(r.strictSlashes?")":"|$)"),p.value+=d,m.globstar=!0,m.output+=E.output+p.output,he(d);continue}if(E.type==="slash"&&E.prev.type!=="bos"&&C[0]==="/"){let Pr=C[1]!==void 0?"|$":"";m.output=m.output.slice(0,-(E.output+p.output).length),E.output=`(?:${E.output}`,p.type="globstar",p.output=`${I(r)}${y}|${y}${Pr})`,p.value+=d,m.output+=E.output+p.output,m.globstar=!0,he(d+Qe()),k({type:"slash",value:"/",output:""});continue}if(E.type==="bos"&&C[0]==="/"){p.type="globstar",p.value+=d,p.output=`(?:^|${y}|${I(r)}${y})`,m.output=p.output,m.globstar=!0,he(d+Qe()),k({type:"slash",value:"/",output:""});continue}m.output=m.output.slice(0,-p.output.length),p.type="globstar",p.output=I(r),p.value+=d,m.output+=p.output,m.globstar=!0,he(d);continue}let U={type:"star",value:d,output:te};if(r.bash===!0){U.output=".*?",(p.type==="bos"||p.type==="slash")&&(U.output=x+U.output),k(U);continue}if(p&&(p.type==="bracket"||p.type==="paren")&&r.regex===!0){U.output=d,k(U);continue}(m.index===m.start||p.type==="slash"||p.type==="dot")&&(p.type==="dot"?(m.output+=b,p.output+=b):r.dot===!0?(m.output+=D,p.output+=D):(m.output+=x,p.output+=x),N()!=="*"&&(m.output+=A,p.output+=A)),k(U)}for(;m.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Bt("closing","]"));m.output=de.escapeLast(m.output,"["),st("brackets")}for(;m.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Bt("closing",")"));m.output=de.escapeLast(m.output,"("),st("parens")}for(;m.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Bt("closing","}"));m.output=de.escapeLast(m.output,"{"),st("braces")}if(r.strictSlashes!==!0&&(p.type==="star"||p.type==="bracket")&&k({type:"maybe_slash",value:"",output:`${y}?`}),m.backtrack===!0){m.output="";for(let C of m.tokens)m.output+=C.output!=null?C.output:C.value,C.suffix&&(m.output+=C.suffix)}return m};kn.fastpaths=(t,e)=>{let r={...e},i=typeof r.maxLength=="number"?Math.min(Vr,r.maxLength):Vr,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);t=zl[t]||t;let s=de.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:l,DOTS_SLASH:u,NO_DOT:c,NO_DOTS:f,NO_DOTS_SLASH:h,STAR:y,START_ANCHOR:A}=Yr.globChars(s),_=r.dot?f:c,v=r.dot?h:c,b=r.capture?"":"?:",D={negated:!1,prefix:""},F=r.bash===!0?".*?":y;r.capture&&(F=`(${F})`);let ie=x=>x.noglobstar===!0?F:`(${b}(?:(?!${A}${x.dot?u:o}).)*?)`,Q=x=>{switch(x){case"*":return`${_}${l}${F}`;case".*":return`${o}${l}${F}`;case"*.*":return`${_}${F}${o}${l}${F}`;case"*/*":return`${_}${F}${a}${l}${v}${F}`;case"**":return _+ie(r);case"**/*":return`(?:${_}${ie(r)}${a})?${v}${l}${F}`;case"**/*.*":return`(?:${_}${ie(r)}${a})?${v}${F}${o}${l}${F}`;case"**/.*":return`(?:${_}${ie(r)}${a})?${o}${l}${F}`;default:{let L=/^(.*?)\.(\w+)$/.exec(x);if(!L)return;let te=Q(L[1]);return te?te+o+L[2]:void 0}}},M=de.removePrefix(t,D),I=Q(M);return I&&r.strictSlashes!==!0&&(I+=`${a}?`),I};eu.exports=kn});var iu=g((GC,ru)=>{"use strict";var LA=w("path"),NA=Zl(),Dn=tu(),Pn=nr(),FA=ir(),MA=t=>t&&typeof t=="object"&&!Array.isArray(t),Z=(t,e,r=!1)=>{if(Array.isArray(t)){let c=t.map(h=>Z(h,e,r));return h=>{for(let y of c){let A=y(h);if(A)return A}return!1}}let i=MA(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!i)throw new TypeError("Expected pattern to be a non-empty string");let n=e||{},s=Pn.isWindows(e),o=i?Z.compileRe(t,e):Z.makeRe(t,e,!1,!0),a=o.state;delete o.state;let l=()=>!1;if(n.ignore){let c={...e,ignore:null,onMatch:null,onResult:null};l=Z(n.ignore,c,r)}let u=(c,f=!1)=>{let{isMatch:h,match:y,output:A}=Z.test(c,o,e,{glob:t,posix:s}),_={glob:t,state:a,regex:o,posix:s,input:c,output:A,match:y,isMatch:h};return typeof n.onResult=="function"&&n.onResult(_),h===!1?(_.isMatch=!1,f?_:!1):l(c)?(typeof n.onIgnore=="function"&&n.onIgnore(_),_.isMatch=!1,f?_:!1):(typeof n.onMatch=="function"&&n.onMatch(_),f?_:!0)};return r&&(u.state=a),u};Z.test=(t,e,r,{glob:i,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(n?Pn.toPosixSlashes:null),a=t===i,l=a&&o?o(t):t;return a===!1&&(l=o?o(t):t,a=l===i),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Z.matchBase(t,e,r,n):a=e.exec(l)),{isMatch:Boolean(a),match:a,output:l}};Z.matchBase=(t,e,r,i=Pn.isWindows(r))=>(e instanceof RegExp?e:Z.makeRe(e,r)).test(LA.basename(t));Z.isMatch=(t,e,r)=>Z(e,r)(t);Z.parse=(t,e)=>Array.isArray(t)?t.map(r=>Z.parse(r,e)):Dn(t,{...e,fastpaths:!1});Z.scan=(t,e)=>NA(t,e);Z.compileRe=(t,e,r=!1,i=!1)=>{if(r===!0)return t.output;let n=e||{},s=n.contains?"":"^",o=n.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let l=Z.toRegex(a,e);return i===!0&&(l.state=t),l};Z.makeRe=(t,e={},r=!1,i=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(n.output=Dn.fastpaths(t,e)),n.output||(n=Dn(t,e)),Z.compileRe(n,e,r,i)};Z.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Z.constants=FA;ru.exports=Z});var su=g((JC,nu)=>{"use strict";nu.exports=iu()});var cu=g((YC,uu)=>{"use strict";var au=w("util"),lu=Ml(),ke=su(),Ln=nr(),ou=t=>t===""||t==="./",Y=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let i=new Set,n=new Set,s=new Set,o=0,a=c=>{s.add(c.output),r&&r.onResult&&r.onResult(c)};for(let c=0;c<e.length;c++){let f=ke(String(e[c]),{...r,onResult:a},!0),h=f.state.negated||f.state.negatedExtglob;h&&o++;for(let y of t){let A=f(y,!0);!(h?!A.isMatch:A.isMatch)||(h?i.add(A.output):(i.delete(A.output),n.add(A.output)))}}let u=(o===e.length?[...s]:[...n]).filter(c=>!i.has(c));if(r&&u.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(c=>c.replace(/\\/g,"")):e}return u};Y.match=Y;Y.matcher=(t,e)=>ke(t,e);Y.isMatch=(t,e,r)=>ke(e,r)(t);Y.any=Y.isMatch;Y.not=(t,e,r={})=>{e=[].concat(e).map(String);let i=new Set,n=[],s=a=>{r.onResult&&r.onResult(a),n.push(a.output)},o=new Set(Y(t,e,{...r,onResult:s}));for(let a of n)o.has(a)||i.add(a);return[...i]};Y.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${au.inspect(t)}"`);if(Array.isArray(e))return e.some(i=>Y.contains(t,i,r));if(typeof e=="string"){if(ou(t)||ou(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return Y.isMatch(t,e,{...r,contains:!0})};Y.matchKeys=(t,e,r)=>{if(!Ln.isObject(t))throw new TypeError("Expected the first argument to be an object");let i=Y(Object.keys(t),e,r),n={};for(let s of i)n[s]=t[s];return n};Y.some=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=ke(String(n),r);if(i.some(o=>s(o)))return!0}return!1};Y.every=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=ke(String(n),r);if(!i.every(o=>s(o)))return!1}return!0};Y.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${au.inspect(t)}"`);return[].concat(e).every(i=>ke(i,r)(t))};Y.capture=(t,e,r)=>{let i=Ln.isWindows(r),s=ke.makeRe(String(t),{...r,capture:!0}).exec(i?Ln.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};Y.makeRe=(...t)=>ke.makeRe(...t);Y.scan=(...t)=>ke.scan(...t);Y.parse=(t,e)=>{let r=[];for(let i of[].concat(t||[]))for(let n of lu(String(i),e))r.push(ke.parse(n,e));return r};Y.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:lu(t,e)};Y.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return Y.braces(t,{...e,expand:!0})};uu.exports=Y});var _u=g(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.matchAny=R.convertPatternsToRe=R.makeRe=R.getPatternParts=R.expandBraceExpansion=R.expandPatternsWithBraceExpansion=R.isAffectDepthOfReadingPattern=R.endsWithSlashGlobStar=R.hasGlobStar=R.getBaseDirectory=R.isPatternRelatedToParentDirectory=R.getPatternsOutsideCurrentDirectory=R.getPatternsInsideCurrentDirectory=R.getPositivePatterns=R.getNegativePatterns=R.isPositivePattern=R.isNegativePattern=R.convertToNegativePattern=R.convertToPositivePattern=R.isDynamicPattern=R.isStaticPattern=void 0;var qA=w("path"),HA=rl(),Nn=cu(),fu="**",jA="\\",$A=/[*?]|^!/,KA=/\[[^[]*]/,UA=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,GA=/[!*+?@]\([^(]*\)/,JA=/,|\.\./;function hu(t,e={}){return!pu(t,e)}R.isStaticPattern=hu;function pu(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(jA)||$A.test(t)||KA.test(t)||UA.test(t)||e.extglob!==!1&&GA.test(t)||e.braceExpansion!==!1&&YA(t))}R.isDynamicPattern=pu;function YA(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let i=t.slice(e,r);return JA.test(i)}function VA(t){return Wr(t)?t.slice(1):t}R.convertToPositivePattern=VA;function WA(t){return"!"+t}R.convertToNegativePattern=WA;function Wr(t){return t.startsWith("!")&&t[1]!=="("}R.isNegativePattern=Wr;function du(t){return!Wr(t)}R.isPositivePattern=du;function XA(t){return t.filter(Wr)}R.getNegativePatterns=XA;function ZA(t){return t.filter(du)}R.getPositivePatterns=ZA;function zA(t){return t.filter(e=>!Fn(e))}R.getPatternsInsideCurrentDirectory=zA;function eg(t){return t.filter(Fn)}R.getPatternsOutsideCurrentDirectory=eg;function Fn(t){return t.startsWith("..")||t.startsWith("./..")}R.isPatternRelatedToParentDirectory=Fn;function tg(t){return HA(t,{flipBackslashes:!1})}R.getBaseDirectory=tg;function rg(t){return t.includes(fu)}R.hasGlobStar=rg;function Au(t){return t.endsWith("/"+fu)}R.endsWithSlashGlobStar=Au;function ig(t){let e=qA.basename(t);return Au(t)||hu(e)}R.isAffectDepthOfReadingPattern=ig;function ng(t){return t.reduce((e,r)=>e.concat(gu(r)),[])}R.expandPatternsWithBraceExpansion=ng;function gu(t){return Nn.braces(t,{expand:!0,nodupes:!0})}R.expandBraceExpansion=gu;function sg(t,e){let{parts:r}=Nn.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}R.getPatternParts=sg;function mu(t,e){return Nn.makeRe(t,e)}R.makeRe=mu;function og(t,e){return t.map(r=>mu(r,e))}R.convertPatternsToRe=og;function ag(t,e){return e.some(r=>r.test(t))}R.matchAny=ag});var bu=g((WC,Cu)=>{"use strict";var lg=w("stream"),Eu=lg.PassThrough,ug=Array.prototype.slice;Cu.exports=cg;function cg(){let t=[],e=ug.call(arguments),r=!1,i=e[e.length-1];i&&!Array.isArray(i)&&i.pipe==null?e.pop():i={};let n=i.end!==!1,s=i.pipeError===!0;i.objectMode==null&&(i.objectMode=!0),i.highWaterMark==null&&(i.highWaterMark=64*1024);let o=Eu(i);function a(){for(let c=0,f=arguments.length;c<f;c++)t.push(yu(arguments[c],i));return l(),this}function l(){if(r)return;r=!0;let c=t.shift();if(!c){process.nextTick(u);return}Array.isArray(c)||(c=[c]);let f=c.length+1;function h(){--f>0||(r=!1,l())}function y(A){function _(){A.removeListener("merge2UnpipeEnd",_),A.removeListener("end",_),s&&A.removeListener("error",v),h()}function v(b){o.emit("error",b)}if(A._readableState.endEmitted)return h();A.on("merge2UnpipeEnd",_),A.on("end",_),s&&A.on("error",v),A.pipe(o,{end:!1}),A.resume()}for(let A=0;A<c.length;A++)y(c[A]);h()}function u(){r=!1,o.emit("queueDrain"),n&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(c){c.emit("merge2UnpipeEnd")}),e.length&&a.apply(null,e),o}function yu(t,e){if(Array.isArray(t))for(let r=0,i=t.length;r<i;r++)t[r]=yu(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(Eu(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var xu=g(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.merge=void 0;var fg=bu();function hg(t){let e=fg(t);return t.forEach(r=>{r.once("error",i=>e.emit("error",i))}),e.once("close",()=>vu(t)),e.once("end",()=>vu(t)),e}Xr.merge=hg;function vu(t){t.forEach(e=>e.emit("close"))}});var wu=g(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.isEmpty=Qt.isString=void 0;function pg(t){return typeof t=="string"}Qt.isString=pg;function dg(t){return t===""}Qt.isEmpty=dg});var je=g(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.string=oe.stream=oe.pattern=oe.path=oe.fs=oe.errno=oe.array=void 0;var Ag=Ga();oe.array=Ag;var gg=Ja();oe.errno=gg;var mg=Ya();oe.fs=mg;var _g=Va();oe.path=_g;var Eg=_u();oe.pattern=Eg;var yg=xu();oe.stream=yg;var Cg=wu();oe.string=Cg});var Qu=g(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.convertPatternGroupToTask=ae.convertPatternGroupsToTasks=ae.groupPatternsByBaseDirectory=ae.getNegativePatternsAsPositive=ae.getPositivePatterns=ae.convertPatternsToTasks=ae.generate=void 0;var $e=je();function bg(t,e){let r=Su(t),i=Bu(t,e.ignore),n=r.filter(l=>$e.pattern.isStaticPattern(l,e)),s=r.filter(l=>$e.pattern.isDynamicPattern(l,e)),o=Mn(n,i,!1),a=Mn(s,i,!0);return o.concat(a)}ae.generate=bg;function Mn(t,e,r){let i=[],n=$e.pattern.getPatternsOutsideCurrentDirectory(t),s=$e.pattern.getPatternsInsideCurrentDirectory(t),o=qn(n),a=qn(s);return i.push(...Hn(o,e,r)),"."in a?i.push(jn(".",s,e,r)):i.push(...Hn(a,e,r)),i}ae.convertPatternsToTasks=Mn;function Su(t){return $e.pattern.getPositivePatterns(t)}ae.getPositivePatterns=Su;function Bu(t,e){return $e.pattern.getNegativePatterns(t).concat(e).map($e.pattern.convertToPositivePattern)}ae.getNegativePatternsAsPositive=Bu;function qn(t){let e={};return t.reduce((r,i)=>{let n=$e.pattern.getBaseDirectory(i);return n in r?r[n].push(i):r[n]=[i],r},e)}ae.groupPatternsByBaseDirectory=qn;function Hn(t,e,r){return Object.keys(t).map(i=>jn(i,t[i],e,r))}ae.convertPatternGroupsToTasks=Hn;function jn(t,e,r,i){return{dynamic:i,positive:e,negative:r,base:t,patterns:[].concat(e,r.map($e.pattern.convertToNegativePattern))}}ae.convertPatternGroupToTask=jn});var Iu=g(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.removeDuplicateSlashes=Rt.transform=void 0;var vg=/(?!^)\/{2,}/g;function xg(t){return t.map(e=>Ru(e))}Rt.transform=xg;function Ru(t){return t.replace(vg,"/")}Rt.removeDuplicateSlashes=Ru});var Tu=g(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.read=void 0;function wg(t,e,r){e.fs.lstat(t,(i,n)=>{if(i!==null){Ou(r,i);return}if(!n.isSymbolicLink()||!e.followSymbolicLink){$n(r,n);return}e.fs.stat(t,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){Ou(r,s);return}$n(r,n);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),$n(r,o)})})}Zr.read=wg;function Ou(t,e){t(e)}function $n(t,e){t(null,e)}});var ku=g(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.read=void 0;function Sg(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let i=e.fs.statSync(t);return e.markSymbolicLink&&(i.isSymbolicLink=()=>!0),i}catch(i){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw i}}zr.read=Sg});var Du=g(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.createFileSystemAdapter=Je.FILE_SYSTEM_ADAPTER=void 0;var ei=w("fs");Je.FILE_SYSTEM_ADAPTER={lstat:ei.lstat,stat:ei.stat,lstatSync:ei.lstatSync,statSync:ei.statSync};function Bg(t){return t===void 0?Je.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Je.FILE_SYSTEM_ADAPTER),t)}Je.createFileSystemAdapter=Bg});var Pu=g(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});var Qg=Du(),Kn=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Qg.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};Un.default=Kn});var lt=g(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.statSync=Ye.stat=Ye.Settings=void 0;var Lu=Tu(),Rg=ku(),Gn=Pu();Ye.Settings=Gn.default;function Ig(t,e,r){if(typeof e=="function"){Lu.read(t,Jn(),e);return}Lu.read(t,Jn(e),r)}Ye.stat=Ig;function Og(t,e){let r=Jn(e);return Rg.read(t,r)}Ye.statSync=Og;function Jn(t={}){return t instanceof Gn.default?t:new Gn.default(t)}});var Mu=g((ab,Fu)=>{var Nu;Fu.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):t=>(Nu||(Nu=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var Hu=g((lb,qu)=>{qu.exports=kg;var Tg=Mu();function kg(t,e){let r,i,n,s=!0;Array.isArray(t)?(r=[],i=t.length):(n=Object.keys(t),r={},i=n.length);function o(l){function u(){e&&e(l,r),e=null}s?Tg(u):u()}function a(l,u,c){r[l]=c,(--i===0||u)&&o(u)}i?n?n.forEach(function(l){t[l](function(u,c){a(l,u,c)})}):t.forEach(function(l,u){l(function(c,f){a(u,c,f)})}):o(null),s=!1}});var Yn=g(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var ti=process.versions.node.split(".");if(ti[0]===void 0||ti[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var ju=Number.parseInt(ti[0],10),Dg=Number.parseInt(ti[1],10),$u=10,Pg=10,Lg=ju>$u,Ng=ju===$u&&Dg>=Pg;ri.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Lg||Ng});var Ku=g(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.createDirentFromStats=void 0;var Vn=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function Fg(t,e){return new Vn(t,e)}ii.createDirentFromStats=Fg});var Wn=g(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.fs=void 0;var Mg=Ku();ni.fs=Mg});var Xn=g(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.joinPathSegments=void 0;function qg(t,e,r){return t.endsWith(r)?t+e:t+r+e}si.joinPathSegments=qg});var Wu=g(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.readdir=Ve.readdirWithFileTypes=Ve.read=void 0;var Hg=lt(),Uu=Hu(),jg=Yn(),Gu=Wn(),Ju=Xn();function $g(t,e,r){if(!e.stats&&jg.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Yu(t,e,r);return}Vu(t,e,r)}Ve.read=$g;function Yu(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(i,n)=>{if(i!==null){oi(r,i);return}let s=n.map(a=>({dirent:a,name:a.name,path:Ju.joinPathSegments(t,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){Zn(r,s);return}let o=s.map(a=>Kg(a,e));Uu(o,(a,l)=>{if(a!==null){oi(r,a);return}Zn(r,l)})})}Ve.readdirWithFileTypes=Yu;function Kg(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(i,n)=>{if(i!==null){if(e.throwErrorOnBrokenSymbolicLink){r(i);return}r(null,t);return}t.dirent=Gu.fs.createDirentFromStats(t.name,n),r(null,t)})}}function Vu(t,e,r){e.fs.readdir(t,(i,n)=>{if(i!==null){oi(r,i);return}let s=n.map(o=>{let a=Ju.joinPathSegments(t,o,e.pathSegmentSeparator);return l=>{Hg.stat(a,e.fsStatSettings,(u,c)=>{if(u!==null){l(u);return}let f={name:o,path:a,dirent:Gu.fs.createDirentFromStats(o,c)};e.stats&&(f.stats=c),l(null,f)})}});Uu(s,(o,a)=>{if(o!==null){oi(r,o);return}Zn(r,a)})})}Ve.readdir=Vu;function oi(t,e){t(e)}function Zn(t,e){t(null,e)}});var tc=g(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.readdir=We.readdirWithFileTypes=We.read=void 0;var Ug=lt(),Gg=Yn(),Xu=Wn(),Zu=Xn();function Jg(t,e){return!e.stats&&Gg.IS_SUPPORT_READDIR_WITH_FILE_TYPES?zu(t,e):ec(t,e)}We.read=Jg;function zu(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(i=>{let n={dirent:i,name:i.name,path:Zu.joinPathSegments(t,i.name,e.pathSegmentSeparator)};if(n.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(n.path);n.dirent=Xu.fs.createDirentFromStats(n.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return n})}We.readdirWithFileTypes=zu;function ec(t,e){return e.fs.readdirSync(t).map(i=>{let n=Zu.joinPathSegments(t,i,e.pathSegmentSeparator),s=Ug.statSync(n,e.fsStatSettings),o={name:i,path:n,dirent:Xu.fs.createDirentFromStats(i,s)};return e.stats&&(o.stats=s),o})}We.readdir=ec});var rc=g(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.createFileSystemAdapter=Xe.FILE_SYSTEM_ADAPTER=void 0;var It=w("fs");Xe.FILE_SYSTEM_ADAPTER={lstat:It.lstat,stat:It.stat,lstatSync:It.lstatSync,statSync:It.statSync,readdir:It.readdir,readdirSync:It.readdirSync};function Yg(t){return t===void 0?Xe.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Xe.FILE_SYSTEM_ADAPTER),t)}Xe.createFileSystemAdapter=Yg});var ic=g(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});var Vg=w("path"),Wg=lt(),Xg=rc(),zn=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=Xg.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Vg.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new Wg.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};es.default=zn});var ai=g(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.Settings=Ze.scandirSync=Ze.scandir=void 0;var nc=Wu(),Zg=tc(),ts=ic();Ze.Settings=ts.default;function zg(t,e,r){if(typeof e=="function"){nc.read(t,rs(),e);return}nc.read(t,rs(e),r)}Ze.scandir=zg;function em(t,e){let r=rs(e);return Zg.read(t,r)}Ze.scandirSync=em;function rs(t={}){return t instanceof ts.default?t:new ts.default(t)}});var oc=g((_b,sc)=>{"use strict";function tm(t){var e=new t,r=e;function i(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function n(s){r.next=s,r=s}return{get:i,release:n}}sc.exports=tm});var lc=g((Eb,is)=>{"use strict";var rm=oc();function ac(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var i=rm(im),n=null,s=null,o=0,a=null,l={push:_,drain:_e,saturated:_e,pause:c,paused:!1,concurrency:r,running:u,resume:y,idle:A,length:f,getQueue:h,unshift:v,empty:_e,kill:D,killAndDrain:F,error:ie};return l;function u(){return o}function c(){l.paused=!0}function f(){for(var Q=n,M=0;Q;)Q=Q.next,M++;return M}function h(){for(var Q=n,M=[];Q;)M.push(Q.value),Q=Q.next;return M}function y(){if(!!l.paused){l.paused=!1;for(var Q=0;Q<l.concurrency;Q++)o++,b()}}function A(){return o===0&&l.length()===0}function _(Q,M){var I=i.get();I.context=t,I.release=b,I.value=Q,I.callback=M||_e,I.errorHandler=a,o===l.concurrency||l.paused?s?(s.next=I,s=I):(n=I,s=I,l.saturated()):(o++,e.call(t,I.value,I.worked))}function v(Q,M){var I=i.get();I.context=t,I.release=b,I.value=Q,I.callback=M||_e,o===l.concurrency||l.paused?n?(I.next=n,n=I):(n=I,s=I,l.saturated()):(o++,e.call(t,I.value,I.worked))}function b(Q){Q&&i.release(Q);var M=n;M?l.paused?o--:(s===n&&(s=null),n=M.next,M.next=null,e.call(t,M.value,M.worked),s===null&&l.empty()):--o===0&&l.drain()}function D(){n=null,s=null,l.drain=_e}function F(){n=null,s=null,l.drain(),l.drain=_e}function ie(Q){a=Q}}function _e(){}function im(){this.value=null,this.callback=_e,this.next=null,this.release=_e,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,i){var n=t.callback,s=t.errorHandler,o=t.value;t.value=null,t.callback=_e,t.errorHandler&&s(r,o),n.call(t.context,r,i),t.release(t)}}function nm(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function i(c,f){e.call(this,c).then(function(h){f(null,h)},f)}var n=ac(t,i,r),s=n.push,o=n.unshift;return n.push=a,n.unshift=l,n.drained=u,n;function a(c){var f=new Promise(function(h,y){s(c,function(A,_){if(A){y(A);return}h(_)})});return f.catch(_e),f}function l(c){var f=new Promise(function(h,y){o(c,function(A,_){if(A){y(A);return}h(_)})});return f.catch(_e),f}function u(){var c=n.drain,f=new Promise(function(h){n.drain=function(){c(),h()}});return f}}is.exports=ac;is.exports.promise=nm});var li=g(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.joinPathSegments=De.replacePathSegmentSeparator=De.isAppliedFilter=De.isFatalError=void 0;function sm(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}De.isFatalError=sm;function om(t,e){return t===null||t(e)}De.isAppliedFilter=om;function am(t,e){return t.split(/[/\\]/).join(e)}De.replacePathSegmentSeparator=am;function lm(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}De.joinPathSegments=lm});var os=g(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});var um=li(),ns=class{constructor(e,r){this._root=e,this._settings=r,this._root=um.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};ss.default=ns});var us=g(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});var cm=w("events"),fm=ai(),hm=lc(),ui=li(),pm=os(),as=class extends pm.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=fm.scandir,this._emitter=new cm.EventEmitter,this._queue=hm(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,r){let i={directory:e,base:r};this._queue.push(i,n=>{n!==null&&this._handleError(n)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(i,n)=>{if(i!==null){r(i,void 0);return}for(let s of n)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!ui.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let i=e.path;r!==void 0&&(e.path=ui.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),ui.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&ui.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};ls.default=as});var uc=g(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var dm=us(),cs=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new dm.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{Am(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{gm(e,this._storage)}),this._reader.read()}};fs.default=cs;function Am(t,e){t(e)}function gm(t,e){t(null,e)}});var cc=g(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});var mm=w("stream"),_m=us(),hs=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new _m.default(this._root,this._settings),this._stream=new mm.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}};ps.default=hs});var fc=g(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var Em=ai(),ci=li(),ym=os(),ds=class extends ym.default{constructor(){super(...arguments),this._scandir=Em.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let i=this._scandir(e,this._settings.fsScandirSettings);for(let n of i)this._handleEntry(n,r)}catch(i){this._handleError(i)}}_handleError(e){if(!!ci.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let i=e.path;r!==void 0&&(e.path=ci.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),ci.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&ci.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};As.default=ds});var hc=g(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});var Cm=fc(),gs=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Cm.default(this._root,this._settings)}read(){return this._reader.read()}};ms.default=gs});var pc=g(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var bm=w("path"),vm=ai(),_s=class{constructor(e={}){this._options=e,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,bm.sep),this.fsScandirSettings=new vm.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};Es.default=_s});var hi=g(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.Settings=Pe.walkStream=Pe.walkSync=Pe.walk=void 0;var dc=uc(),xm=cc(),wm=hc(),ys=pc();Pe.Settings=ys.default;function Sm(t,e,r){if(typeof e=="function"){new dc.default(t,fi()).read(e);return}new dc.default(t,fi(e)).read(r)}Pe.walk=Sm;function Bm(t,e){let r=fi(e);return new wm.default(t,r).read()}Pe.walkSync=Bm;function Qm(t,e){let r=fi(e);return new xm.default(t,r).read()}Pe.walkStream=Qm;function fi(t={}){return t instanceof ys.default?t:new ys.default(t)}});var pi=g(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});var Rm=w("path"),Im=lt(),Ac=je(),Cs=class{constructor(e){this._settings=e,this._fsStatSettings=new Im.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return Rm.resolve(this._settings.cwd,e)}_makeEntry(e,r){let i={name:r,path:r,dirent:Ac.fs.createDirentFromStats(r,e)};return this._settings.stats&&(i.stats=e),i}_isFatalError(e){return!Ac.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};bs.default=Cs});var ws=g(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});var Om=w("stream"),Tm=lt(),km=hi(),Dm=pi(),vs=class extends Dm.default{constructor(){super(...arguments),this._walkStream=km.walkStream,this._stat=Tm.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let i=e.map(this._getFullEntryPath,this),n=new Om.PassThrough({objectMode:!0});n._write=(s,o,a)=>this._getEntry(i[s],e[s],r).then(l=>{l!==null&&r.entryFilter(l)&&n.push(l),s===i.length-1&&n.end(),a()}).catch(a);for(let s=0;s<i.length;s++)n.write(s);return n}_getEntry(e,r,i){return this._getStat(e).then(n=>this._makeEntry(n,r)).catch(n=>{if(i.errorFilter(n))return null;throw n})}_getStat(e){return new Promise((r,i)=>{this._stat(e,this._fsStatSettings,(n,s)=>n===null?r(s):i(n))})}};xs.default=vs});var gc=g(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});var Pm=hi(),Lm=pi(),Nm=ws(),Ss=class extends Lm.default{constructor(){super(...arguments),this._walkAsync=Pm.walk,this._readerStream=new Nm.default(this._settings)}dynamic(e,r){return new Promise((i,n)=>{this._walkAsync(e,r,(s,o)=>{s===null?i(o):n(s)})})}async static(e,r){let i=[],n=this._readerStream.static(e,r);return new Promise((s,o)=>{n.once("error",o),n.on("data",a=>i.push(a)),n.once("end",()=>s(i))})}};Bs.default=Ss});var mc=g(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});var Ot=je(),Qs=class{constructor(e,r,i){this._patterns=e,this._settings=r,this._micromatchOptions=i,this._storage=[],this._fillStorage()}_fillStorage(){let e=Ot.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let r of e){let i=this._getPatternSegments(r),n=this._splitSegmentsIntoSections(i);this._storage.push({complete:n.length<=1,pattern:r,segments:i,sections:n})}}_getPatternSegments(e){return Ot.pattern.getPatternParts(e,this._micromatchOptions).map(i=>Ot.pattern.isDynamicPattern(i,this._settings)?{dynamic:!0,pattern:i,patternRe:Ot.pattern.makeRe(i,this._micromatchOptions)}:{dynamic:!1,pattern:i})}_splitSegmentsIntoSections(e){return Ot.array.splitWhen(e,r=>r.dynamic&&Ot.pattern.hasGlobStar(r.pattern))}};Rs.default=Qs});var _c=g(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});var Fm=mc(),Is=class extends Fm.default{match(e){let r=e.split("/"),i=r.length,n=this._storage.filter(s=>!s.complete||s.segments.length>i);for(let s of n){let o=s.sections[0];if(!s.complete&&i>o.length||r.every((l,u)=>{let c=s.segments[u];return!!(c.dynamic&&c.patternRe.test(l)||!c.dynamic&&c.pattern===l)}))return!0}return!1}};Os.default=Is});var Ec=g(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var di=je(),Mm=_c(),Ts=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,i){let n=this._getMatcher(r),s=this._getNegativePatternsRe(i);return o=>this._filter(e,o,n,s)}_getMatcher(e){return new Mm.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(di.pattern.isAffectDepthOfReadingPattern);return di.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,i,n){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=di.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,i)?!1:this._isSkippedByNegativePatterns(s,n)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let i=r.split("/").length;if(e==="")return i;let n=e.split("/").length;return i-n}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!di.pattern.matchAny(e,r)}};ks.default=Ts});var yc=g(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});var ut=je(),Ds=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let i=ut.pattern.convertPatternsToRe(e,this._micromatchOptions),n=ut.pattern.convertPatternsToRe(r,this._micromatchOptions);return s=>this._filter(s,i,n)}_filter(e,r,i){if(this._settings.unique&&this._isDuplicateEntry(e)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e.path,i))return!1;let n=this._settings.baseNameMatch?e.name:e.path,s=e.dirent.isDirectory(),o=this._isMatchToPatterns(n,r,s)&&!this._isMatchToPatterns(e.path,i,s);return this._settings.unique&&o&&this._createIndexRecord(e),o}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;let i=ut.path.makeAbsolute(this._settings.cwd,e);return ut.pattern.matchAny(i,r)}_isMatchToPatterns(e,r,i){let n=ut.path.removeLeadingDotSegment(e),s=ut.pattern.matchAny(n,r);return!s&&i?ut.pattern.matchAny(n+"/",r):s}};Ps.default=Ds});var Cc=g(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});var qm=je(),Ls=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return qm.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};Ns.default=Ls});var vc=g(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});var bc=je(),Fs=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=bc.path.makeAbsolute(this._settings.cwd,r),r=bc.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};Ms.default=Fs});var Ai=g(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});var Hm=w("path"),jm=Ec(),$m=yc(),Km=Cc(),Um=vc(),qs=class{constructor(e){this._settings=e,this.errorFilter=new Km.default(this._settings),this.entryFilter=new $m.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new jm.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Um.default(this._settings)}_getRootDirectory(e){return Hm.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,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}}};Hs.default=qs});var xc=g($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var Gm=gc(),Jm=Ai(),js=class extends Jm.default{constructor(){super(...arguments),this._reader=new Gm.default(this._settings)}async read(e){let r=this._getRootDirectory(e),i=this._getReaderOptions(e);return(await this.api(r,e,i)).map(s=>i.transform(s))}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}};$s.default=js});var wc=g(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});var Ym=w("stream"),Vm=ws(),Wm=Ai(),Ks=class extends Wm.default{constructor(){super(...arguments),this._reader=new Vm.default(this._settings)}read(e){let r=this._getRootDirectory(e),i=this._getReaderOptions(e),n=this.api(r,e,i),s=new Ym.Readable({objectMode:!0,read:()=>{}});return n.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",i.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>n.destroy()),s}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}};Us.default=Ks});var Sc=g(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});var Xm=lt(),Zm=hi(),zm=pi(),Gs=class extends zm.default{constructor(){super(...arguments),this._walkSync=Zm.walkSync,this._statSync=Xm.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let i=[];for(let n of e){let s=this._getFullEntryPath(n),o=this._getEntry(s,n,r);o===null||!r.entryFilter(o)||i.push(o)}return i}_getEntry(e,r,i){try{let n=this._getStat(e);return this._makeEntry(n,r)}catch(n){if(i.errorFilter(n))return null;throw n}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};Js.default=Gs});var Bc=g(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});var e_=Sc(),t_=Ai(),Ys=class extends t_.default{constructor(){super(...arguments),this._reader=new e_.default(this._settings)}read(e){let r=this._getRootDirectory(e),i=this._getReaderOptions(e);return this.api(r,e,i).map(i.transform)}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}};Vs.default=Ys});var Qc=g(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var Tt=w("fs"),r_=w("os"),i_=Math.max(r_.cpus().length,1);kt.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:Tt.lstat,lstatSync:Tt.lstatSync,stat:Tt.stat,statSync:Tt.statSync,readdir:Tt.readdir,readdirSync:Tt.readdirSync};var Ws=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)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},kt.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};kt.default=Ws});var gi=g((Kb,Oc)=>{"use strict";var Rc=Qu(),Ic=Iu(),n_=xc(),s_=wc(),o_=Bc(),Xs=Qc(),ct=je();async function Zs(t,e){Dt(t);let r=zs(t,n_.default,e),i=await Promise.all(r);return ct.array.flatten(i)}(function(t){function e(o,a){Dt(o);let l=zs(o,o_.default,a);return ct.array.flatten(l)}t.sync=e;function r(o,a){Dt(o);let l=zs(o,s_.default,a);return ct.stream.merge(l)}t.stream=r;function i(o,a){Dt(o);let l=Ic.transform([].concat(o)),u=new Xs.default(a);return Rc.generate(l,u)}t.generateTasks=i;function n(o,a){Dt(o);let l=new Xs.default(a);return ct.pattern.isDynamicPattern(o,l)}t.isDynamicPattern=n;function s(o){return Dt(o),ct.path.escape(o)}t.escapePath=s})(Zs||(Zs={}));function zs(t,e,r){let i=Ic.transform([].concat(t)),n=new Xs.default(r),s=Rc.generate(i,n),o=new e(n);return s.map(o.read,o)}function Dt(t){if(![].concat(t).every(i=>ct.string.isString(i)&&!ct.string.isEmpty(i)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}Oc.exports=Zs});var kc=g((Ub,eo)=>{"use strict";var Tc=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};eo.exports=Tc;eo.exports.default=Tc});var Pc=g((Gb,_i)=>{"use strict";var a_=kc(),mi=new WeakMap,Dc=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,i=0,n=t.displayName||t.name||"<anonymous>",s=function(...o){if(mi.set(s,++i),i===1)r=t.apply(this,o),t=null;else if(e.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return r};return a_(s,t),mi.set(s,i),s};_i.exports=Dc;_i.exports.default=Dc;_i.exports.callCount=t=>{if(!mi.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return mi.get(t)}});var Lc=g((Jb,Ei)=>{Ei.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Ei.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ei.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Hc=g((Yb,Nt)=>{var V=global.process,ft=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};ft(V)?(Nc=w("assert"),Pt=Lc(),Fc=/^win/i.test(V.platform),or=w("events"),typeof or!="function"&&(or=or.EventEmitter),V.__signal_exit_emitter__?ne=V.__signal_exit_emitter__:(ne=V.__signal_exit_emitter__=new or,ne.count=0,ne.emitted={}),ne.infinite||(ne.setMaxListeners(1/0),ne.infinite=!0),Nt.exports=function(t,e){if(!ft(global.process))return function(){};Nc.equal(typeof t,"function","a callback must be provided for exit handler"),Lt===!1&&to();var r="exit";e&&e.alwaysLast&&(r="afterexit");var i=function(){ne.removeListener(r,t),ne.listeners("exit").length===0&&ne.listeners("afterexit").length===0&&yi()};return ne.on(r,t),i},yi=function(){!Lt||!ft(global.process)||(Lt=!1,Pt.forEach(function(e){try{V.removeListener(e,Ci[e])}catch{}}),V.emit=bi,V.reallyExit=ro,ne.count-=1)},Nt.exports.unload=yi,ht=function(e,r,i){ne.emitted[e]||(ne.emitted[e]=!0,ne.emit(e,r,i))},Ci={},Pt.forEach(function(t){Ci[t]=function(){if(!!ft(global.process)){var r=V.listeners(t);r.length===ne.count&&(yi(),ht("exit",null,t),ht("afterexit",null,t),Fc&&t==="SIGHUP"&&(t="SIGINT"),V.kill(V.pid,t))}}}),Nt.exports.signals=function(){return Pt},Lt=!1,to=function(){Lt||!ft(global.process)||(Lt=!0,ne.count+=1,Pt=Pt.filter(function(e){try{return V.on(e,Ci[e]),!0}catch{return!1}}),V.emit=qc,V.reallyExit=Mc)},Nt.exports.load=to,ro=V.reallyExit,Mc=function(e){!ft(global.process)||(V.exitCode=e||0,ht("exit",V.exitCode,null),ht("afterexit",V.exitCode,null),ro.call(V,V.exitCode))},bi=V.emit,qc=function(e,r){if(e==="exit"&&ft(global.process)){r!==void 0&&(V.exitCode=r);var i=bi.apply(this,arguments);return ht("exit",V.exitCode,null),ht("afterexit",V.exitCode,null),i}else return bi.apply(this,arguments)}):Nt.exports=function(){return function(){}};var Nc,Pt,Fc,or,ne,yi,ht,Ci,Lt,to,ro,Mc,bi,qc});var Gc=g((ev,c_)=>{c_.exports={dots:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},dots2:{interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},dots3:{interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},dots4:{interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},dots5:{interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},dots6:{interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},dots7:{interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},dots8:{interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},dots9:{interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},dots10:{interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},dots11:{interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},dots12:{interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},dots13:{interval:80,frames:["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},dots8Bit:{interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},sand:{interval:80,frames:["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["⠂","-","–","—","–","-"]},pipe:{interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["✶","✸","✹","✺","✹","✷"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},hamburger:{interval:100,frames:["☱","☲","☴"]},growVertical:{interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},growHorizontal:{interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","°","O","o","."]},noise:{interval:100,frames:["▓","▒","░"]},bounce:{interval:120,frames:["⠁","⠂","⠄","⠂"]},boxBounce:{interval:120,frames:["▖","▘","▝","▗"]},boxBounce2:{interval:100,frames:["▌","▀","▐","▄"]},triangle:{interval:50,frames:["◢","◣","◤","◥"]},arc:{interval:100,frames:["◜","◠","◝","◞","◡","◟"]},circle:{interval:120,frames:["◡","⊙","◠"]},squareCorners:{interval:180,frames:["◰","◳","◲","◱"]},circleQuarters:{interval:120,frames:["◴","◷","◶","◵"]},circleHalves:{interval:50,frames:["◐","◓","◑","◒"]},squish:{interval:100,frames:["╫","╪"]},toggle:{interval:250,frames:["⊶","⊷"]},toggle2:{interval:80,frames:["▫","▪"]},toggle3:{interval:120,frames:["□","■"]},toggle4:{interval:100,frames:["■","□","▪","▫"]},toggle5:{interval:100,frames:["▮","▯"]},toggle6:{interval:300,frames:["ဝ","၀"]},toggle7:{interval:80,frames:["⦾","⦿"]},toggle8:{interval:100,frames:["◍","◌"]},toggle9:{interval:100,frames:["◉","◎"]},toggle10:{interval:100,frames:["㊂","㊀","㊁"]},toggle11:{interval:50,frames:["⧇","⧆"]},toggle12:{interval:120,frames:["☗","☖"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},arrow2:{interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},arrow3:{interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},smiley:{interval:200,frames:["😄 ","😝 "]},monkey:{interval:300,frames:["🙈 ","🙈 ","🙉 ","🙊 "]},hearts:{interval:100,frames:["💛 ","💙 ","💜 ","💚 ","❤️ "]},clock:{interval:100,frames:["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},earth:{interval:180,frames:["🌍 ","🌎 ","🌏 "]},material:{interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},moon:{interval:80,frames:["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},runner:{interval:140,frames:["🚶 ","🏃 "]},pong:{interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},shark:{interval:120,frames:["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},christmas:{interval:400,frames:["🌲","🎄"]},grenade:{interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},point:{interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},layer:{interval:150,frames:["-","=","≡"]},betaWave:{interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},fingerDance:{interval:160,frames:["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},fistBump:{interval:80,frames:["🤜    🤛 ","🤜    🤛 ","🤜    🤛 "," 🤜  🤛  ","  🤜🤛   "," 🤜✨🤛   ","🤜 ✨ 🤛  "]},soccerHeader:{interval:80,frames:[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},mindblown:{interval:160,frames:["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ ","  ","  ","  "]},speaker:{interval:160,frames:["🔈 ","🔉 ","🔊 ","🔉 "]},orangePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},bluePulse:{interval:100,frames:["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},orangeBluePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},timeTravel:{interval:100,frames:["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},aesthetic:{interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]}}});var Vc=g((tv,Yc)=>{"use strict";var xi=Object.assign({},Gc()),Jc=Object.keys(xi);Object.defineProperty(xi,"random",{get(){let t=Math.floor(Math.random()*Jc.length),e=Jc[t];return xi[e]}});Yc.exports=xi});var Wc=g((cv,wi)=>{var d_=function(){"use strict";function t(o,a,l,u){var c;typeof a=="object"&&(l=a.depth,u=a.prototype,c=a.filter,a=a.circular);var f=[],h=[],y=typeof Buffer<"u";typeof a>"u"&&(a=!0),typeof l>"u"&&(l=1/0);function A(_,v){if(_===null)return null;if(v==0)return _;var b,D;if(typeof _!="object")return _;if(t.__isArray(_))b=[];else if(t.__isRegExp(_))b=new RegExp(_.source,s(_)),_.lastIndex&&(b.lastIndex=_.lastIndex);else if(t.__isDate(_))b=new Date(_.getTime());else{if(y&&Buffer.isBuffer(_))return Buffer.allocUnsafe?b=Buffer.allocUnsafe(_.length):b=new Buffer(_.length),_.copy(b),b;typeof u>"u"?(D=Object.getPrototypeOf(_),b=Object.create(D)):(b=Object.create(u),D=u)}if(a){var F=f.indexOf(_);if(F!=-1)return h[F];f.push(_),h.push(b)}for(var ie in _){var Q;D&&(Q=Object.getOwnPropertyDescriptor(D,ie)),!(Q&&Q.set==null)&&(b[ie]=A(_[ie],v-1))}return b}return A(o,l)}t.clonePrototype=function(a){if(a===null)return null;var l=function(){};return l.prototype=a,new l};function e(o){return Object.prototype.toString.call(o)}t.__objToStr=e;function r(o){return typeof o=="object"&&e(o)==="[object Date]"}t.__isDate=r;function i(o){return typeof o=="object"&&e(o)==="[object Array]"}t.__isArray=i;function n(o){return typeof o=="object"&&e(o)==="[object RegExp]"}t.__isRegExp=n;function s(o){var a="";return o.global&&(a+="g"),o.ignoreCase&&(a+="i"),o.multiline&&(a+="m"),a}return t.__getRegExpFlags=s,t}();typeof wi=="object"&&wi.exports&&(wi.exports=d_)});var Zc=g((fv,Xc)=>{var A_=Wc();Xc.exports=function(t,e){return t=t||{},Object.keys(e).forEach(function(r){typeof t[r]>"u"&&(t[r]=A_(e[r]))}),t}});var ef=g((hv,zc)=>{zc.exports=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]]});var sf=g((pv,oo)=>{"use strict";var g_=Zc(),ur=ef(),rf={nul:0,control:0};oo.exports=function(e){return nf(e,rf)};oo.exports.config=function(t){return t=g_(t||{},rf),function(r){return nf(r,t)}};function nf(t,e){if(typeof t!="string")return tf(t,e);for(var r=0,i=0;i<t.length;i++){var n=tf(t.charCodeAt(i),e);if(n<0)return-1;r+=n}return r}function tf(t,e){return t===0?e.nul:t<32||t>=127&&t<160?e.control:m_(t)?0:1+(t>=4352&&(t<=4447||t==9001||t==9002||t>=11904&&t<=42191&&t!=12351||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65135||t>=65280&&t<=65376||t>=65504&&t<=65510||t>=131072&&t<=196605||t>=196608&&t<=262141))}function m_(t){var e=0,r=ur.length-1,i;if(t<ur[0][0]||t>ur[r][1])return!1;for(;r>=e;)if(i=Math.floor((e+r)/2),t>ur[i][1])e=i+1;else if(t<ur[i][0])r=i-1;else return!0;return!1}});var lo=g((Av,of)=>{of.exports=w("stream")});var cf=g((gv,uf)=>{"use strict";function af(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function __(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?af(Object(r),!0).forEach(function(i){E_(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):af(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function E_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function C_(t,e,r){return e&&lf(t.prototype,e),r&&lf(t,r),t}var b_=w("buffer"),Si=b_.Buffer,v_=w("util"),uo=v_.inspect,x_=uo&&uo.custom||"inspect";function w_(t,e,r){Si.prototype.copy.call(t,e,r)}uf.exports=function(){function t(){y_(this,t),this.head=null,this.tail=null,this.length=0}return C_(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Si.alloc(0);for(var i=Si.allocUnsafe(r>>>0),n=this.head,s=0;n;)w_(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Si.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:x_,value:function(r,i){return uo(this,__({},i,{depth:0,customInspect:!1}))}}]),t}()});var fo=g((mv,hf)=>{"use strict";function S_(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(co,this,t)):process.nextTick(co,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Bi,r):(r._writableState.errorEmitted=!0,process.nextTick(ff,r,s)):process.nextTick(ff,r,s):e?(process.nextTick(Bi,r),e(s)):process.nextTick(Bi,r)}),this)}function ff(t,e){co(t,e),Bi(t)}function Bi(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function B_(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function co(t,e){t.emit("error",e)}function Q_(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}hf.exports={destroy:S_,undestroy:B_,errorOrDestroy:Q_}});var ze=g((_v,Af)=>{"use strict";var df={};function Ee(t,e,r){r||(r=Error);function i(s,o,a){return typeof e=="string"?e:e(s,o,a)}class n extends r{constructor(o,a,l){super(i(o,a,l))}}n.prototype.name=r.name,n.prototype.code=t,df[t]=n}function pf(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function R_(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function I_(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function O_(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ee("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ee("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&R_(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(I_(t," argument"))n=`The ${t} ${i} ${pf(e,"type")}`;else{let s=O_(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${pf(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Ee("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ee("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ee("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ee("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ee("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ee("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ee("ERR_STREAM_WRITE_AFTER_END","write after end");Ee("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ee("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ee("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Af.exports.codes=df});var ho=g((Ev,gf)=>{"use strict";var T_=ze().codes.ERR_INVALID_OPT_VALUE;function k_(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function D_(t,e,r,i){var n=k_(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new T_(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}gf.exports={getHighWaterMark:D_}});var mf=g((yv,po)=>{typeof Object.create=="function"?po.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:po.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var pt=g((Cv,go)=>{try{if(Ao=w("util"),typeof Ao.inherits!="function")throw"";go.exports=Ao.inherits}catch{go.exports=mf()}var Ao});var Ef=g((bv,_f)=>{_f.exports=w("util").deprecate});var Eo=g((vv,wf)=>{"use strict";wf.exports=X;function Cf(t){var e=this;this.next=null,this.entry=null,this.finish=function(){aE(e,t)}}var Mt;X.WritableState=fr;var P_={deprecate:Ef()},bf=lo(),Ri=w("buffer").Buffer,L_=global.Uint8Array||function(){};function N_(t){return Ri.from(t)}function F_(t){return Ri.isBuffer(t)||t instanceof L_}var _o=fo(),M_=ho(),q_=M_.getHighWaterMark,et=ze().codes,H_=et.ERR_INVALID_ARG_TYPE,j_=et.ERR_METHOD_NOT_IMPLEMENTED,$_=et.ERR_MULTIPLE_CALLBACK,K_=et.ERR_STREAM_CANNOT_PIPE,U_=et.ERR_STREAM_DESTROYED,G_=et.ERR_STREAM_NULL_VALUES,J_=et.ERR_STREAM_WRITE_AFTER_END,Y_=et.ERR_UNKNOWN_ENCODING,qt=_o.errorOrDestroy;pt()(X,bf);function V_(){}function fr(t,e,r){Mt=Mt||dt(),t=t||{},typeof r!="boolean"&&(r=e instanceof Mt),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=q_(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){rE(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Cf(this)}fr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(fr.prototype,"buffer",{get:P_.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Qi;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Qi=Function.prototype[Symbol.hasInstance],Object.defineProperty(X,Symbol.hasInstance,{value:function(e){return Qi.call(this,e)?!0:this!==X?!1:e&&e._writableState instanceof fr}})):Qi=function(e){return e instanceof this};function X(t){Mt=Mt||dt();var e=this instanceof Mt;if(!e&&!Qi.call(X,this))return new X(t);this._writableState=new fr(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),bf.call(this)}X.prototype.pipe=function(){qt(this,new K_)};function W_(t,e){var r=new J_;qt(t,r),process.nextTick(e,r)}function X_(t,e,r,i){var n;return r===null?n=new G_:typeof r!="string"&&!e.objectMode&&(n=new H_("chunk",["string","Buffer"],r)),n?(qt(t,n),process.nextTick(i,n),!1):!0}X.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&F_(t);return s&&!Ri.isBuffer(t)&&(t=N_(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=V_),i.ending?W_(this,r):(s||X_(this,i,t,r))&&(i.pendingcb++,n=z_(this,i,s,t,e,r)),n};X.prototype.cork=function(){this._writableState.corked++};X.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&vf(this,t))};X.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new Y_(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(X.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Z_(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Ri.from(e,r)),e}Object.defineProperty(X.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z_(t,e,r,i,n,s){if(!r){var o=Z_(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else mo(t,e,!1,a,i,n,s);return l}function mo(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new U_("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function eE(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(cr,t,e),t._writableState.errorEmitted=!0,qt(t,i)):(n(i),t._writableState.errorEmitted=!0,qt(t,i),cr(t,e))}function tE(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function rE(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new $_;if(tE(r),e)eE(t,r,i,e,n);else{var s=xf(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&vf(t,r),i?process.nextTick(yf,t,r,s,n):yf(t,r,s,n)}}function yf(t,e,r,i){r||iE(t,e),e.pendingcb--,i(),cr(t,e)}function iE(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function vf(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,mo(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new Cf(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,f=e.objectMode?1:l.length;if(mo(t,e,!1,f,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}X.prototype._write=function(t,e,r){r(new j_("_write()"))};X.prototype._writev=null;X.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||oE(this,i,r),this};Object.defineProperty(X.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function xf(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function nE(t,e){t._final(function(r){e.pendingcb--,r&&qt(t,r),e.prefinished=!0,t.emit("prefinish"),cr(t,e)})}function sE(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(nE,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function cr(t,e){var r=xf(e);if(r&&(sE(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function oE(t,e,r){e.ending=!0,cr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function aE(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){!this._writableState||(this._writableState.destroyed=e)}});X.prototype.destroy=_o.destroy;X.prototype._undestroy=_o.undestroy;X.prototype._destroy=function(t,e){e(t)}});var dt=g((xv,Bf)=>{"use strict";var lE=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Bf.exports=Le;var Sf=bo(),Co=Eo();pt()(Le,Sf);for(yo=lE(Co.prototype),Ii=0;Ii<yo.length;Ii++)Oi=yo[Ii],Le.prototype[Oi]||(Le.prototype[Oi]=Co.prototype[Oi]);var yo,Oi,Ii;function Le(t){if(!(this instanceof Le))return new Le(t);Sf.call(this,t),Co.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",uE)))}Object.defineProperty(Le.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Le.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Le.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function uE(){this._writableState.ended||process.nextTick(cE,this)}function cE(t){t.end()}Object.defineProperty(Le.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var If=g((vo,Rf)=>{var Ti=w("buffer"),Ne=Ti.Buffer;function Qf(t,e){for(var r in t)e[r]=t[r]}Ne.from&&Ne.alloc&&Ne.allocUnsafe&&Ne.allocUnsafeSlow?Rf.exports=Ti:(Qf(Ti,vo),vo.Buffer=At);function At(t,e,r){return Ne(t,e,r)}At.prototype=Object.create(Ne.prototype);Qf(Ne,At);At.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ne(t,e,r)};At.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ne(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};At.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ne(t)};At.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ti.SlowBuffer(t)}});var So=g(Tf=>{"use strict";var wo=If().Buffer,Of=wo.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function fE(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function hE(t){var e=fE(t);if(typeof e!="string"&&(wo.isEncoding===Of||!Of(t)))throw new Error("Unknown encoding: "+t);return e||t}Tf.StringDecoder=hr;function hr(t){this.encoding=hE(t);var e;switch(this.encoding){case"utf16le":this.text=_E,this.end=EE,e=4;break;case"utf8":this.fillLast=AE,e=4;break;case"base64":this.text=yE,this.end=CE,e=3;break;default:this.write=bE,this.end=vE;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=wo.allocUnsafe(e)}hr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};hr.prototype.end=mE;hr.prototype.text=gE;hr.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function xo(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function pE(t,e,r){var i=e.length-1;if(i<r)return 0;var n=xo(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=xo(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=xo(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function dE(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function AE(t){var e=this.lastTotal-this.lastNeed,r=dE(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function gE(t,e){var r=pE(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function mE(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function _E(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function EE(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function yE(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function CE(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function bE(t){return t.toString(this.encoding)}function vE(t){return t&&t.length?this.write(t):""}});var ki=g((Sv,Pf)=>{"use strict";var kf=ze().codes.ERR_STREAM_PREMATURE_CLOSE;function xE(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function wE(){}function SE(t){return t.setHeader&&typeof t.abort=="function"}function Df(t,e,r){if(typeof e=="function")return Df(t,null,e);e||(e={}),r=xE(r||wE);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){n=!1,o=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(A){r.call(t,A)},f=function(){var A;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(A=new kf),r.call(t,A);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(A=new kf),r.call(t,A)},h=function(){t.req.on("finish",a)};return SE(t)?(t.on("complete",a),t.on("abort",f),t.req?h():t.on("request",h)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",a),e.error!==!1&&t.on("error",c),t.on("close",f),function(){t.removeListener("complete",a),t.removeListener("abort",f),t.removeListener("request",h),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",f)}}Pf.exports=Df});var Nf=g((Bv,Lf)=>{"use strict";var Di;function tt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var BE=ki(),rt=Symbol("lastResolve"),gt=Symbol("lastReject"),pr=Symbol("error"),Pi=Symbol("ended"),mt=Symbol("lastPromise"),Bo=Symbol("handlePromise"),_t=Symbol("stream");function it(t,e){return{value:t,done:e}}function QE(t){var e=t[rt];if(e!==null){var r=t[_t].read();r!==null&&(t[mt]=null,t[rt]=null,t[gt]=null,e(it(r,!1)))}}function RE(t){process.nextTick(QE,t)}function IE(t,e){return function(r,i){t.then(function(){if(e[Pi]){r(it(void 0,!0));return}e[Bo](r,i)},i)}}var OE=Object.getPrototypeOf(function(){}),TE=Object.setPrototypeOf((Di={get stream(){return this[_t]},next:function(){var e=this,r=this[pr];if(r!==null)return Promise.reject(r);if(this[Pi])return Promise.resolve(it(void 0,!0));if(this[_t].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[pr]?a(e[pr]):o(it(void 0,!0))})});var i=this[mt],n;if(i)n=new Promise(IE(i,this));else{var s=this[_t].read();if(s!==null)return Promise.resolve(it(s,!1));n=new Promise(this[Bo])}return this[mt]=n,n}},tt(Di,Symbol.asyncIterator,function(){return this}),tt(Di,"return",function(){var e=this;return new Promise(function(r,i){e[_t].destroy(null,function(n){if(n){i(n);return}r(it(void 0,!0))})})}),Di),OE),kE=function(e){var r,i=Object.create(TE,(r={},tt(r,_t,{value:e,writable:!0}),tt(r,rt,{value:null,writable:!0}),tt(r,gt,{value:null,writable:!0}),tt(r,pr,{value:null,writable:!0}),tt(r,Pi,{value:e._readableState.endEmitted,writable:!0}),tt(r,Bo,{value:function(s,o){var a=i[_t].read();a?(i[mt]=null,i[rt]=null,i[gt]=null,s(it(a,!1))):(i[rt]=s,i[gt]=o)},writable:!0}),r));return i[mt]=null,BE(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[gt];s!==null&&(i[mt]=null,i[rt]=null,i[gt]=null,s(n)),i[pr]=n;return}var o=i[rt];o!==null&&(i[mt]=null,i[rt]=null,i[gt]=null,o(it(void 0,!0))),i[Pi]=!0}),e.on("readable",RE.bind(null,i)),i};Lf.exports=kE});var Hf=g((Qv,qf)=>{"use strict";function Ff(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(u){r(u);return}a.done?e(l):Promise.resolve(l).then(i,n)}function DE(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){Ff(s,i,n,o,a,"next",l)}function a(l){Ff(s,i,n,o,a,"throw",l)}o(void 0)})}}function Mf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function PE(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mf(Object(r),!0).forEach(function(i){LE(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function LE(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var NE=ze().codes.ERR_INVALID_ARG_TYPE;function FE(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new NE("iterable",["Iterable"],e);var n=new t(PE({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=DE(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?o():s=!1}catch(f){n.destroy(f)}}),a.apply(this,arguments)}return n}qf.exports=FE});var bo=g((Iv,Xf)=>{"use strict";Xf.exports=P;var Ht;P.ReadableState=Uf;var Rv=w("events").EventEmitter,Kf=function(e,r){return e.listeners(r).length},Ar=lo(),Li=w("buffer").Buffer,ME=global.Uint8Array||function(){};function qE(t){return Li.from(t)}function HE(t){return Li.isBuffer(t)||t instanceof ME}var Qo=w("util"),T;Qo&&Qo.debuglog?T=Qo.debuglog("stream"):T=function(){};var jE=cf(),Po=fo(),$E=ho(),KE=$E.getHighWaterMark,Ni=ze().codes,UE=Ni.ERR_INVALID_ARG_TYPE,GE=Ni.ERR_STREAM_PUSH_AFTER_EOF,JE=Ni.ERR_METHOD_NOT_IMPLEMENTED,YE=Ni.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,jt,Ro,Io;pt()(P,Ar);var dr=Po.errorOrDestroy,Oo=["error","close","destroy","pause","resume"];function VE(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Uf(t,e,r){Ht=Ht||dt(),t=t||{},typeof r!="boolean"&&(r=e instanceof Ht),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=KE(this,t,"readableHighWaterMark",r),this.buffer=new jE,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(jt||(jt=So().StringDecoder),this.decoder=new jt(t.encoding),this.encoding=t.encoding)}function P(t){if(Ht=Ht||dt(),!(this instanceof P))return new P(t);var e=this instanceof Ht;this._readableState=new Uf(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Ar.call(this)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){!this._readableState||(this._readableState.destroyed=e)}});P.prototype.destroy=Po.destroy;P.prototype._undestroy=Po.undestroy;P.prototype._destroy=function(t,e){e(t)};P.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Li.from(t,e),e=""),i=!0),Gf(this,t,e,!1,i)};P.prototype.unshift=function(t){return Gf(this,t,null,!0,!1)};function Gf(t,e,r,i,n){T("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,ZE(t,s);else{var o;if(n||(o=WE(s,e)),o)dr(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Li.prototype&&(e=qE(e)),i)s.endEmitted?dr(t,new YE):To(t,s,e,!0);else if(s.ended)dr(t,new GE);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?To(t,s,e,!1):Do(t,s)):To(t,s,e,!1)}else i||(s.reading=!1,Do(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function To(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Fi(t)),Do(t,e)}function WE(t,e){var r;return!HE(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new UE("chunk",["string","Buffer","Uint8Array"],e)),r}P.prototype.isPaused=function(){return this._readableState.flowing===!1};P.prototype.setEncoding=function(t){jt||(jt=So().StringDecoder);var e=new jt(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var jf=1073741824;function XE(t){return t>=jf?t=jf:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function $f(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=XE(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}P.prototype.read=function(t){T("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return T("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ko(this):Fi(this),null;if(t=$f(t,e),t===0&&e.ended)return e.length===0&&ko(this),null;var i=e.needReadable;T("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,T("length less than watermark",i)),e.ended||e.reading?(i=!1,T("reading or ended",i)):i&&(T("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=$f(r,e)));var n;return t>0?n=Vf(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ko(this)),n!==null&&this.emit("data",n),n};function ZE(t,e){if(T("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Fi(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Jf(t)))}}function Fi(t){var e=t._readableState;T("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(T("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Jf,t))}function Jf(t){var e=t._readableState;T("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Lo(t)}function Do(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(zE,t,e))}function zE(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(T("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}P.prototype._read=function(t){dr(this,new JE("_read()"))};P.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,T("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:_;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(v,b){T("onunpipe"),v===r&&b&&b.hasUnpiped===!1&&(b.hasUnpiped=!0,c())}function a(){T("onend"),t.end()}var l=e0(r);t.on("drain",l);var u=!1;function c(){T("cleanup"),t.removeListener("close",y),t.removeListener("finish",A),t.removeListener("drain",l),t.removeListener("error",h),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",_),r.removeListener("data",f),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",f);function f(v){T("ondata");var b=t.write(v);T("dest.write",b),b===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Wf(i.pipes,t)!==-1)&&!u&&(T("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(v){T("onerror",v),_(),t.removeListener("error",h),Kf(t,"error")===0&&dr(t,v)}VE(t,"error",h);function y(){t.removeListener("finish",A),_()}t.once("close",y);function A(){T("onfinish"),t.removeListener("close",y),_()}t.once("finish",A);function _(){T("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(T("pipe resume"),r.resume()),t};function e0(t){return function(){var r=t._readableState;T("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Kf(t,"data")&&(r.flowing=!0,Lo(t))}}P.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=Wf(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};P.prototype.on=function(t,e){var r=Ar.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,T("on readable",i.length,i.reading),i.length?Fi(this):i.reading||process.nextTick(t0,this)),r};P.prototype.addListener=P.prototype.on;P.prototype.removeListener=function(t,e){var r=Ar.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Yf,this),r};P.prototype.removeAllListeners=function(t){var e=Ar.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Yf,this),e};function Yf(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function t0(t){T("readable nexttick read 0"),t.read(0)}P.prototype.resume=function(){var t=this._readableState;return t.flowing||(T("resume"),t.flowing=!t.readableListening,r0(this,t)),t.paused=!1,this};function r0(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(i0,t,e))}function i0(t,e){T("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Lo(t),e.flowing&&!e.reading&&t.read(0)}P.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Lo(t){var e=t._readableState;for(T("flow",e.flowing);e.flowing&&t.read()!==null;);}P.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(T("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(T("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(a){return function(){return t[a].apply(t,arguments)}}(n));for(var s=0;s<Oo.length;s++)t.on(Oo[s],this.emit.bind(this,Oo[s]));return this._read=function(o){T("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(P.prototype[Symbol.asyncIterator]=function(){return Ro===void 0&&(Ro=Nf()),Ro(this)});Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});P._fromList=Vf;Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Vf(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ko(t){var e=t._readableState;T("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(n0,e,t))}function n0(t,e){if(T("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(P.from=function(t,e){return Io===void 0&&(Io=Hf()),Io(P,t,e)});function Wf(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var No=g((Ov,zf)=>{"use strict";zf.exports=Ke;var Mi=ze().codes,s0=Mi.ERR_METHOD_NOT_IMPLEMENTED,o0=Mi.ERR_MULTIPLE_CALLBACK,a0=Mi.ERR_TRANSFORM_ALREADY_TRANSFORMING,l0=Mi.ERR_TRANSFORM_WITH_LENGTH_0,qi=dt();pt()(Ke,qi);function u0(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new o0);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Ke(t){if(!(this instanceof Ke))return new Ke(t);qi.call(this,t),this._transformState={afterTransform:u0.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",c0)}function c0(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Zf(t,e,r)}):Zf(this,null,null)}Ke.prototype.push=function(t,e){return this._transformState.needTransform=!1,qi.prototype.push.call(this,t,e)};Ke.prototype._transform=function(t,e,r){r(new s0("_transform()"))};Ke.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Ke.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Ke.prototype._destroy=function(t,e){qi.prototype._destroy.call(this,t,function(r){e(r)})};function Zf(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new l0;if(t._transformState.transforming)throw new a0;return t.push(null)}});var rh=g((Tv,th)=>{"use strict";th.exports=gr;var eh=No();pt()(gr,eh);function gr(t){if(!(this instanceof gr))return new gr(t);eh.call(this,t)}gr.prototype._transform=function(t,e,r){r(null,t)}});var ah=g((kv,oh)=>{"use strict";var Fo;function f0(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var sh=ze().codes,h0=sh.ERR_MISSING_ARGS,p0=sh.ERR_STREAM_DESTROYED;function ih(t){if(t)throw t}function d0(t){return t.setHeader&&typeof t.abort=="function"}function A0(t,e,r,i){i=f0(i);var n=!1;t.on("close",function(){n=!0}),Fo===void 0&&(Fo=ki()),Fo(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,d0(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(o||new p0("pipe"))}}}function nh(t){t()}function g0(t,e){return t.pipe(e)}function m0(t){return!t.length||typeof t[t.length-1]!="function"?ih:t.pop()}function _0(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=m0(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new h0("streams");var n,s=e.map(function(o,a){var l=a<e.length-1,u=a>0;return A0(o,l,u,function(c){n||(n=c),c&&s.forEach(nh),!l&&(s.forEach(nh),i(n))})});return e.reduce(g0)}oh.exports=_0});var lh=g((ye,_r)=>{var mr=w("stream");process.env.READABLE_STREAM==="disable"&&mr?(_r.exports=mr.Readable,Object.assign(_r.exports,mr),_r.exports.Stream=mr):(ye=_r.exports=bo(),ye.Stream=mr||ye,ye.Readable=ye,ye.Writable=Eo(),ye.Duplex=dt(),ye.Transform=No(),ye.PassThrough=rh(),ye.finished=ki(),ye.pipeline=ah())});var fh=g((Dv,ch)=>{"use strict";var{Buffer:Se}=w("buffer"),uh=Symbol.for("BufferList");function K(t){if(!(this instanceof K))return new K(t);K._init.call(this,t)}K._init=function(e){Object.defineProperty(this,uh,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)};K.prototype._new=function(e){return new K(e)};K.prototype._offset=function(e){if(e===0)return[0,0];let r=0;for(let i=0;i<this._bufs.length;i++){let n=r+this._bufs[i].length;if(e<n||i===this._bufs.length-1)return[i,e-r];r=n}};K.prototype._reverseOffset=function(t){let e=t[0],r=t[1];for(let i=0;i<e;i++)r+=this._bufs[i].length;return r};K.prototype.get=function(e){if(e>this.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};K.prototype.slice=function(e,r){return typeof e=="number"&&e<0&&(e+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};K.prototype.copy=function(e,r,i,n){if((typeof i!="number"||i<0)&&(i=0),(typeof n!="number"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return e||Se.alloc(0);let s=!!e,o=this._offset(i),a=n-i,l=a,u=s&&r||0,c=o[1];if(i===0&&n===this.length){if(!s)return this._bufs.length===1?this._bufs[0]:Se.concat(this._bufs,this.length);for(let f=0;f<this._bufs.length;f++)this._bufs[f].copy(e,u),u+=this._bufs[f].length;return e}if(l<=this._bufs[o[0]].length-c)return s?this._bufs[o[0]].copy(e,r,c,c+l):this._bufs[o[0]].slice(c,c+l);s||(e=Se.allocUnsafe(a));for(let f=o[0];f<this._bufs.length;f++){let h=this._bufs[f].length-c;if(l>h)this._bufs[f].copy(e,u,c),u+=h;else{this._bufs[f].copy(e,u,c,c+l),u+=h;break}l-=h,c&&(c=0)}return e.length>u?e.slice(0,u):e};K.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!="number"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let i=this._offset(e),n=this._offset(r),s=this._bufs.slice(i[0],n[0]+1);return n[1]===0?s.pop():s[s.length-1]=s[s.length-1].slice(0,n[1]),i[1]!==0&&(s[0]=s[0].slice(i[1])),this._new(s)};K.prototype.toString=function(e,r,i){return this.slice(r,i).toString(e)};K.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};K.prototype.duplicate=function(){let e=this._new();for(let r=0;r<this._bufs.length;r++)e.append(this._bufs[r]);return e};K.prototype.append=function(e){if(e==null)return this;if(e.buffer)this._appendBuffer(Se.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let r=0;r<e.length;r++)this.append(e[r]);else if(this._isBufferList(e))for(let r=0;r<e._bufs.length;r++)this.append(e._bufs[r]);else typeof e=="number"&&(e=e.toString()),this._appendBuffer(Se.from(e));return this};K.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length};K.prototype.indexOf=function(t,e,r){if(r===void 0&&typeof e=="string"&&(r=e,e=void 0),typeof t=="function"||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof t=="number"?t=Se.from([t]):typeof t=="string"?t=Se.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=Se.from(t.buffer,t.byteOffset,t.byteLength):Se.isBuffer(t)||(t=Se.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),t.length===0)return e>this.length?this.length:e;let i=this._offset(e),n=i[0],s=i[1];for(;n<this._bufs.length;n++){let o=this._bufs[n];for(;s<o.length;)if(o.length-s>=t.length){let l=o.indexOf(t,s);if(l!==-1)return this._reverseOffset([n,l]);s=o.length-t.length+1}else{let l=this._reverseOffset([n,s]);if(this._match(l,t))return l;s++}s=0}return-1};K.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0};(function(){let t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in t)(function(r){t[r]===null?K.prototype[r]=function(i,n){return this.slice(i,i+n)[r](0,n)}:K.prototype[r]=function(i=0){return this.slice(i,i+t[r])[r](0)}})(e)})();K.prototype._isBufferList=function(e){return e instanceof K||K.isBufferList(e)};K.isBufferList=function(e){return e!=null&&e[uh]};ch.exports=K});var hh=g((Pv,Hi)=>{"use strict";var Mo=lh().Duplex,E0=pt(),Er=fh();function le(t){if(!(this instanceof le))return new le(t);if(typeof t=="function"){this._callback=t;let e=function(i){this._callback&&(this._callback(i),this._callback=null)}.bind(this);this.on("pipe",function(i){i.on("error",e)}),this.on("unpipe",function(i){i.removeListener("error",e)}),t=null}Er._init.call(this,t),Mo.call(this)}E0(le,Mo);Object.assign(le.prototype,Er.prototype);le.prototype._new=function(e){return new le(e)};le.prototype._write=function(e,r,i){this._appendBuffer(e),typeof i=="function"&&i()};le.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)};le.prototype.end=function(e){Mo.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)};le.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e)};le.prototype._isBufferList=function(e){return e instanceof le||e instanceof Er||le.isBufferList(e)};le.isBufferList=Er.isBufferList;Hi.exports=le;Hi.exports.BufferListStream=le;Hi.exports.BufferList=Er});var ca=g((Jw,zh)=>{var Wi=w("fs"),Zh=w("path"),By=w("os");function la(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}function ua(t,e){try{return e(t)}catch(r){if(/^(ENOENT|EPERM|EACCES)$/.test(r.code))return r.code!=="ENOENT"&&console.warn("Warning: Cannot access %s",t),!1;throw r}}var Qy={nil:function(t){return t==null},array:function(t){return Array.isArray(t)},emptyObject:function(t){for(var e in t)return!1;return!0},buffer:function(t){return Buffer.isBuffer(t)},regExp:function(t){return la(t,"RegExp")},string:function(t){return la(t,"String")},func:function(t){return typeof t=="function"},number:function(t){return la(t,"Number")},exists:function(t){return Wi.existsSync(t)},file:function(t){return ua(t,function(e){return Wi.statSync(e).isFile()})},samePath:function(t,e){return Zh.resolve(t)===Zh.resolve(e)},directory:function(t){return ua(t,function(e){return Wi.statSync(e).isDirectory()})},symbolicLink:function(t){return ua(t,function(e){return Wi.lstatSync(e).isSymbolicLink()})},windows:function(){return By.platform()==="win32"}};zh.exports=Qy});var np=g((Yw,ip)=>{var Ir=w("fs"),ep=w("os"),fa=w("path"),Xi=ca(),Rr,Ry=ep.tmpdir&&ep.tmpdir()||process.env.TMPDIR||process.env.TEMP||process.cwd();function rp(){this.stack=[]}rp.prototype={create:function(t,e){var r=fa.join(e,"node-watch-"+Math.random().toString(16).substr(2));return this.stack.push({name:r,type:t}),r},write:function(){for(var t=0;t<arguments.length;++t)Ir.writeFileSync(arguments[t]," ")},mkdir:function(){for(var t=0;t<arguments.length;++t)Ir.mkdirSync(arguments[t])},cleanup:function(t){try{for(var e;e=this.stack.pop();){var r=e.type,i=e.name;r==="file"&&Xi.file(i)?Ir.unlinkSync(i):r==="dir"&&Xi.directory(i)&&Ir.rmdirSync(i)}}finally{Xi.func(t)&&t()}}};var tp=!1;ip.exports=function t(e){if(!Xi.func(e))return!1;if(Rr!==void 0)return e(Rr);if(!tp)tp=!0;else return setTimeout(function(){t(e)},300);var r=new rp,i=r.create("dir",Ry),n=r.create("dir",i),s=r.create("file",n);r.mkdir(i,n);var o={recursive:!0},a;try{a=Ir.watch(i,o)}catch(u){if(u.code=="ERR_FEATURE_UNAVAILABLE_ON_PLATFORM")return e(Rr=!1);throw u}if(!a)return!1;var l=setTimeout(function(){a.close(),r.cleanup(function(){e(Rr=!1)})},200);a.on("change",function(u,c){fa.basename(s)===fa.basename(c)&&(a.close(),clearTimeout(l),r.cleanup(function(){e(Rr=!0)}))}),r.write(s)}});var Ap=g((Vw,Aa)=>{var pa=w("fs"),Or=w("path"),op=w("util"),ap=w("events"),lp=np(),H=ca(),Iy="update",up="remove",sp=Symbol("skip");function Oy(t){return t.some(function(e,r,i){return i.indexOf(e)!==r})}function da(t){return t.filter(function(e,r,i){return i.indexOf(e)===r})}function Ty(t){return t.reduce(function(e,r){return e.concat(r)},[])}function ky(t){if(t&&t!=="buffer"&&!Buffer.isEncoding(t))throw new Error("Unknown encoding: "+t)}function Dy(t){return H.func(t)?function(e,r){t(e,!1)&&r()}:H.regExp(t)?function(e,r){t.test(e)&&r()}:function(e,r){r()}}function Py(t){return t.map(function(e){return H.exists(e)?[Iy,e]:[up,e]})}function Ly(t){var e=da(t),r=/~$|^\.#|^##$/g,i=t.some(function(s){return r.test(s)});if(i){var n=Oy(t.map(function(s){return s.replace(r,"")}));n&&(e=e.filter(function(s){return H.exists(s)}))}return Py(e)}function Ny(t,e){var r,i=[],n=t.options.encoding,s=t.options.delay;H.number(s)||(s=200);function o(){Ly(i).forEach(function(a){a[1]=Buffer.from(a[1]),n!=="buffer"&&(a[1]=a[1].toString(n)),e.apply(null,a)}),r=null,i=[]}return function(a,l){i.push(l),r||(r=setTimeout(o,s))}}function cp(){var t={};return function(e){return function(r,i){t[r+i]=[r,i],setTimeout(function(){Object.keys(t).forEach(function(n){e.apply(null,t[n])}),t={}})}}}function fp(t,e,r=function(){}){H.directory(t)?pa.readdir(t,function(i,n){if(i)if(/^(EPERM|EACCES)$/.test(i.code))console.warn("Warning: Cannot access %s.",t);else throw i;else n.forEach(function(s){var o=Or.join(t,s);H.directory(o)&&e(o)}),r()}):r()}function Fy(t){var e=0;return function(){return e++,function(){e--,e===0&&t()}}}function My(){return function(){}}function hp(t,e){return!H.func(e)||e(t,sp)!==sp}var pp=op.deprecate(function(){},"(node-watch) First param in callback function is replaced with event name since 0.5.0, use `(evt, filename) => {}` if you want to get the filename");function Me(){ap.EventEmitter.call(this),this.watchers={},this._isReady=!1,this._isClosed=!1}op.inherits(Me,ap.EventEmitter);Me.prototype.expose=function(){var t={},e=this,r=["on","emit","once","close","isClosed","listeners","setMaxListeners","getMaxListeners","getWatchedPaths"];return r.forEach(function(i){t[i]=function(){return e[i].apply(e,arguments)}}),t};Me.prototype.isClosed=function(){return this._isClosed};Me.prototype.close=function(t){var e=this;if(t){var r=this.watchers[t];r&&r.close&&(r.close(),delete e.watchers[t]),fp(t,function(i){e.close(i)})}else Object.keys(e.watchers).forEach(function(i){var n=e.watchers[i];n&&n.close&&n.close()}),this.watchers={};H.emptyObject(e.watchers)&&(this._isClosed||(this._isClosed=!0,process.nextTick(dp,this)))};Me.prototype.getWatchedPaths=function(t){if(H.func(t)){var e=this;e._isReady?t(Object.keys(e.watchers)):e.on("ready",function(){t(Object.keys(e.watchers))})}};function ha(t){t._isReady||(t._isReady=!0,process.nextTick(function(){t.emit("ready")}))}function dp(t){t.emit("close")}Me.prototype.add=function(t,e){var r=this;e=e||{fpath:""};var i=Or.resolve(e.fpath);this.watchers[i]=t;var n=function(o,a){if(!r.isClosed()){var l=a;H.nil(l)&&(l=""),l=Or.join(e.fpath,l),e.options.recursive&&lp(function(u){if(!u){var c=Or.resolve(l);if(!H.exists(l))r.close(c);else{var f=H.directory(l)&&!r.watchers[c]&&hp(l,e.options.filter);f&&r.watchDirectory(l,e.options)}}}),s(o,l)}},s=Ny(e,function(o,a){if(e.compareName)e.compareName(a)&&r.emit("change",o,a);else{var l=Dy(e.options.filter);l(a,function(){r.flag?r.flag="":r.emit("change",o,a)})}});t.on("error",function(o){r.isClosed()||(H.windows()&&o.code==="EPERM"?(t.emit("change",up,e.fpath&&""),r.flag="windows-error",r.close(i)):r.emit("error",o))}),t.on("change",n)};Me.prototype.watchFile=function(t,e,r){var i=Or.join(t,"../"),n=Object.assign({},e,{filter:null,encoding:"utf8"});delete n.recursive;var s=pa.watch(i,n);this.add(s,{type:"file",fpath:i,options:Object.assign({},n,{encoding:e.encoding}),compareName:function(o){return H.samePath(o,t)}}),H.func(r)&&(r.length===1&&pp(),this.on("change",r))};Me.prototype.watchDirectory=function(t,e,r,i=My){var n=this,s=i();lp(function(o){e.recursive=!!e.recursive;var a=Object.assign({},e,{encoding:"utf8"});if(o||delete a.recursive,n._isClosed)return s(),n.close();var l=pa.watch(t,a);n.add(l,{type:"dir",fpath:t,options:e}),H.func(r)&&(r.length===1&&pp(),n.on("change",r)),e.recursive&&!o&&fp(t,function(u){hp(u,e.filter)&&n.watchDirectory(u,e,null,i)},i()),s()})};function qy(t){var e=new Me,r=cp(),i=t.length;return t.forEach(function(n){n.on("change",r(function(s,o){e.emit("change",s,o)})),n.on("error",function(s){e.emit("error",s)}),n.on("ready",function(){--i||ha(e)})}),e.close=function(){t.forEach(function(n){n.close()}),process.nextTick(dp,e)},e.getWatchedPaths=function(n){if(H.func(n)){var s=t.map(function(o){return new Promise(function(a){o.getWatchedPaths(a)})});Promise.all(s).then(function(o){var a=da(Ty(o));n(a)})}},e.expose()}function Zi(t,e,r){var i=new Me;if(H.buffer(t)&&(t=t.toString()),!H.array(t)&&!H.exists(t)&&i.emit("error",new Error(t+" does not exist.")),H.string(e)&&(e={encoding:e}),H.func(e)&&(r=e,e={}),arguments.length<2&&(e={}),e.encoding?ky(e.encoding):e.encoding="utf8",H.array(t)){if(t.length===1)return Zi(t[0],e,r);var n=cp();return qy(da(t).map(function(o){var a=Zi(o,e);return H.func(r)&&a.on("change",n(r)),a}))}if(H.file(t))i.watchFile(t,e,r),ha(i);else if(H.directory(t)){var s=Fy(function(){ha(i)});i.watchDirectory(t,e,r,s)}return i.expose()}Aa.exports=Zi;Aa.exports.default=Zi});var ma=(t=0)=>e=>`\x1B[${e+t}m`,_a=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Ea=(t=0)=>(e,r,i)=>`\x1B[${38+t};2;${e};${r};${i}m`,G={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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},ya=Object.keys(G.modifier),en=Object.keys(G.color),tn=Object.keys(G.bgColor),Ca=[...en,...tn];function Rp(){let t=new Map;for(let[e,r]of Object.entries(G)){for(let[i,n]of Object.entries(r))G[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=G[i],t.set(n[0],n[1]);Object.defineProperty(G,e,{value:r,enumerable:!1})}return Object.defineProperty(G,"codes",{value:t,enumerable:!1}),G.color.close="\x1B[39m",G.bgColor.close="\x1B[49m",G.color.ansi=ma(),G.color.ansi256=_a(),G.color.ansi16m=Ea(),G.bgColor.ansi=ma(10),G.bgColor.ansi256=_a(10),G.bgColor.ansi16m=Ea(10),Object.defineProperties(G,{rgbToAnsi256:{value(e,r,i){return e===r&&r===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(s=>s+s).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:e=>G.rgbToAnsi256(...G.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,i,n;if(e>=232)r=((e-232)*10+8)/255,i=r,n=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,i=Math.floor(a/6)/5,n=a%6/5}let s=Math.max(r,i,n)*2;if(s===0)return 30;let o=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,r,i)=>G.ansi256ToAnsi(G.rgbToAnsi256(e,r,i)),enumerable:!1},hexToAnsi:{value:e=>G.ansi256ToAnsi(G.hexToAnsi256(e)),enumerable:!1}}),G}var Ip=Rp(),ve=Ip;import rn from"node:process";import Op from"node:os";import ba from"node:tty";function ge(t,e=rn.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",i=e.indexOf(r+t),n=e.indexOf("--");return i!==-1&&(n===-1||i<n)}var{env:z}=rn,Lr;ge("no-color")||ge("no-colors")||ge("color=false")||ge("color=never")?Lr=0:(ge("color")||ge("colors")||ge("color=true")||ge("color=always"))&&(Lr=1);function Tp(){if("FORCE_COLOR"in z)return z.FORCE_COLOR==="true"?1:z.FORCE_COLOR==="false"?0:z.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(z.FORCE_COLOR,10),3)}function kp(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Dp(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let i=Tp();i!==void 0&&(Lr=i);let n=r?Lr:i;if(n===0)return 0;if(r){if(ge("color=16m")||ge("color=full")||ge("color=truecolor"))return 3;if(ge("color=256"))return 2}if(t&&!e&&n===void 0)return 0;let s=n||0;if(z.TERM==="dumb")return s;if(rn.platform==="win32"){let o=Op.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in z)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in z)||z.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(z.TEAMCITY_VERSION)?1:0;if("TF_BUILD"in z&&"AGENT_NAME"in z)return 1;if(z.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in z){let o=Number.parseInt((z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(z.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(z.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(z.TERM)||"COLORTERM"in z?1:s}function va(t,e={}){let r=Dp(t,{streamIsTTY:t&&t.isTTY,...e});return kp(r)}var Pp={stdout:va({isTTY:ba.isatty(1)}),stderr:va({isTTY:ba.isatty(2)})},xa=Pp;function wa(t,e,r){let i=t.indexOf(e);if(i===-1)return t;let n=e.length,s=0,o="";do o+=t.slice(s,i)+e+r,s=i+n,i=t.indexOf(e,s);while(i!==-1);return o+=t.slice(s),o}function Sa(t,e,r,i){let n=0,s="";do{let o=t[i-1]==="\r";s+=t.slice(n,o?i-1:i)+e+(o?`\r
23
24
  `:`
24
- `)+t,n=i+1,i=s.indexOf(`
25
- `,n)}while(i!==-1);return r+=s.slice(n),r}var{stdout:de,stderr:ge}=pe,L=Symbol("GENERATOR"),x=Symbol("STYLER"),F=Symbol("IS_EMPTY"),_e=["ansi","ansi","ansi256","ansi16m"],y=Object.create(null),Je=(s,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=de?de.level:0;s.level=e.level===void 0?t:e.level};var ze=s=>{let e=(...t)=>t.join(" ");return Je(e,s),Object.setPrototypeOf(e,T.prototype),e};function T(s){return ze(s)}Object.setPrototypeOf(T.prototype,Function.prototype);for(let[s,e]of Object.entries(b))y[s]={get(){let t=k(this,W(e.open,e.close,this[x]),this[F]);return Object.defineProperty(this,s,{value:t}),t}};y.visible={get(){let s=k(this,this[x],!0);return Object.defineProperty(this,"visible",{value:s}),s}};var q=(s,e,t,...i)=>s==="rgb"?e==="ansi16m"?b[t].ansi16m(...i):e==="ansi256"?b[t].ansi256(b.rgbToAnsi256(...i)):b[t].ansi(b.rgbToAnsi(...i)):s==="hex"?q("rgb",e,t,...b.hexToRgb(...i)):b[t][s](...i),Qe=["rgb","hex","ansi256"];for(let s of Qe){y[s]={get(){let{level:t}=this;return function(...i){let n=W(q(s,_e[t],"color",...i),b.color.close,this[x]);return k(this,n,this[F])}}};let e="bg"+s[0].toUpperCase()+s.slice(1);y[e]={get(){let{level:t}=this;return function(...i){let n=W(q(s,_e[t],"bgColor",...i),b.bgColor.close,this[x]);return k(this,n,this[F])}}}}var Xe=Object.defineProperties(()=>{},{...y,level:{enumerable:!0,get(){return this[L].level},set(s){this[L].level=s}}}),W=(s,e,t)=>{let i,n;return t===void 0?(i=s,n=e):(i=t.openAll+s,n=e+t.closeAll),{open:s,close:e,openAll:i,closeAll:n,parent:t}},k=(s,e,t)=>{let i=(...n)=>Ze(i,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(i,Xe),i[L]=s,i[x]=e,i[F]=t,i},Ze=(s,e)=>{if(s.level<=0||!e)return s[F]?"":e;let t=s[x];if(t===void 0)return e;let{openAll:i,closeAll:n}=t;if(e.includes("\x1B"))for(;t!==void 0;)e=me(e,t.close,t.open),t=t.parent;let r=e.indexOf(`
26
- `);return r!==-1&&(e=fe(e,n,i,r)),i+e+n};Object.defineProperties(T.prototype,y);var et=T(),It=T({level:ge?ge.level:0});var A=et;var Ne=je(Ve(),1),{program:Ut,createCommand:Gt,createArgument:Yt,createOption:Kt,CommanderError:Jt,InvalidArgumentError:zt,InvalidOptionArgumentError:Qt,Command:He,Argument:Xt,Option:Zt,Help:ei}=Ne.default;import{build as bt}from"./commands/build/index.js";import{convert as Ot}from"./commands/convert/index.js";import{create as Ct}from"./commands/create/index.js";import{dev as At}from"./commands/dev/index.js";import{execute as Et}from"./commands/execute/index.js";import{tsmodulePackageJson as wt}from"./constants.js";import{normalizeImportSpecifiers as xt}from"./commands/normalize/index.js";import{programCatch as v}from"./utils/programCatch.js";var{version:yt}=await wt(),E=new He;E.name(A.white(A.bold("tsmodule"))).usage(A.white(A.bold("<file | command> [options]"))).description(A.blueBright(`A tool for building TypeScript modules.
25
+ `)+r,n=i+1,i=t.indexOf(`
26
+ `,n)}while(i!==-1);return s+=t.slice(n),s}var{stdout:Ba,stderr:Qa}=xa,nn=Symbol("GENERATOR"),vt=Symbol("STYLER"),Zt=Symbol("IS_EMPTY"),Ra=["ansi","ansi","ansi256","ansi16m"],xt=Object.create(null),Lp=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Ba?Ba.level:0;t.level=e.level===void 0?r:e.level};var Np=t=>{let e=(...r)=>r.join(" ");return Lp(e,t),Object.setPrototypeOf(e,zt.prototype),e};function zt(t){return Np(t)}Object.setPrototypeOf(zt.prototype,Function.prototype);for(let[t,e]of Object.entries(ve))xt[t]={get(){let r=Nr(this,on(e.open,e.close,this[vt]),this[Zt]);return Object.defineProperty(this,t,{value:r}),r}};xt.visible={get(){let t=Nr(this,this[vt],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var sn=(t,e,r,...i)=>t==="rgb"?e==="ansi16m"?ve[r].ansi16m(...i):e==="ansi256"?ve[r].ansi256(ve.rgbToAnsi256(...i)):ve[r].ansi(ve.rgbToAnsi(...i)):t==="hex"?sn("rgb",e,r,...ve.hexToRgb(...i)):ve[r][t](...i),Fp=["rgb","hex","ansi256"];for(let t of Fp){xt[t]={get(){let{level:r}=this;return function(...i){let n=on(sn(t,Ra[r],"color",...i),ve.color.close,this[vt]);return Nr(this,n,this[Zt])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);xt[e]={get(){let{level:r}=this;return function(...i){let n=on(sn(t,Ra[r],"bgColor",...i),ve.bgColor.close,this[vt]);return Nr(this,n,this[Zt])}}}}var Mp=Object.defineProperties(()=>{},{...xt,level:{enumerable:!0,get(){return this[nn].level},set(t){this[nn].level=t}}}),on=(t,e,r)=>{let i,n;return r===void 0?(i=t,n=e):(i=r.openAll+t,n=e+r.closeAll),{open:t,close:e,openAll:i,closeAll:n,parent:r}},Nr=(t,e,r)=>{let i=(...n)=>qp(i,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(i,Mp),i[nn]=t,i[vt]=e,i[Zt]=r,i},qp=(t,e)=>{if(t.level<=0||!e)return t[Zt]?"":e;let r=t[vt];if(r===void 0)return e;let{openAll:i,closeAll:n}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=wa(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
27
+ `);return s!==-1&&(e=Sa(e,n,i,s)),i+e+n};Object.defineProperties(zt.prototype,xt);var Hp=zt(),sC=zt({level:Qa?Qa.level:0});var S=Hp;var Ka=Ie($a(),1),{program:dC,createCommand:AC,createArgument:gC,createOption:mC,CommanderError:_C,InvalidArgumentError:EC,InvalidOptionArgumentError:yC,Command:Ua,Argument:CC,Option:bC,Help:vC}=Ka.default;import{constants as hy,existsSync as wr}from"fs";import{copyFile as py,mkdir as Nh,readFile as Fh,rm as Th,writeFile as dy}from"fs/promises";import{dirname as Mh,extname as Ay,isAbsolute as gy,resolve as my,resolve as Wt}from"path";import{build as ia,transform as _y}from"esbuild";var na=Ie(gi(),1);import{env as kh}from"process";import $i from"node:process";import Uc from"node:process";var jc=Ie(Pc(),1),$c=Ie(Hc(),1);import l_ from"node:process";var u_=(0,jc.default)(()=>{(0,$c.default)(()=>{l_.stderr.write("\x1B[?25h")},{alwaysLast:!0})}),Kc=u_;var vi=!1,Ft={};Ft.show=(t=Uc.stderr)=>{!t.isTTY||(vi=!1,t.write("\x1B[?25h"))};Ft.hide=(t=Uc.stderr)=>{!t.isTTY||(Kc(),vi=!0,t.write("\x1B[?25l"))};Ft.toggle=(t,e)=>{t!==void 0&&(vi=t),vi?Ft.show(e):Ft.hide(e)};var io=Ft;var yr=Ie(Vc(),1);import we from"node:process";function ar(){return we.platform!=="win32"?we.env.TERM!=="linux":Boolean(we.env.CI)||Boolean(we.env.WT_SESSION)||Boolean(we.env.TERMINUS_SUBLIME)||we.env.ConEmuTask==="{cmd::Cmder}"||we.env.TERM_PROGRAM==="Terminus-Sublime"||we.env.TERM_PROGRAM==="vscode"||we.env.TERM==="xterm-256color"||we.env.TERM==="alacritty"||we.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var f_={info:S.blue("ℹ"),success:S.green("✔"),warning:S.yellow("⚠"),error:S.red("✖")},h_={info:S.blue("i"),success:S.green("√"),warning:S.yellow("‼"),error:S.red("×")},p_=ar()?f_:h_,lr=p_;function no({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function so(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(no(),"")}var dh=Ie(sf(),1);function ao({stream:t=process.stdout}={}){return Boolean(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var ph=Ie(hh(),1);import Be from"node:process";import y0 from"node:readline";var C0=3,ji=class{#r=0;#c=new ph.BufferListStream;#n;#i;constructor(){this.#c.pipe(Be.stdout);let e=this;this.#n=function(r,i,...n){let{stdin:s}=Be;if(e.#r>0||s.emit===e.#n){if(r==="keypress")return;r==="data"&&i.includes(C0)&&Be.emit("SIGINT"),Reflect.apply(e.#n,this,[r,i,...n])}else Reflect.apply(Be.stdin.emit,this,[r,i,...n])}}start(){this.#r++,this.#r===1&&this._realStart()}stop(){if(this.#r<=0)throw new Error("`stop` called more times than `start`");this.#r--,this.#r===0&&this._realStop()}_realStart(){Be.platform!=="win32"&&(this.#i=y0.createInterface({input:Be.stdin,output:this.#c}),this.#i.on("SIGINT",()=>{Be.listenerCount("SIGINT")===0?Be.emit("SIGINT"):(this.#i.close(),Be.kill(Be.pid,"SIGINT"))}))}_realStop(){Be.platform!=="win32"&&(this.#i.close(),this.#i=void 0)}};var Ki,qo=class{#r=0;#c=!1;#n=0;#i=0;#e;#o;#t;#f;#h;#a;#l;#u;#p;#s;color;constructor(e){Ki||(Ki=new ji),typeof e=="string"&&(e={text:e}),this.#e={color:"cyan",stream:$i.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#e.color,this.spinner=this.#e.spinner,this.#h=this.#e.interval,this.#t=this.#e.stream,this.#a=typeof this.#e.isEnabled=="boolean"?this.#e.isEnabled:ao({stream:this.#t}),this.#l=typeof this.#e.isSilent=="boolean"?this.#e.isSilent:!1,this.text=this.#e.text,this.prefixText=this.#e.prefixText,this.indent=this.#e.indent,$i.env.NODE_ENV==="test"&&(this._stream=this.#t,this._isEnabled=this.#a,Object.defineProperty(this,"_linesToClear",{get(){return this.#r},set(r){this.#r=r}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#i}}),Object.defineProperty(this,"_lineCount",{get(){return this.#n}}))}get indent(){return this.#u}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#u=e,this.updateLineCount()}get interval(){return this.#h||this.#o.interval||100}get spinner(){return this.#o}set spinner(e){if(this.#i=0,this.#h=void 0,typeof e=="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#o=e}else if(!ar())this.#o=yr.default.line;else if(e===void 0)this.#o=yr.default.dots;else if(e!=="default"&&yr.default[e])this.#o=yr.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#p}set text(e){this.#p=e||"",this.updateLineCount()}get prefixText(){return this.#s}set prefixText(e){this.#s=e||"",this.updateLineCount()}get isSpinning(){return this.#f!==void 0}getFullPrefixText(e=this.#s,r=" "){return typeof e=="string"&&e!==""?e+r:typeof e=="function"?e()+r:""}updateLineCount(){let e=this.#t.columns||80,r=this.getFullPrefixText(this.#s,"-");this.#n=0;for(let i of so(" ".repeat(this.#u)+r+"--"+this.#p).split(`
28
+ `))this.#n+=Math.max(1,Math.ceil((0,dh.default)(i)/e))}get isEnabled(){return this.#a&&!this.#l}set isEnabled(e){if(typeof e!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#a=e}get isSilent(){return this.#l}set isSilent(e){if(typeof e!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#l=e}frame(){let{frames:e}=this.#o,r=e[this.#i];this.color&&(r=S[this.color](r)),this.#i=++this.#i%e.length;let i=typeof this.#s=="string"&&this.#s!==""?this.#s+" ":"",n=typeof this.text=="string"?" "+this.text:"";return i+r+n}clear(){if(!this.#a||!this.#t.isTTY)return this;this.#t.cursorTo(0);for(let e=0;e<this.#r;e++)e>0&&this.#t.moveCursor(0,-1),this.#t.clearLine(1);return(this.#u||this.lastIndent!==this.#u)&&this.#t.cursorTo(this.#u),this.lastIndent=this.#u,this.#r=0,this}render(){return this.#l?this:(this.clear(),this.#t.write(this.frame()),this.#r=this.#n,this)}start(e){return e&&(this.text=e),this.#l?this:this.#a?this.isSpinning?this:(this.#e.hideCursor&&io.hide(this.#t),this.#e.discardStdin&&$i.stdin.isTTY&&(this.#c=!0,Ki.start()),this.render(),this.#f=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#t.write(`- ${this.text}
29
+ `),this)}stop(){return this.#a?(clearInterval(this.#f),this.#f=void 0,this.#i=0,this.clear(),this.#e.hideCursor&&io.show(this.#t),this.#e.discardStdin&&$i.stdin.isTTY&&this.#c&&(Ki.stop(),this.#c=!1),this):this}succeed(e){return this.stopAndPersist({symbol:lr.success,text:e})}fail(e){return this.stopAndPersist({symbol:lr.error,text:e})}warn(e){return this.stopAndPersist({symbol:lr.warning,text:e})}info(e){return this.stopAndPersist({symbol:lr.info,text:e})}stopAndPersist(e={}){if(this.#l)return this;let r=e.prefixText||this.#s,i=e.text||this.text,n=typeof i=="string"?" "+i:"";return this.stop(),this.#t.write(`${this.getFullPrefixText(r," ")}${e.symbol||" "}${n}
30
+ `),this}};function Ue(t){return new qo(t)}var Ah={NODE_ENV:"production"};try{let{env:t}=await import("process");t.NODE_ENV&&(Ah.NODE_ENV=t.NODE_ENV)}catch{}var Ui=typeof window>"u"&&Ah.NODE_ENV==="development";import{Console as b0}from"console";var Et=new b0({stdout:process.stdout,stderr:process.stderr,groupIndentation:4}),fe=t=>{if(Ui){let{name:e}=t;return{log(...r){let i=S.bgBlue.white(` [${e}] `);Et.log(`${i}`,`
27
31
 
28
- Run TS directly: ${A.bold("tsmodule src/index.ts")}
29
- Use a command: ${A.bold("tsmodule build")}`)).version(String(yt));E.command("dev").description("Build and watch for changes.").action(v(At));E.command("build").description("Builds TS files to output in dist/.").option("-i, --input <files>","Entrypoints to compile.").option("-j, --js-only","Do not build styles").option("-s, --styles <styles>","Specify stylesheet entrypoint.").option("-t, --target <target>","ECMAScript featureset to target.").option("-b, --bundle","Bundle dependencies into entrypoints.").option("-d, --dev","Build development runtime.").option("-r, --runtime-only","Do not emit type declarations, only build JS runtime.").option("--stdin [source]","Read from a string or stdin.").option("--stdin-file [file]","File path to mock for stdin.").option("--no-write",`Return code from build() rather than write to disk.
30
- For programmatic use alongside { stdin: ... }.`).action(v(async s=>{await bt(s)}));E.command("create <name>").option("--react","Create React component library with Next.js").description("Create a new project.").action(v(Ct));E.command("convert").description("Convert an existing project to a TS module.").action(v(Ot));E.command("normalize [files]").description(`Rewrites import specifiers in files to ESM-compliant paths.
31
- (default: dist/**/*.js)`).action(v(async({files:s})=>{await xt(s)}));E.command("execute",{isDefault:!0}).argument("<file>","The file to execute.").option("--d, --dev","Enable development mode").description("Run the given TS program, analogous to `node <file>`.").action(v(Et));E.parse(process.argv);
32
+ `,...r),Et.log()},group(){Et.log();let r=S.bgBlue.white(` [${e}] `);Et.group(r),Et.log()},groupEnd(){Et.log(`
33
+ `,"-".repeat(20),`
34
+ `),Et.groupEnd()}}}else return{log(){},group(){},groupEnd(){}}};var Ce=(...t)=>{console.log(),console.log(...t),console.log()};import{spawn as w0,execSync as S0}from"child_process";import Uo from"node:process";import R0 from"node:os";import yh from"node:tty";if(typeof process<"u"){let{dirname:t}=await import("path"),{fileURLToPath:e}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=e(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=t(globalThis.__filename)),typeof globalThis.require>"u"){let{default:r}=await import("module");globalThis.require=r.createRequire(import.meta.url)}}var v0={win32:t=>({cmd:"cmd.exe",args:["/d","/s","/c",t]})},x0={"cp -rf":{win32:t=>{let e="xcopy /E /S /G /Q /Y",r=t.map(i=>i.endsWith("\\")?i:`${i}\\`).map(i=>i.replace(/\*\\$/,""));return`${e} ${r.join(" ")}`}},ln:{win32:t=>`mklink /D ${t.join(" ")}`},pkill:{win32:t=>`taskkill /T /F /pid ${t.join(" ")}`}},gh=(t,e,r)=>{let i={...v0,...e},n={...x0,...r},s=a=>{let l=process.platform,u=i[l];if(u)return u(a);let[c,...f]=a.split(" ");return{cmd:c,args:f}},o=(a=>{let l=Object.entries(n);for(let[u,c]of l)if(a.startsWith(u)){let f=process.platform,h=c[f];if(!h)break;let y=a.slice(u.length).trim().split(" ");return h(y)}return a})(t);return s(o)};if(typeof process<"u"){let{dirname:t}=await import("path"),{fileURLToPath:e}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=e(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=t(globalThis.__filename)),typeof globalThis.require>"u"){let{default:r}=await import("module");globalThis.require=r.createRequire(import.meta.url)}}if(typeof process<"u"){let{dirname:t}=await import("path"),{fileURLToPath:e}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=e(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=t(globalThis.__filename)),typeof globalThis.require>"u"){let{default:r}=await import("module");globalThis.require=r.createRequire(import.meta.url)}}var mh=(t=0)=>e=>`\x1B[${e+t}m`,_h=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Eh=(t=0)=>(e,r,i)=>`\x1B[${38+t};2;${e};${r};${i}m`;function B0(){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[r,i]of Object.entries(e)){for(let[n,s]of Object.entries(i))e[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},i[n]=e[n],t.set(s[0],s[1]);Object.defineProperty(e,r,{value:i,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=mh(),e.color.ansi256=_h(),e.color.ansi16m=Eh(),e.bgColor.ansi=mh(10),e.bgColor.ansi256=_h(10),e.bgColor.ansi16m=Eh(10),Object.defineProperties(e,{rgbToAnsi256:{value:(r,i,n)=>r===i&&i===n?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:r=>{let i=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(r.toString(16));if(!i)return[0,0,0];let{colorString:n}=i.groups;n.length===3&&(n=[...n].map(o=>o+o).join(""));let s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:r=>e.rgbToAnsi256(...e.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value:r=>{if(r<8)return 30+r;if(r<16)return 90+(r-8);let i,n,s;if(r>=232)i=((r-232)*10+8)/255,n=i,s=i;else{r-=16;let l=r%36;i=Math.floor(r/36)/5,n=Math.floor(l/6)/5,s=l%6/5}let o=Math.max(i,n,s)*2;if(o===0)return 30;let a=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(i));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(r,i,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(r,i,n)),enumerable:!1},hexToAnsi:{value:r=>e.ansi256ToAnsi(e.hexToAnsi256(r)),enumerable:!1}}),e}var Q0=B0(),Fe=Q0;function be(t,e=Uo.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",i=e.indexOf(r+t),n=e.indexOf("--");return i!==-1&&(n===-1||i<n)}var{env:ee}=Uo,Gi;be("no-color")||be("no-colors")||be("color=false")||be("color=never")?Gi=0:(be("color")||be("colors")||be("color=true")||be("color=always"))&&(Gi=1);function I0(){if("FORCE_COLOR"in ee)return ee.FORCE_COLOR==="true"?1:ee.FORCE_COLOR==="false"?0:ee.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ee.FORCE_COLOR,10),3)}function O0(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function T0(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let i=I0();i!==void 0&&(Gi=i);let n=r?Gi:i;if(n===0)return 0;if(r){if(be("color=16m")||be("color=full")||be("color=truecolor"))return 3;if(be("color=256"))return 2}if(t&&!e&&n===void 0)return 0;let s=n||0;if(ee.TERM==="dumb")return s;if(Uo.platform==="win32"){let o=R0.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in ee)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in ee)||ee.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in ee)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ee.TEAMCITY_VERSION)?1:0;if("TF_BUILD"in ee&&"AGENT_NAME"in ee)return 1;if(ee.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ee){let o=Number.parseInt((ee.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ee.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ee.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ee.TERM)||"COLORTERM"in ee?1:s}function Ch(t,e={}){let r=T0(t,{streamIsTTY:t&&t.isTTY,...e});return O0(r)}var k0={stdout:Ch({isTTY:yh.isatty(1)}),stderr:Ch({isTTY:yh.isatty(2)})},D0=k0;function P0(t,e,r){let i=t.indexOf(e);if(i===-1)return t;let n=e.length,s=0,o="";do o+=t.substr(s,i-s)+e+r,s=i+n,i=t.indexOf(e,s);while(i!==-1);return o+=t.slice(s),o}function L0(t,e,r,i){let n=0,s="";do{let o=t[i-1]==="\r";s+=t.substr(n,(o?i-1:i)-n)+e+(o?`\r
35
+ `:`
36
+ `)+r,n=i+1,i=t.indexOf(`
37
+ `,n)}while(i!==-1);return s+=t.slice(n),s}var{stdout:bh,stderr:vh}=D0,Ho=Symbol("GENERATOR"),$t=Symbol("STYLER"),Cr=Symbol("IS_EMPTY"),xh=["ansi","ansi","ansi256","ansi16m"],Kt=Object.create(null),N0=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=bh?bh.level:0;t.level=e.level===void 0?r:e.level},F0=t=>{let e=(...r)=>r.join(" ");return N0(e,t),Object.setPrototypeOf(e,br.prototype),e};function br(t){return F0(t)}Object.setPrototypeOf(br.prototype,Function.prototype);for(let[t,e]of Object.entries(Fe))Kt[t]={get(){let r=Ji(this,$o(e.open,e.close,this[$t]),this[Cr]);return Object.defineProperty(this,t,{value:r}),r}};Kt.visible={get(){let t=Ji(this,this[$t],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var jo=(t,e,r,...i)=>t==="rgb"?e==="ansi16m"?Fe[r].ansi16m(...i):e==="ansi256"?Fe[r].ansi256(Fe.rgbToAnsi256(...i)):Fe[r].ansi(Fe.rgbToAnsi(...i)):t==="hex"?jo("rgb",e,r,...Fe.hexToRgb(...i)):Fe[r][t](...i),M0=["rgb","hex","ansi256"];for(let t of M0){Kt[t]={get(){let{level:r}=this;return function(...i){let n=$o(jo(t,xh[r],"color",...i),Fe.color.close,this[$t]);return Ji(this,n,this[Cr])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Kt[e]={get(){let{level:r}=this;return function(...i){let n=$o(jo(t,xh[r],"bgColor",...i),Fe.bgColor.close,this[$t]);return Ji(this,n,this[Cr])}}}}var q0=Object.defineProperties(()=>{},{...Kt,level:{enumerable:!0,get(){return this[Ho].level},set(t){this[Ho].level=t}}}),$o=(t,e,r)=>{let i,n;return r===void 0?(i=t,n=e):(i=r.openAll+t,n=e+r.closeAll),{open:t,close:e,openAll:i,closeAll:n,parent:r}},Ji=(t,e,r)=>{let i=(...n)=>H0(i,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(i,q0),i[Ho]=t,i[$t]=e,i[Cr]=r,i},H0=(t,e)=>{if(t.level<=0||!e)return t[Cr]?"":e;let r=t[$t];if(r===void 0)return e;let{openAll:i,closeAll:n}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=P0(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
38
+ `);return s!==-1&&(e=L0(e,n,i,s)),i+e+n};Object.defineProperties(br.prototype,Kt);var j0=br(),px=br({level:vh?vh.level:0}),$0=j0,K0=process.platform==="linux"||process.platform==="darwin",Ko=process.platform==="win32",U0={stdio:"pipe",shell:!0,detached:!Ko,env:process.env},G0={log:!0,commandTranslations:{},shellTranslations:{},...U0},Ae=({log:t=!0,commandTranslations:e={},shellTranslations:r={},...i}=G0)=>{let n=null;return{childProcess:n,async run(s){if(n)throw new Error("Only one command per shell.");if(typeof s=="object"){let l=process.platform;s.posix&&K0&&(l="posix");let u=s[l];if(!u)throw new Error("No command found for platform: "+JSON.stringify({platform:process.platform,command:s}));s=u}let{cmd:o,args:a}=gh(s,r,e);return t&&console.log($0.dim(`
39
+ $ ${o} ${a.join(" ")}
40
+ `)),await new Promise((l,u)=>{n=w0(o,a,i);let c="",f="";if(!n)throw new Error("Child process was not set.");let h=y=>{n=null;let A={code:y,stdout:c,stderr:f};y===0||y===1&&!Ko?l(A):u(A)};n.stdout?.on("data",y=>{c+=y.toString()}),n.stderr?.on("data",y=>{f+=y.toString()}),n.on("close",h),n.on("exit",h),n.on("error",h),n.stdout?.pipe(process.stdout),n.stderr?.pipe(process.stderr)})},kill(s="SIGKILL"){if(n?.pid)if(Ko)S0(`taskkill /t /f /pid ${n.pid}`);else return process.kill(-n.pid,s);return!0}}};import{extname as Cx,resolve as Go}from"path";var Gt=/\.[mc]?tsx?(?=\?|$)/;var yt=/\.([mc])?[tj]sx$/,wh=/\.([mc])?[tj]sx?$/,Ut={format:"esm",charset:"utf8",sourcemap:"inline",target:"node16",minify:!1},J0={".mts":{...Ut,loader:"ts"},".jsx":{...Ut,loader:"jsx"},".tsx":{...Ut,loader:"tsx"},".cts":{...Ut,loader:"ts"},".ts":{...Ut,loader:"ts"},".json":{...Ut,loader:"json"}},_x=Object.keys(J0);var Jo=()=>{let t=process.cwd(),e=Go(t,"src"),r=Go(t,"dist");return{cwd:t,srcDir:e,outDir:r}},Yo=t=>{t=Go(t);let{srcDir:e,outDir:r}=Jo();return t.replace(e,r).replace(Gt,".js").replace(yt,".js")};var Y0={moduleResolution:"Node",module:"ESNext",target:"ESNext",esModuleInterop:!0,incremental:!1,rootDir:"src",outDir:"dist",declaration:!0,noEmit:!1,emitDeclarationOnly:!0},Vo=async()=>{let t=fe(Vo),e=Ae({log:!1}),i=`yarn tsc -p tsconfig.json ${Object.entries(Y0).map(([n,s])=>`--${n} ${s}`).join(" ")}`;t.log(`Calling: ${i}`),await e.run(i)};import{readFile as V0,writeFile as W0}from"fs/promises";import{resolve as Sh}from"path";var Wo=async(t=process.cwd())=>{let e=Sh(t,"package.json");return await V0(e,"utf-8")},Xo=async(t=process.cwd())=>{let e=await Wo(t);return JSON.parse(e)},Yi=async(t=process.cwd(),e)=>{let r=Sh(t,"package.json"),i=await Xo(t);return Object.assign(i,e),await W0(r,JSON.stringify(i,null,2),"utf-8"),i};var Ih=Ie(gi(),1);import{existsSync as oy}from"fs";import{writeFile as ay}from"fs/promises";import{isAbsolute as ly,resolve as uy}from"path";import{dirname as ey,normalize as ty,posix as vr,resolve as Jt}from"path";import{existsSync as Yt}from"fs";import{readFile as Qh}from"fs/promises";var X0=new Uint8Array(new Uint16Array([1]).buffer)[0]===1;function zo(t,e="@"){if(!q)return ea.then(()=>zo(t));let r=t.length+1,i=(q.__heap_base.value||q.__heap_base)+4*r-q.memory.buffer.byteLength;i>0&&q.memory.grow(Math.ceil(i/65536));let n=q.sa(r-1);if((X0?z0:Z0)(t,new Uint16Array(q.memory.buffer,n,r)),!q.parse())throw Object.assign(new Error(`Parse error ${e}:${t.slice(0,q.e()).split(`
41
+ `).length}:${q.e()-t.lastIndexOf(`
42
+ `,q.e()-1)}`),{idx:q.e()});let s=[],o=[];for(;q.ri();){let l=q.is(),u=q.ie(),c=q.ai(),f=q.id(),h=q.ss(),y=q.se(),A;q.ip()&&(A=a(t.slice(f===-1?l-1:l,f===-1?u+1:u))),s.push({n:A,s:l,e:u,ss:h,se:y,d:f,a:c})}for(;q.re();){let l=q.es(),u=q.ee(),c=q.els(),f=q.ele(),h=t.slice(l,u),y=h[0],A=c<0?void 0:t.slice(c,f),_=A?A[0]:"";o.push({s:l,e:u,ls:c,le:f,n:y==='"'||y==="'"?a(h):h,ln:_==='"'||_==="'"?a(A):A})}function a(l){try{return(0,eval)(l)}catch{}}return[s,o,!!q.f()]}function Z0(t,e){let r=t.length,i=0;for(;i<r;){let n=t.charCodeAt(i);e[i++]=(255&n)<<8|n>>>8}}function z0(t,e){let r=t.length,i=0;for(;i<r;)e[i]=t.charCodeAt(i++)}var q,ea=WebAssembly.compile((Zo="AGFzbQEAAAABKghgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gAn9/AAMtLAABAQICAgICAgICAgICAgICAgIAAwMDBAQAAAADAAAAAAMDBQYAAAcABgIFBAUBcAEBAQUDAQABBg8CfwFBsPIAC38AQbDyAAsHcBMGbWVtb3J5AgACc2EAAAFlAAMCaXMABAJpZQAFAnNzAAYCc2UABwJhaQAIAmlkAAkCaXAACgJlcwALAmVlAAwDZWxzAA0DZWxlAA4CcmkADwJyZQAQAWYAEQVwYXJzZQASC19faGVhcF9iYXNlAwEKsjssaAEBf0EAIAA2AvgJQQAoAtQJIgEgAEEBdGoiAEEAOwEAQQAgAEECaiIANgL8CUEAIAA2AoAKQQBBADYC2AlBAEEANgLoCUEAQQA2AuAJQQBBADYC3AlBAEEANgLwCUEAQQA2AuQJIAELnwEBA39BACgC6AkhBEEAQQAoAoAKIgU2AugJQQAgBDYC7AlBACAFQSBqNgKACiAEQRxqQdgJIAQbIAU2AgBBACgCzAkhBEEAKALICSEGIAUgATYCACAFIAA2AgggBSACIAJBAmpBACAGIANGGyAEIANGGzYCDCAFIAM2AhQgBUEANgIQIAUgAjYCBCAFQQA2AhwgBUEAKALICSADRjoAGAtWAQF/QQAoAvAJIgRBEGpB3AkgBBtBACgCgAoiBDYCAEEAIAQ2AvAJQQAgBEEUajYCgAogBEEANgIQIAQgAzYCDCAEIAI2AgggBCABNgIEIAQgADYCAAsIAEEAKAKECgsVAEEAKALgCSgCAEEAKALUCWtBAXULHgEBf0EAKALgCSgCBCIAQQAoAtQJa0EBdUF/IAAbCxUAQQAoAuAJKAIIQQAoAtQJa0EBdQseAQF/QQAoAuAJKAIMIgBBACgC1AlrQQF1QX8gABsLHgEBf0EAKALgCSgCECIAQQAoAtQJa0EBdUF/IAAbCzsBAX8CQEEAKALgCSgCFCIAQQAoAsgJRw0AQX8PCwJAIABBACgCzAlHDQBBfg8LIABBACgC1AlrQQF1CwsAQQAoAuAJLQAYCxUAQQAoAuQJKAIAQQAoAtQJa0EBdQsVAEEAKALkCSgCBEEAKALUCWtBAXULHgEBf0EAKALkCSgCCCIAQQAoAtQJa0EBdUF/IAAbCx4BAX9BACgC5AkoAgwiAEEAKALUCWtBAXVBfyAAGwslAQF/QQBBACgC4AkiAEEcakHYCSAAGygCACIANgLgCSAAQQBHCyUBAX9BAEEAKALkCSIAQRBqQdwJIAAbKAIAIgA2AuQJIABBAEcLCABBAC0AiAoL5gwBBn8jAEGA0ABrIgAkAEEAQQE6AIgKQQBBACgC0Ak2ApAKQQBBACgC1AlBfmoiATYCpApBACABQQAoAvgJQQF0aiICNgKoCkEAQQA7AYoKQQBBADsBjApBAEEAOgCUCkEAQQA2AoQKQQBBADoA9AlBACAAQYAQajYCmApBACAANgKcCkEAQQA6AKAKAkACQAJAAkADQEEAIAFBAmoiAzYCpAogASACTw0BAkAgAy8BACICQXdqQQVJDQACQAJAAkACQAJAIAJBm39qDgUBCAgIAgALIAJBIEYNBCACQS9GDQMgAkE7Rg0CDAcLQQAvAYwKDQEgAxATRQ0BIAFBBGpBgghBChArDQEQFEEALQCICg0BQQBBACgCpAoiATYCkAoMBwsgAxATRQ0AIAFBBGpBjAhBChArDQAQFQtBAEEAKAKkCjYCkAoMAQsCQCABLwEEIgNBKkYNACADQS9HDQQQFgwBC0EBEBcLQQAoAqgKIQJBACgCpAohAQwACwtBACECIAMhAUEALQD0CQ0CDAELQQAgATYCpApBAEEAOgCICgsDQEEAIAFBAmoiAzYCpAoCQAJAAkACQAJAAkACQAJAAkAgAUEAKAKoCk8NACADLwEAIgJBd2pBBUkNCAJAAkACQAJAAkACQAJAAkACQAJAIAJBYGoOChIRBhEREREFAQIACwJAAkACQAJAIAJBoH9qDgoLFBQDFAEUFBQCAAsgAkGFf2oOAwUTBgkLQQAvAYwKDRIgAxATRQ0SIAFBBGpBgghBChArDRIQFAwSCyADEBNFDREgAUEEakGMCEEKECsNERAVDBELIAMQE0UNECABKQAEQuyAhIOwjsA5Ug0QIAEvAQwiA0F3aiIBQRdLDQ5BASABdEGfgIAEcUUNDgwPC0EAQQAvAYwKIgFBAWo7AYwKQQAoApgKIAFBA3RqIgFBATYCACABQQAoApAKNgIEDA8LQQAvAYwKIgJFDQtBACACQX9qIgQ7AYwKQQAvAYoKIgJFDQ4gAkECdEEAKAKcCmpBfGooAgAiBSgCFEEAKAKYCiAEQf//A3FBA3RqKAIERw0OAkAgBSgCBA0AIAUgAzYCBAtBACACQX9qOwGKCiAFIAFBBGo2AgwMDgsCQEEAKAKQCiIBLwEAQSlHDQBBACgC6AkiA0UNACADKAIEIAFHDQBBAEEAKALsCSIDNgLoCQJAIANFDQAgA0EANgIcDAELQQBBADYC2AkLQQBBAC8BjAoiA0EBajsBjApBACgCmAogA0EDdGoiA0EGQQJBAC0AoAobNgIAIAMgATYCBEEAQQA6AKAKDA0LQQAvAYwKIgFFDQlBACABQX9qIgE7AYwKQQAoApgKIAFB//8DcUEDdGooAgBBBEYNBAwMC0EnEBgMCwtBIhAYDAoLIAJBL0cNCQJAAkAgAS8BBCIBQSpGDQAgAUEvRw0BEBYMDAtBARAXDAsLAkACQEEAKAKQCiIBLwEAIgMQGUUNAAJAAkAgA0FVag4EAAgBAwgLIAFBfmovAQBBK0YNBgwHCyABQX5qLwEAQS1GDQUMBgsCQCADQf0ARg0AIANBKUcNBUEAKAKYCkEALwGMCkEDdGooAgQQGkUNBQwGC0EAKAKYCkEALwGMCkEDdGoiAigCBBAbDQUgAigCAEEGRg0FDAQLIAFBfmovAQBBUGpB//8DcUEKSQ0DDAQLQQAoApgKQQAvAYwKIgFBA3QiA2pBACgCkAo2AgRBACABQQFqOwGMCkEAKAKYCiADakEDNgIACxAcDAcLQQAtAPQJQQAvAYoKQQAvAYwKcnJFIQIMCQsgARAdDQAgA0UNACADQS9GQQAtAJQKQQBHcQ0AIAFBfmohAUEAKALUCSECAkADQCABQQJqIgQgAk0NAUEAIAE2ApAKIAEvAQAhAyABQX5qIgQhASADEB5FDQALIARBAmohBAtBASEFIANB//8DcRAfRQ0BIARBfmohAQJAA0AgAUECaiIDIAJNDQFBACABNgKQCiABLwEAIQMgAUF+aiIEIQEgAxAfDQALIARBAmohAwsgAxAgRQ0BECFBAEEAOgCUCgwFCxAhQQAhBQtBACAFOgCUCgwDCxAiQQAhAgwFCyADQaABRw0BC0EAQQE6AKAKC0EAQQAoAqQKNgKQCgtBACgCpAohAQwACwsgAEGA0ABqJAAgAgsdAAJAQQAoAtQJIABHDQBBAQ8LIABBfmovAQAQHgvFCgEHf0EAQQAoAqQKIgBBDGoiATYCpApBACgC8AkhAkEBECYhAwJAAkACQAJAAkACQAJAQQAoAqQKIgQgAUcNACADECVFDQELAkACQAJAAkAgA0EqRg0AIANB+wBHDQFBACAEQQJqNgKkCkEBECYhBEEAKAKkCiEBA0ACQAJAIARB//8DcSIDQSJGDQAgA0EnRg0AIAMQKBpBACgCpAohAwwBCyADEBhBAEEAKAKkCkECaiIDNgKkCgtBARAmGgJAIAEgAxApIgRBLEcNAEEAQQAoAqQKQQJqNgKkCkEBECYhBAtBACgCpAohAyAEQf0ARg0DIAMgAUYNCiADIQEgA0EAKAKoCk0NAAwKCwtBACAEQQJqNgKkCkEBECYaQQAoAqQKIgMgAxApGgwCC0EAQQA6AIgKAkACQAJAAkACQAJAIANBn39qDgwCCAQBCAMICAgICAUACyADQfYARg0EDAcLQQAgBEEOaiIANgKkCkHhACEDAkBBARAmIgJB4QBHDQBBACEBQQAoAqQKIgIQE0UNCyACKQACQvOA5IPgjcAxUg0LIAIvAQoQH0UNC0EAIAJBCmo2AqQKQQAQJiECC0HmACEDQQAhASACQeYARw0JQQAhAUEAKAKkCiICEBNFDQogAkECakGkCEEOECsNCiACLwEQIgVBd2oiBkEXSw0HQQEgBnRBn4CABHFFDQcMCAtBACAEQQpqNgKkCkEBECYaQQAoAqQKIQQLQQAgBEEQajYCpAoCQEEBECYiBEEqRw0AQQBBACgCpApBAmo2AqQKQQEQJiEEC0EAKAKkCiEDIAQQKBogA0EAKAKkCiIEIAMgBBACQQBBACgCpApBfmo2AqQKDwsCQCAEKQACQuyAhIOwjsA5Ug0AIAQvAQoQHkUNAEEAIARBCmo2AqQKQQEQJiEEQQAoAqQKIQMgBBAoGiADQQAoAqQKIgQgAyAEEAJBAEEAKAKkCkF+ajYCpAoPC0EAIARBBGoiBDYCpAoLQQAgBEEEaiIDNgKkCkEAQQA6AIgKAkADQEEAIANBAmo2AqQKQQEQJiEEQQAoAqQKIQMgBBAoQSByQfsARg0BQQAoAqQKIgQgA0YNBCADIAQgAyAEEAJBARAmQSxHDQFBACgCpAohAwwACwtBAEEAKAKkCkF+ajYCpAoPC0EAIANBAmo2AqQKC0EBECYhBEEAKAKkCiEDAkAgBEHmAEcNACADQQJqQZ4IQQYQKw0AQQAgA0EIajYCpAogAEEBECYQJyACQRBqQdwJIAIbIQMDQCADKAIAIgNFDQIgA0IANwIIIANBEGohAwwACwtBACADQX5qNgKkCgsPCwJAIAVBWGoOAwEDAQALIAVBoAFHDQILQQAgAkEQajYCpApBASEBAkBBARAmIgJBKkcNAEEAQQAoAqQKQQJqNgKkCkEBECYhAgsgAkEoRw0AIAQgAEEAQQAQAkEAIARBDGo2AqQKDwtB4wAhAwJAIAJB4wBGDQAgAiEDDAELQQAoAqQKIgIQE0UNACACKQACQuyAhIOwjsA5Ug0AAkACQCACLwEKIgVBd2oiBkEXSw0AQQEgBnRBn4CABHENAQsgBUGgAUYNACAFQfsARw0BC0EAIAJBCmo2AqQKQQEhAUEBECYiA0H7AEcNACAEIABBAEEAEAJBACAEQQxqNgKkCg8LQQAoAqQKIQIgAxAoGgJAAkAgAUUNAEEAKAKkCiIDIAJNDQAgBCAAIAIgAxACQQAoAqQKQX5qIQMMAQsgBCAAQQBBABACIARBDGohAwtBACADNgKkCg8LECILvgYBBH9BAEEAKAKkCiIAQQxqIgE2AqQKAkACQAJAAkACQAJAAkACQAJAAkBBARAmIgJBWWoOCAQCAQQBAQEDAAsgAkEiRg0DIAJB+wBGDQQLQQAoAqQKIAFHDQJBACAAQQpqNgKkCg8LQQAoApgKQQAvAYwKIgJBA3RqIgFBACgCpAo2AgRBACACQQFqOwGMCiABQQU2AgBBACgCkAovAQBBLkYNA0EAQQAoAqQKIgFBAmo2AqQKQQEQJiECIABBACgCpApBACABEAFBAEEALwGKCiIBQQFqOwGKCkEAKAKcCiABQQJ0akEAKALoCTYCAAJAIAJBIkYNACACQSdGDQBBAEEAKAKkCkF+ajYCpAoPCyACEBhBAEEAKAKkCkECaiICNgKkCgJAAkACQEEBECZBV2oOBAECAgACC0EAQQAoAqQKQQJqNgKkCkEBECYaQQAoAugJIgEgAjYCBCABQQE6ABggAUEAKAKkCiICNgIQQQAgAkF+ajYCpAoPC0EAKALoCSIBIAI2AgQgAUEBOgAYQQBBAC8BjApBf2o7AYwKIAFBACgCpApBAmo2AgxBAEEALwGKCkF/ajsBigoPC0EAQQAoAqQKQX5qNgKkCg8LQQBBACgCpApBAmo2AqQKQQEQJkHtAEcNAkEAKAKkCiICQQJqQZYIQQYQKw0CQQAoApAKLwEAQS5GDQIgACAAIAJBCGpBACgCzAkQAQ8LQQAvAYwKDQJBACgCpAohAkEAKAKoCiEDA0AgAiADTw0FAkACQCACLwEAIgFBJ0YNACABQSJHDQELIAAgARAnDwtBACACQQJqIgI2AqQKDAALC0EAKAKkCiECQQAvAYwKDQICQANAAkACQAJAIAJBACgCqApPDQBBARAmIgJBIkYNASACQSdGDQEgAkH9AEcNAkEAQQAoAqQKQQJqNgKkCgtBARAmGkEAKAKkCiICKQAAQuaAyIPwjcA2Ug0HQQAgAkEIajYCpApBARAmIgJBIkYNAyACQSdGDQMMBwsgAhAYC0EAQQAoAqQKQQJqIgI2AqQKDAALCyAAIAIQJwsPC0EAQQAoAqQKQX5qNgKkCg8LQQAgAkF+ajYCpAoPCxAiC0cBA39BACgCpApBAmohAEEAKAKoCiEBAkADQCAAIgJBfmogAU8NASACQQJqIQAgAi8BAEF2ag4EAQAAAQALC0EAIAI2AqQKC5gBAQN/QQBBACgCpAoiAUECajYCpAogAUEGaiEBQQAoAqgKIQIDQAJAAkACQCABQXxqIAJPDQAgAUF+ai8BACEDAkACQCAADQAgA0EqRg0BIANBdmoOBAIEBAIECyADQSpHDQMLIAEvAQBBL0cNAkEAIAFBfmo2AqQKDAELIAFBfmohAQtBACABNgKkCg8LIAFBAmohAQwACwuIAQEEf0EAKAKkCiEBQQAoAqgKIQICQAJAA0AgASIDQQJqIQEgAyACTw0BIAEvAQAiBCAARg0CAkAgBEHcAEYNACAEQXZqDgQCAQECAQsgA0EEaiEBIAMvAQRBDUcNACADQQZqIAEgAy8BBkEKRhshAQwACwtBACABNgKkChAiDwtBACABNgKkCgtsAQF/AkACQCAAQV9qIgFBBUsNAEEBIAF0QTFxDQELIABBRmpB//8DcUEGSQ0AIABBKUcgAEFYakH//wNxQQdJcQ0AAkAgAEGlf2oOBAEAAAEACyAAQf0ARyAAQYV/akH//wNxQQRJcQ8LQQELLgEBf0EBIQECQCAAQZgJQQUQIw0AIABBoglBAxAjDQAgAEGoCUECECMhAQsgAQuDAQECf0EBIQECQAJAAkACQAJAAkAgAC8BACICQUVqDgQFBAQBAAsCQCACQZt/ag4EAwQEAgALIAJBKUYNBCACQfkARw0DIABBfmpBtAlBBhAjDwsgAEF+ai8BAEE9Rg8LIABBfmpBrAlBBBAjDwsgAEF+akHACUEDECMPC0EAIQELIAEL3gEBBH9BACgCpAohAEEAKAKoCiEBAkACQAJAA0AgACICQQJqIQAgAiABTw0BAkACQAJAIAAvAQAiA0Gkf2oOBQIDAwMBAAsgA0EkRw0CIAIvAQRB+wBHDQJBACACQQRqIgA2AqQKQQBBAC8BjAoiAkEBajsBjApBACgCmAogAkEDdGoiAkEENgIAIAIgADYCBA8LQQAgADYCpApBAEEALwGMCkF/aiIAOwGMCkEAKAKYCiAAQf//A3FBA3RqKAIAQQNHDQMMBAsgAkEEaiEADAALC0EAIAA2AqQKCxAiCwu0AwECf0EAIQECQAJAAkACQAJAAkACQAJAAkACQCAALwEAQZx/ag4UAAECCQkJCQMJCQQFCQkGCQcJCQgJCwJAAkAgAEF+ai8BAEGXf2oOBAAKCgEKCyAAQXxqQbwIQQIQIw8LIABBfGpBwAhBAxAjDwsCQAJAAkAgAEF+ai8BAEGNf2oOAwABAgoLAkAgAEF8ai8BACICQeEARg0AIAJB7ABHDQogAEF6akHlABAkDwsgAEF6akHjABAkDwsgAEF8akHGCEEEECMPCyAAQXxqQc4IQQYQIw8LIABBfmovAQBB7wBHDQYgAEF8ai8BAEHlAEcNBgJAIABBemovAQAiAkHwAEYNACACQeMARw0HIABBeGpB2ghBBhAjDwsgAEF4akHmCEECECMPCyAAQX5qQeoIQQQQIw8LQQEhASAAQX5qIgBB6QAQJA0EIABB8ghBBRAjDwsgAEF+akHkABAkDwsgAEF+akH8CEEHECMPCyAAQX5qQYoJQQQQIw8LAkAgAEF+ai8BACICQe8ARg0AIAJB5QBHDQEgAEF8akHuABAkDwsgAEF8akGSCUEDECMhAQsgAQs0AQF/QQEhAQJAIABBd2pB//8DcUEFSQ0AIABBgAFyQaABRg0AIABBLkcgABAlcSEBCyABCzABAX8CQAJAIABBd2oiAUEXSw0AQQEgAXRBjYCABHENAQsgAEGgAUYNAEEADwtBAQtOAQJ/QQAhAQJAAkAgAC8BACICQeUARg0AIAJB6wBHDQEgAEF+akHqCEEEECMPCyAAQX5qLwEAQfUARw0AIABBfGpBzghBBhAjIQELIAELcAECfwJAAkADQEEAQQAoAqQKIgBBAmoiATYCpAogAEEAKAKoCk8NAQJAAkACQCABLwEAIgFBpX9qDgIBAgALAkAgAUF2ag4EBAMDBAALIAFBL0cNAgwECxAqGgwBC0EAIABBBGo2AqQKDAALCxAiCws1AQF/QQBBAToA9AlBACgCpAohAEEAQQAoAqgKQQJqNgKkCkEAIABBACgC1AlrQQF1NgKECgtJAQN/QQAhAwJAIAAgAkEBdCICayIEQQJqIgBBACgC1AkiBUkNACAAIAEgAhArDQACQCAAIAVHDQBBAQ8LIAQvAQAQHiEDCyADCz0BAn9BACECAkBBACgC1AkiAyAASw0AIAAvAQAgAUcNAAJAIAMgAEcNAEEBDwsgAEF+ai8BABAeIQILIAILaAECf0EBIQECQAJAIABBX2oiAkEFSw0AQQEgAnRBMXENAQsgAEH4/wNxQShGDQAgAEFGakH//wNxQQZJDQACQCAAQaV/aiICQQNLDQAgAkEBRw0BCyAAQYV/akH//wNxQQRJIQELIAELnAEBA39BACgCpAohAQJAA0ACQAJAIAEvAQAiAkEvRw0AAkAgAS8BAiIBQSpGDQAgAUEvRw0EEBYMAgsgABAXDAELAkACQCAARQ0AIAJBd2oiAUEXSw0BQQEgAXRBn4CABHFFDQEMAgsgAhAfRQ0DDAELIAJBoAFHDQILQQBBACgCpAoiA0ECaiIBNgKkCiADQQAoAqgKSQ0ACwsgAgvCAwEBfwJAIAFBIkYNACABQSdGDQAQIg8LQQAoAqQKIQIgARAYIAAgAkECakEAKAKkCkEAKALICRABQQBBACgCpApBAmo2AqQKQQAQJiEAQQAoAqQKIQECQAJAIABB4QBHDQAgAUECakGyCEEKECtFDQELQQAgAUF+ajYCpAoPC0EAIAFBDGo2AqQKAkBBARAmQfsARg0AQQAgATYCpAoPC0EAKAKkCiICIQADQEEAIABBAmo2AqQKAkACQAJAQQEQJiIAQSJGDQAgAEEnRw0BQScQGEEAQQAoAqQKQQJqNgKkCkEBECYhAAwCC0EiEBhBAEEAKAKkCkECajYCpApBARAmIQAMAQsgABAoIQALAkAgAEE6Rg0AQQAgATYCpAoPC0EAQQAoAqQKQQJqNgKkCgJAQQEQJiIAQSJGDQAgAEEnRg0AQQAgATYCpAoPCyAAEBhBAEEAKAKkCkECajYCpAoCQAJAQQEQJiIAQSxGDQAgAEH9AEYNAUEAIAE2AqQKDwtBAEEAKAKkCkECajYCpApBARAmQf0ARg0AQQAoAqQKIQAMAQsLQQAoAugJIgEgAjYCECABQQAoAqQKQQJqNgIMC20BAn8CQAJAA0ACQCAAQf//A3EiAUF3aiICQRdLDQBBASACdEGfgIAEcQ0CCyABQaABRg0BIAAhAiABECUNAkEAIQJBAEEAKAKkCiIAQQJqNgKkCiAALwECIgANAAwCCwsgACECCyACQf//A3ELqwEBBH8CQAJAQQAoAqQKIgIvAQAiA0HhAEYNACABIQQgACEFDAELQQAgAkEEajYCpApBARAmIQJBACgCpAohBQJAAkAgAkEiRg0AIAJBJ0YNACACECgaQQAoAqQKIQQMAQsgAhAYQQBBACgCpApBAmoiBDYCpAoLQQEQJiEDQQAoAqQKIQILAkAgAiAFRg0AIAUgBEEAIAAgACABRiICG0EAIAEgAhsQAgsgAwtyAQR/QQAoAqQKIQBBACgCqAohAQJAAkADQCAAQQJqIQIgACABTw0BAkACQCACLwEAIgNBpH9qDgIBBAALIAIhACADQXZqDgQCAQECAQsgAEEEaiEADAALC0EAIAI2AqQKECJBAA8LQQAgAjYCpApB3QALSQEDf0EAIQMCQCACRQ0AAkADQCAALQAAIgQgAS0AACIFRw0BIAFBAWohASAAQQFqIQAgAkF/aiICDQAMAgsLIAQgBWshAwsgAwsL5AECAEGACAvGAQAAeABwAG8AcgB0AG0AcABvAHIAdABlAHQAYQBmAHIAbwBtAHUAbgBjAHQAaQBvAG4AcwBzAGUAcgB0AHYAbwB5AGkAZQBkAGUAbABlAGMAbwBuAHQAaQBuAGkAbgBzAHQAYQBuAHQAeQBiAHIAZQBhAHIAZQB0AHUAcgBkAGUAYgB1AGcAZwBlAGEAdwBhAGkAdABoAHIAdwBoAGkAbABlAGYAbwByAGkAZgBjAGEAdABjAGYAaQBuAGEAbABsAGUAbABzAABByAkLEAEAAAACAAAAAAQAADA5AAA=",typeof Buffer<"u"?Buffer.from(Zo,"base64"):Uint8Array.from(atob(Zo),t=>t.charCodeAt(0)))).then(WebAssembly.instantiate).then(({exports:t})=>{q=t}),Zo;import{cwd as ry}from"process";await ea;var iy=[".js",".mjs",".jsx",".json",".ts",".mts",".tsx"],Rh=async(t,e)=>{let r=fe(Rh),i=ey(ty(e)),n=xr(i),s=n.replace(vr.extname(n),""),o=xr(Jt(ry(),"node_modules")),a=Yt(o);if(r.log({specifier:t,entryPoint:e,nodeModulesPath:o}),!Bh(t)&&vr.extname(t))return r.log("Skipping non-named specifier with file extension",{specifier:t}),null;t==="."&&(t="./index");for(let l of iy){let u=`${t}${l}`,c=`${t}/index${l}`;if(r.log("Looking for",{dotTsFile:u,indexDotTsFile:c}),!Bh(t)){if(Yt(Jt(s,u)))return u;if(Yt(Jt(s,c)))return c}if(a){let f=t.split("/")[0],h=Jt(o,f,"package.json");if(Yt(h)){let v=await Qh(h,"utf-8");if(JSON.parse(v).exports)return r.log("Skipping named specifier with conditional exports",{specifier:t}),t}r.log("In",{nodeModulesPath:o});let A=Jt(o,u),_=Jt(o,c);if(Yt(A))return r.log("Found",{nodeModulesFile:A}),u;if(Yt(_))return r.log("Found",{nodeModulesIndexFile:_}),c}}return null},xr=t=>t.replace(/\\/g,"/"),Bh=t=>!(t.startsWith(".")||t.startsWith("/")),ny=(t,e)=>{if(t=xr(t),e=xr(e),!e.startsWith("/"))return e;let r=vr.relative(vr.dirname(t),e);return r.startsWith(".")?r:`./${r}`},sy=t=>t?t.startsWith(".")||t.includes("/")||vr.extname(t):!1,ta=async t=>{let e=fe(ta);e.log("Getting rewritten specifiers:",{modulePath:t}),t=xr(t);let r=await Qh(t,"utf8"),[i]=await zo(r),n=i.filter(o=>typeof o.n<"u");e.log("Found import statements:",{namedImportExportSpecifiers:n});let s=r.slice(0);for(let o of n){let a=o.n;e.log("Found specifier:",{specifier:a});let l=r.substring(o.ss,o.se);if(!a){e.log(`Could not find specifier in import statement: "${l}"`);continue}if(!sy(a)){e.log("Not resolving relative or non-named specifier:",{specifier:a});continue}let u=await Rh(a,t);if(!u){e.log(`Could not resolve specifier "${a}" from "${t}". Assuming external.`);continue}e.log("Resolved specifier:",{resolvedSpecifier:u});let c=ny(t,u);e.log("Specifier replacement:",{specifierReplacement:c});let f=l.replace(a,c);e.log("Replacing import statement:",{specifier:a,importStatement:l,importStatementReplacement:f}),s=s.replace(l,f)}return s};var Vt=async(t="dist/**/*.js")=>{let e=fe(Vt),i=ly(t)&&oy(t)?[t]:Ih.default.sync(t);e.log("Normalizing import/require specifiers:",{files:t,filesToNormalize:i});for(let n of i){let s=uy(n),o=await ta(s);e.log("Normalizing",{file:n,normalized:o}),await ay(s,o,{flag:"w",encoding:"utf-8"})}e.log("Normalized",{filesToNormalize:i})};import{readFileSync as cy}from"fs";function fy(t){return new Promise((e,r)=>{let i=[];function n(l){i.push(l)}function s(){a(),e(Buffer.concat(i))}function o(l){a(),r(l)}function a(){t.removeListener("data",n),t.removeListener("end",s),t.removeListener("error",o)}t.on("data",n),t.on("end",s),t.on("error",o)})}var ra=async()=>{let t=fe(ra);t.log("Reading stdin");try{let r=cy(0).toString();if(r)return t.log("Found stdin",{stdin:r}),r}catch(r){t.log("Could not read stdin",{e:r})}return Ce(S.gray("Type your source code. Press Ctrl+D to finish.")),(await fy(process.stdin)).toString()};var Ge=async(t,e)=>{let r=Ue(e.start);try{await t(),r.succeed(e.success)}catch(i){throw r.fail(e.error),i}};var Oh={name:"relative-externs",setup(t){t.onResolve({filter:/^\.\.?\//},({path:e,importer:r})=>r.includes("node_modules")?null:{path:e,external:!0})}};var Ey=`import React from "react";
43
+ import ReactDOM from "react-dom";
44
+ `,Dh=t=>{let e=` ${t} `;Ce(S.bgBlue(S.bold(S.white(e))))},qh=t=>{let e=` ${t} `;Ce(S.bgRed(S.bold(S.white(e))))},yy=async()=>{let t;if(wr("dist")||await Nh("dist"),wr("dist/package.json")?t=JSON.parse(await Fh("dist/package.json","utf-8")):t={},t?.module==="module")return!0;t.type="module",await dy("dist/package.json",JSON.stringify(t,null,2))},Ph=(t,e,r)=>{e=Wt(e);let i=Yo(e);return{stdin:{contents:t,sourcefile:e,resolveDir:Mh(e),loader:r},outdir:void 0,outfile:i}},Lh=async(t,e,r)=>{t=Wt(t),e=Wt(e);let o=["yarn tailwindcss",r?"":"--minify","--postcss postcss.config.js",`-i ${t}`,`-o ${e}`];wr(Wt(process.cwd(),"tailwind.config.js"))&&o.push("--config tailwind.config.js");let a=Ae({log:!1,stdio:"ignore"}),l=o.join(" "),{code:u,stdout:c,stderr:f}=await a.run(l);if(u!==0)throw new Error(`Building CSS bundle exited with code ${u} for ${t}.
45
+ \rTried running: ${l}.
46
+ \rError: ${c+f}`)},Cy=`
47
+ if(typeof process<"u"){let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");globalThis.__filename=i(import.meta.url),globalThis.__dirname=e(globalThis.__filename);let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}
48
+ `,Sr=async({input:t="src/**/*",styles:e="src/components/index.css",target:r="esnext",dev:i=!1,bundle:n=!1,standalone:s=!1,runtimeOnly:o=!1,jsOnly:a=!1,noWrite:l=!1,stdin:u=void 0,stdinFile:c=void 0}={})=>{kh.NODE_ENV=i?"development":"production";let f=fe(Sr);i&&(o=!0),s&&(n=!0);let{cwd:h,srcDir:y,outDir:A}=Jo(),_=await Wo(),v=JSON.parse(_),b={treeShaking:n,target:r,minify:!i,jsx:"transform",jsxFactory:"React.createElement",format:"esm",charset:"utf8",logLevel:i?"warning":"error",define:{"process.env.NODE_ENV":i?JSON.stringify("development"):JSON.stringify("production")}},D=["esbuild","*.png"],F=Wt(h,"tsconfig.export.json"),ie=wr(F),Q=[];s||Q.push(Oh);let M={...b,tsconfig:ie?F:void 0,bundle:n,absWorkingDir:h,outbase:"src",outdir:"dist",assetNames:"[name].js",format:"esm",target:"esnext",platform:v?.platform??"node",write:!l,external:n?D:void 0,banner:n?{js:Cy}:void 0,plugins:Q};f.log("Build options",M);let I="";if(u){f.log("Building file from stdin",{stdin:u,stdinFile:c,noWrite:l}),c||(Ce(S.red("ERROR: --stdin-file must be specified to emulate a file location when using stdin.")),process.exit(1)),typeof u=="string"&&u.length?I=u:I=await ra();let B={...b,sourcefile:c,loader:"tsx",banner:void 0,footer:void 0};if(l)return(await _y(I,B)).code;{let p=Ph(I,c,"tsx");await Ge(async()=>await ia({...M,...p}),{start:"Building stdin to dist/.",success:"Built stdin to dist/.",error:"Error building stdin to dist/."}),Ce(S.grey("Use --no-write to print to stdout instead."));return}}f.log("Building",{files:t,dev:i,runtimeOnly:o}),Dh(`${S.bold("TS Module")} [${kh.NODE_ENV}]`);let x=na.default.sync(t,{cwd:h}).filter(B=>Ay(B)!==".d.ts").map(B=>Wt(B));if(gy(t)){x.length||x.push(t);let B=t.replace(y,A).replace(Gt,".js").replace(yt,".js");f.log("Cleaning emitted file:",{outfile:B}),await Th(B,{force:!0})}else f.log("Cleaning old output:",{outDir:A}),await Th(A,{force:!0,recursive:!0});let L=x.filter(B=>yt.test(B));f.log("Compiling TSX files:",{tsxJsxInput:L});let te=L.filter(B=>!B.endsWith(".d.ts"));await Ge(async()=>await Promise.all(te.map(async B=>{let p=await Fh(B,"utf-8"),d=Ey+p,se=Ph(d,B,"tsx");await ia({...M,...se})})),{start:"Compiling TSX files.",success:"Compiled TSX files.",error:"Failed to compile TSX files."});let m=x.filter(B=>Gt.test(B)).filter(B=>!yt.test(B));f.log("Compiling TS files:",{tsJsInput:m}),await Ge(async()=>await ia({...M,entryPoints:m.filter(B=>!B.endsWith(".d.ts"))}),{start:"Compiling TS/JS files.",success:"Compiled TS/JS files.",error:"Failed to compile TS/JS files."});let j=x.filter(B=>!wh.test(B));if(await Ge(async()=>{for(let B of j){let p=Yo(B);f.log("Copying non-source file:",{file:B,emittedFile:p}),await Nh(Mh(p),{recursive:!0}),await py(B,p,hy.COPYFILE_FICLONE)}},{start:"Copying non-source files to dist/.",success:"Copied non-source files to dist/.",error:"Failed to copy non-source files to dist/."}),!process.env.NO_REWRITES){let B=t.replace(y,A).replace(/^(\.\/)?src\//,"dist/").replace(Gt,".js").replace(yt,".js");f.log("Normalizing import specifiers in emitted JS.",{emittedJs:B}),await Ge(async()=>await Vt(B.endsWith(".js")?B:`${B}.js`),{start:"Normalizing import specifiers.",success:"Normalized import specifiers.",error:"Failed to normalize import specifiers."}),await Vt(B.endsWith(".js")?B:`${B}.js`)}if(await yy()&&Ue('Forced "type": "module" in output.').succeed(),!o){if(!a)if(wr(my(e))){f.log("Building styles for production.");let{style:B="./dist/bundle.css"}=v;if(f.log("Building style bundle.",{bundleInput:e,bundleOutput:B,dev:i}),await Ge(async()=>await Lh(e,B,i),{start:"Bundling styles with Tailwind.",success:"Bundled styles with Tailwind.",error:"Failed to bundle styles."}),n){f.log("Bundling all styles.");let p=na.default.sync("dist/**/*.css");await Ge(async()=>await Promise.all(p.map(async d=>await Lh(d,d,i))),{start:"Bundling emitted styles",success:`Bundled all styles to ${S.bold(B)}.`,error:"Failed to bundle styles."})}}else Ce(S.grey(`Bundle styles not found for this project.
49
+ \rChecked: `+S.bold(e)));Dh("Running post-build setup."),await Ge(async()=>await Vo(),{start:"Generating type declarations.",success:`Generated declarations for ${x.length} files.`,error:"Failed to generate type declarations."}),Ce(S.green("Build complete."))}},Hh=async(t,e)=>await Sr({input:t,...e});var Gh=Ie(gi(),1);import{copyFile as wy,mkdir as sa}from"fs/promises";import{dirname as Sy,resolve as Xt}from"path";var $h={"./package.json":"./package.json",".":"./dist/index.js","./*":"./dist/*/index.js"},jh={packageJson:{type:"module",platform:"node",engines:{node:">=14"},types:"dist/index.d.ts",files:["dist"],exports:$h,scripts:{dev:"tsmodule dev",build:"tsmodule build",test:"ava",pretest:"tsmodule build",prepublishOnly:"yarn test",lint:"eslint src --fix"}},files:[".github/**",".eslintrc",".gitignore","tsconfig.json","tsconfig.export.json","LICENSE","ava.config.mjs"],dependencies:[],devDependencies:["@types/node","@tsmodule/tsmodule","@typescript-eslint/eslint-plugin","@typescript-eslint/parser","ava","eslint","typescript"]},Ct={default:jh,react:{packageJson:{platform:"browser",style:"dist/bundle.css",exports:{...$h,"./*":"./dist/components/*/index.js","./styles":"./dist/bundle.css","./styles/*":"./dist/components/*/index.css"},scripts:{export:"tsmodule build",dev:"next dev",build:"next build",start:"next start",lint:"next lint --fix",pretest:"tsmodule build --runtime-only",test:"ava",prepublishOnly:"yarn export && yarn test"}},files:[".github/**",".gitignore","next-env.d.ts","next.config.js","postcss.config.js","tailwind.config.js"],dependencies:["react@^18.2.0","react-dom@^18.2.0"],devDependencies:[...jh.devDependencies,"@types/react@^18.0.23","@types/react-dom@^18.0.7","eslint-config-next","@tsmodule/react","next","tailwindcss","autoprefixer","cssnano","postcss","postcss-import"]}};import{dirname as by,resolve as Kh}from"path";import{fileURLToPath as vy}from"url";import{readFile as xy}from"fs/promises";var Br=Kh(by(vy(import.meta.url)),".."),Uh=async()=>{let t=await xy(Kh(Br,"package.json"),"utf-8");return JSON.parse(t)};var Jh=t=>Xt(Br,`./templates/${t}`),aa=async({template:t,targetDir:e=process.cwd()})=>{let r=Ae(),i=Jh(t),n=Xt(e);await sa(n,{recursive:!0}),await r.run({posix:`cp -rf ${i}/. ${n}`,win32:`xcopy /E /I /Q /Y ${i}\\ ${n}\\`})},oa=async({template:t,targetDir:e=process.cwd()})=>{let r=fe(oa);r.log("Copying template files",{template:t,targetDir:e});let i=Jh(t),n=Xt(e);await sa(n,{recursive:!0});let s=await(0,Gh.default)(Ct[t].files,{cwd:i,dot:!0});if(s.length)for(let o of s){let a=Xt(i,o),l=Xt(n,o);r.log({sourcePath:a,replacementPath:l}),await sa(Sy(l),{recursive:!0}),await wy(a,l)}},Qr=async({template:t,targetDir:e=process.cwd()})=>{let r=Xt(e),i=Ct[t].packageJson;return await Yi(r,i)},Vi=async({template:t,targetDir:e=process.cwd()})=>{let r=Ae({cwd:e}),i=[...Ct.default.dependencies],n=[...Ct.default.devDependencies];switch(t){case"react":i.push(...Ct.react.dependencies),n.push(...Ct.react.devDependencies);break}i.length&&await r.run(`yarn add ${i.join(" ")}`),n.length&&await r.run(`yarn add -D ${n.join(" ")}`)},Yh=async({template:t,targetDir:e=process.cwd()})=>{let r={template:"default",targetDir:e};if(await oa(r),await Qr(r),t!=="default"){let i={template:t,targetDir:e};await oa(i),await Qr(i)}await Vi({template:t,targetDir:e})};var Vh=async()=>{let t="default";(await Xo())?.dependencies?.react&&(t="react"),await Yh({template:t,targetDir:process.cwd()})};import{resolve as Wh}from"path";var Xh=async(t,{react:e=!1})=>{let r=Ue(`Creating new module ${S.blueBright(t)}.`).start(),i={template:"default",targetDir:t};if(await aa(i),await Qr(i),e){let s={template:"react",targetDir:t};await aa(s),await Qr(s)}await Yi(Wh(process.cwd(),t),{name:t}),r.succeed("Project created."),await Vi({template:"default",targetDir:t}),e&&await Vi({template:"react",targetDir:t}),r.succeed("Dependencies installed."),await Ae({cwd:Wh(t),stdio:["ignore","ignore","inherit"]}).run("git init"),r.succeed("Set up as Git repository.")};import{relative as Hy,resolve as jy}from"path";import{existsSync as $y}from"fs";import{lstat as Ky}from"fs/promises";var _p=Ie(Ap(),1);var gp=()=>{console.clear()},mp=t=>{Ce(`
50
+ `,S.gray(`Built ${S.bold(t)}.`),`
51
+ `,S.blue(new Date().toLocaleString()))},Ep=async()=>{let t=process.cwd(),e=Ae();process.platform!=="win32"&&await e.run("clear"),gp(),await Sr({dev:!0}),mp("src/**/*"),(0,_p.default)(jy(t,"src"),{recursive:!0}).on("change",async(r,i)=>{if(!$y(i)||(await Ky(i)).isDirectory())return;gp();let a=Date.now();try{await Sr({dev:!0,runtimeOnly:!0,input:i})}catch(u){Ce("ERROR:",u)}let l=Date.now()-a;Ue(S.blueBright(`Dev refresh finished in ${S.bold(`${l}ms`)}.`)).succeed(),mp(Hy(t,i))})};import{pathToFileURL as Uy}from"url";import{resolve as Gy}from"path";var yp=async()=>{let t=Gy(Br,"dist/loader/index.js"),e=["--no-warnings","--loader",Uy(t).href,...process.argv.slice(2)],r=Ae({stdio:"inherit"}),{code:i}=await r.run(`node ${e.join(" ")}`);process.exit(i??0)};var Jy=t=>{let e=t;return!(e.code===void 0||e.stdout==null||e.stderr==null)},bt=t=>async(...r)=>{try{return await t(...r)}catch(i){qh("Error"),Jy(i)?(i.stdout&&console.log(S.red(i.stdout)),i.stderr&&console.log(S.redBright(i.stderr))):console.log(S.redBright(JSON.stringify(i,null,2))),console.log()}};var{version:Yy}=await Uh(),nt=new Ua;nt.name(S.white(S.bold("tsmodule"))).usage(S.white(S.bold("<file | command> [options]"))).description(S.blueBright(`A tool for building TypeScript modules.
52
+
53
+ Run TS directly: ${S.bold("tsmodule src/index.ts")}
54
+ Use a command: ${S.bold("tsmodule build")}`)).version(String(Yy));nt.command("dev").description("Build and watch for changes.").action(bt(Ep));nt.command("build").description("Builds TS files to output in dist/.").argument("[files]","Glob of entrypoints to compile.").option("-j, --js-only","Do not build styles").option("-s, --styles <styles>","Specify stylesheet entrypoint.").option("-t, --target <target>","ECMAScript featureset to target.").option("-b, --bundle","Bundle external dependencies into entrypoints.").option("--standalone","Bundle a single entry-point.").option("-d, --dev","Build development runtime.").option("-r, --runtime-only","Do not emit type declarations, only build JS runtime.").option("--stdin [source]","Read from a string or stdin.").option("--stdin-file [file]","File path to mock for stdin.").option("--no-write",`Return code from build() rather than write to disk.
55
+ For programmatic use alongside { stdin: ... }.`).action(bt(Hh));nt.command("create <name>").option("--react","Create React component library with Next.js").description("Create a new project.").action(bt(Xh));nt.command("convert").description("Convert an existing project to a TS module.").action(bt(Vh));nt.command("normalize [files]").description(`Rewrites import specifiers in files to ESM-compliant paths.
56
+ (default: dist/**/*.js)`).action(bt(async({files:t})=>{await Vt(t)}));nt.command("execute",{isDefault:!0}).argument("<file>","The file to execute.").option("--d, --dev","Enable development mode").description("Run the given TS program, analogous to `node <file>`.").action(bt(yp));nt.parse(process.argv);
57
+ /*!
58
+ * fill-range <https://github.com/jonschlinkert/fill-range>
59
+ *
60
+ * Copyright (c) 2014-present, Jon Schlinkert.
61
+ * Licensed under the MIT License.
62
+ */
63
+ /*!
64
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
65
+ *
66
+ * Copyright (c) 2014-2016, Jon Schlinkert.
67
+ * Licensed under the MIT License.
68
+ */
69
+ /*!
70
+ * is-glob <https://github.com/jonschlinkert/is-glob>
71
+ *
72
+ * Copyright (c) 2014-2017, Jon Schlinkert.
73
+ * Released under the MIT License.
74
+ */
75
+ /*!
76
+ * is-number <https://github.com/jonschlinkert/is-number>
77
+ *
78
+ * Copyright (c) 2014-present, Jon Schlinkert.
79
+ * Released under the MIT License.
80
+ */
81
+ /*!
82
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
83
+ *
84
+ * Copyright (c) 2015-present, Jon Schlinkert.
85
+ * Released under the MIT License.
86
+ */
87
+ /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
88
+ /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
89
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */