UNPKG

mzreact-cli

Version:
22 lines 75.5 kB
#! /usr/bin/env node "use strict";var __getOwnPropNames=Object.getOwnPropertyNames,__commonJS=(h,A)=>function(){return A||(0,h[__getOwnPropNames(h)[0]])((A={exports:{}}).exports,A),A.exports},require_error=__commonJS({"node_modules/commander/lib/error.js"(h){var A=class extends Error{constructor(c,i,d){super(d),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=i,this.exitCode=c,this.nestedError=void 0}},b=class extends A{constructor(c){super(1,"commander.invalidArgument",c),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};h.CommanderError=A,h.InvalidArgumentError=b}}),require_argument=__commonJS({"node_modules/commander/lib/argument.js"(h){var{InvalidArgumentError:A}=require_error(),b=class{constructor(i,d){switch(this.description=d||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,i[0]){case"<":this.required=!0,this._name=i.slice(1,-1);break;case"[":this.required=!1,this._name=i.slice(1,-1);break;default:this.required=!0,this._name=i;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(i,d){return d===this.defaultValue||!Array.isArray(d)?[i]:d.concat(i)}default(i,d){return this.defaultValue=i,this.defaultValueDescription=d,this}argParser(i){return this.parseArg=i,this}choices(i){return this.argChoices=i.slice(),this.parseArg=(d,t)=>{if(!this.argChoices.includes(d))throw new A(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(d,t):d},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function c(i){const d=i.name()+(i.variadic===!0?"...":"");return i.required?"<"+d+">":"["+d+"]"}h.Argument=b,h.humanReadableArgName=c}}),require_help=__commonJS({"node_modules/commander/lib/help.js"(h){var{humanReadableArgName:A}=require_argument(),b=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(c){const i=c.commands.filter(d=>!d._hidden);if(c._hasImplicitHelpCommand()){const[,d,t]=c._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),r=c.createCommand(d).helpOption(!1);r.description(c._helpCommandDescription),t&&r.arguments(t),i.push(r)}return this.sortSubcommands&&i.sort((d,t)=>d.name().localeCompare(t.name())),i}compareOptions(c,i){const d=t=>t.short?t.short.replace(/^-/,""):t.long.replace(/^--/,"");return d(c).localeCompare(d(i))}visibleOptions(c){const i=c.options.filter(r=>!r.hidden),d=c._hasHelpOption&&c._helpShortFlag&&!c._findOption(c._helpShortFlag),t=c._hasHelpOption&&!c._findOption(c._helpLongFlag);if(d||t){let r;d?t?r=c.createOption(c._helpFlags,c._helpDescription):r=c.createOption(c._helpShortFlag,c._helpDescription):r=c.createOption(c._helpLongFlag,c._helpDescription),i.push(r)}return this.sortOptions&&i.sort(this.compareOptions),i}visibleGlobalOptions(c){if(!this.showGlobalOptions)return[];const i=[];for(let d=c.parent;d;d=d.parent){const t=d.options.filter(r=>!r.hidden);i.push(...t)}return this.sortOptions&&i.sort(this.compareOptions),i}visibleArguments(c){return c._argsDescription&&c.registeredArguments.forEach(i=>{i.description=i.description||c._argsDescription[i.name()]||""}),c.registeredArguments.find(i=>i.description)?c.registeredArguments:[]}subcommandTerm(c){const i=c.registeredArguments.map(d=>A(d)).join(" ");return c._name+(c._aliases[0]?"|"+c._aliases[0]:"")+(c.options.length?" [options]":"")+(i?" "+i:"")}optionTerm(c){return c.flags}argumentTerm(c){return c.name()}longestSubcommandTermLength(c,i){return i.visibleCommands(c).reduce((d,t)=>Math.max(d,i.subcommandTerm(t).length),0)}longestOptionTermLength(c,i){return i.visibleOptions(c).reduce((d,t)=>Math.max(d,i.optionTerm(t).length),0)}longestGlobalOptionTermLength(c,i){return i.visibleGlobalOptions(c).reduce((d,t)=>Math.max(d,i.optionTerm(t).length),0)}longestArgumentTermLength(c,i){return i.visibleArguments(c).reduce((d,t)=>Math.max(d,i.argumentTerm(t).length),0)}commandUsage(c){let i=c._name;c._aliases[0]&&(i=i+"|"+c._aliases[0]);let d="";for(let t=c.parent;t;t=t.parent)d=t.name()+" "+d;return d+i+" "+c.usage()}commandDescription(c){return c.description()}subcommandDescription(c){return c.summary()||c.description()}optionDescription(c){const i=[];return c.argChoices&&i.push(`choices: ${c.argChoices.map(d=>JSON.stringify(d)).join(", ")}`),c.defaultValue!==void 0&&(c.required||c.optional||c.isBoolean()&&typeof c.defaultValue=="boolean")&&i.push(`default: ${c.defaultValueDescription||JSON.stringify(c.defaultValue)}`),c.presetArg!==void 0&&c.optional&&i.push(`preset: ${JSON.stringify(c.presetArg)}`),c.envVar!==void 0&&i.push(`env: ${c.envVar}`),i.length>0?`${c.description} (${i.join(", ")})`:c.description}argumentDescription(c){const i=[];if(c.argChoices&&i.push(`choices: ${c.argChoices.map(d=>JSON.stringify(d)).join(", ")}`),c.defaultValue!==void 0&&i.push(`default: ${c.defaultValueDescription||JSON.stringify(c.defaultValue)}`),i.length>0){const d=`(${i.join(", ")})`;return c.description?`${c.description} ${d}`:d}return c.description}formatHelp(c,i){const d=i.padWidth(c,i),t=i.helpWidth||80,r=2,s=2;function o(E,k){if(k){const e=`${E.padEnd(d+s)}${k}`;return i.wrap(e,t-r,d+s)}return E}function n(E){return E.join(` `).replace(/^/gm," ".repeat(r))}let l=[`Usage: ${i.commandUsage(c)}`,""];const f=i.commandDescription(c);f.length>0&&(l=l.concat([i.wrap(f,t,0),""]));const v=i.visibleArguments(c).map(E=>o(i.argumentTerm(E),i.argumentDescription(E)));v.length>0&&(l=l.concat(["Arguments:",n(v),""]));const _=i.visibleOptions(c).map(E=>o(i.optionTerm(E),i.optionDescription(E)));if(_.length>0&&(l=l.concat(["Options:",n(_),""])),this.showGlobalOptions){const E=i.visibleGlobalOptions(c).map(k=>o(i.optionTerm(k),i.optionDescription(k)));E.length>0&&(l=l.concat(["Global Options:",n(E),""]))}const C=i.visibleCommands(c).map(E=>o(i.subcommandTerm(E),i.subcommandDescription(E)));return C.length>0&&(l=l.concat(["Commands:",n(C),""])),l.join(` `)}padWidth(c,i){return Math.max(i.longestOptionTermLength(c,i),i.longestGlobalOptionTermLength(c,i),i.longestSubcommandTermLength(c,i),i.longestArgumentTermLength(c,i))}wrap(c,i,d,t=40){const r=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",s=new RegExp(`[\\n][${r}]+`);if(c.match(s))return c;const o=i-d;if(o<t)return c;const n=c.slice(0,d),l=c.slice(d).replace(`\r `,` `),f=" ".repeat(d),_="\\s\u200B",C=new RegExp(` |.{1,${o-1}}([${_}]|$)|[^${_}]+?([${_}]|$)`,"g"),E=l.match(C)||[];return n+E.map((k,e)=>k===` `?"":(e>0?f:"")+k.trimEnd()).join(` `)}};h.Help=b}}),require_option=__commonJS({"node_modules/commander/lib/option.js"(h){var{InvalidArgumentError:A}=require_error(),b=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;const s=d(t);this.short=s.shortFlag,this.long=s.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(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,s)=>{if(!this.argChoices.includes(r))throw new A(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,s):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return i(this.name().replace(/^no-/,""))}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},c=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,s)=>{this.positiveOptions.has(s)&&this.dualOptions.add(s)})}valueFromOption(t,r){const s=r.attributeName();if(!this.dualOptions.has(s))return!0;const o=this.negativeOptions.get(s).presetArg,n=o!==void 0?o:!1;return r.negate===(n===t)}};function i(t){return t.split("-").reduce((r,s)=>r+s[0].toUpperCase()+s.slice(1))}function d(t){let r,s;const o=t.split(/[ |,]+/);return o.length>1&&!/^[[<]/.test(o[1])&&(r=o.shift()),s=o.shift(),!r&&/^-[^-]$/.test(s)&&(r=s,s=void 0),{shortFlag:r,longFlag:s}}h.Option=b,h.splitOptionFlags=d,h.DualOptions=c}}),require_suggestSimilar=__commonJS({"node_modules/commander/lib/suggestSimilar.js"(h){var A=3;function b(i,d){if(Math.abs(i.length-d.length)>A)return Math.max(i.length,d.length);const t=[];for(let r=0;r<=i.length;r++)t[r]=[r];for(let r=0;r<=d.length;r++)t[0][r]=r;for(let r=1;r<=d.length;r++)for(let s=1;s<=i.length;s++){let o=1;i[s-1]===d[r-1]?o=0:o=1,t[s][r]=Math.min(t[s-1][r]+1,t[s][r-1]+1,t[s-1][r-1]+o),s>1&&r>1&&i[s-1]===d[r-2]&&i[s-2]===d[r-1]&&(t[s][r]=Math.min(t[s][r],t[s-2][r-2]+1))}return t[i.length][d.length]}function c(i,d){if(!d||d.length===0)return"";d=Array.from(new Set(d));const t=i.startsWith("--");t&&(i=i.slice(2),d=d.map(n=>n.slice(2)));let r=[],s=A;const o=.4;return d.forEach(n=>{if(n.length<=1)return;const l=b(i,n),f=Math.max(i.length,n.length);(f-l)/f>o&&(l<s?(s=l,r=[n]):l===s&&r.push(n))}),r.sort((n,l)=>n.localeCompare(l)),t&&(r=r.map(n=>`--${n}`)),r.length>1?` (Did you mean one of ${r.join(", ")}?)`:r.length===1?` (Did you mean ${r[0]}?)`:""}h.suggestSimilar=c}}),require_command=__commonJS({"node_modules/commander/lib/command.js"(h){var A=require("events").EventEmitter,b=require("child_process"),c=require("path"),i=require("fs"),d=require("process"),{Argument:t,humanReadableArgName:r}=require_argument(),{CommanderError:s}=require_error(),{Help:o}=require_help(),{Option:n,splitOptionFlags:l,DualOptions:f}=require_option(),{suggestSimilar:v}=require_suggestSimilar(),_=class $ extends A{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,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:a=>d.stdout.write(a),writeErr:a=>d.stderr.write(a),getOutHelpWidth:()=>d.stdout.isTTY?d.stdout.columns:void 0,getErrHelpWidth:()=>d.stderr.isTTY?d.stderr.columns:void 0,outputError:(a,p)=>p(a)},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}_getCommandAndAncestors(){const e=[];for(let a=this;a;a=a.parent)e.push(a);return e}command(e,a,p){let m=a,u=p;typeof m=="object"&&m!==null&&(u=m,m=null),u=u||{};const[,g,O]=e.match(/([^ ]+) *(.*)/),y=this.createCommand(g);return m&&(y.description(m),y._executableHandler=!0),u.isDefault&&(this._defaultCommandName=y._name),y._hidden=!!(u.noHelp||u.hidden),y._executableFile=u.executableFile||null,O&&y.arguments(O),this.commands.push(y),y.parent=this,y.copyInheritedSettings(this),m?this:y}createCommand(e){return new $(e)}createHelp(){return Object.assign(new o,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,a){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name - specify the name in Command constructor or using .name()`);return a=a||{},a.isDefault&&(this._defaultCommandName=e._name),(a.noHelp||a.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,a){return new t(e,a)}argument(e,a,p,m){const u=this.createArgument(e,a);return typeof p=="function"?u.default(m).argParser(p):u.default(p),this.addArgument(u),this}arguments(e){return e.trim().split(/ +/).forEach(a=>{this.argument(a)}),this}addArgument(e){const a=this.registeredArguments.slice(-1)[0];if(a&&a.variadic)throw new Error(`only the last argument can be variadic '${a.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.registeredArguments.push(e),this}addHelpCommand(e,a){return e===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=a||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,a){const p=["preSubcommand","preAction","postAction"];if(!p.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'. Expecting one of '${p.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(a):this._lifeCycleHooks[e]=[a],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=a=>{if(a.code!=="commander.executeSubCommandAsync")throw a},this}_exit(e,a,p){this._exitCallback&&this._exitCallback(new s(e,a,p)),d.exit(e)}action(e){const a=p=>{const m=this.registeredArguments.length,u=p.slice(0,m);return this._storeOptionsAsProperties?u[m]=this:u[m]=this.opts(),u.push(this),e.apply(this,u)};return this._actionHandler=a,this}createOption(e,a){return new n(e,a)}_callParseArg(e,a,p,m){try{return e.parseArg(a,p)}catch(u){if(u.code==="commander.invalidArgument"){const g=`${m} ${u.message}`;this.error(g,{exitCode:u.exitCode,code:u.code})}throw u}}addOption(e){const a=e.name(),p=e.attributeName();if(e.negate){const u=e.long.replace(/^--no-/,"--");this._findOption(u)||this.setOptionValueWithSource(p,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(p,e.defaultValue,"default");this.options.push(e);const m=(u,g,O)=>{u==null&&e.presetArg!==void 0&&(u=e.presetArg);const y=this.getOptionValue(p);u!==null&&e.parseArg?u=this._callParseArg(e,u,y,g):u!==null&&e.variadic&&(u=e._concatValue(u,y)),u==null&&(e.negate?u=!1:e.isBoolean()||e.optional?u=!0:u=""),this.setOptionValueWithSource(p,u,O)};return this.on("option:"+a,u=>{const g=`error: option '${e.flags}' argument '${u}' is invalid.`;m(u,g,"cli")}),e.envVar&&this.on("optionEnv:"+a,u=>{const g=`error: option '${e.flags}' value '${u}' from env '${e.envVar}' is invalid.`;m(u,g,"env")}),this}_optionEx(e,a,p,m,u){if(typeof a=="object"&&a instanceof n)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const g=this.createOption(a,p);if(g.makeOptionMandatory(!!e.mandatory),typeof m=="function")g.default(u).argParser(m);else if(m instanceof RegExp){const O=m;m=(y,w)=>{const S=O.exec(y);return S?S[0]:w},g.default(u).argParser(m)}else g.default(m);return this.addOption(g)}option(e,a,p,m){return this._optionEx({},e,a,p,m)}requiredOption(e,a,p,m){return this._optionEx({mandatory:!0},e,a,p,m)}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.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,a){return this.setOptionValueWithSource(e,a,void 0)}setOptionValueWithSource(e,a,p){return this._storeOptionsAsProperties?this[e]=a:this._optionValues[e]=a,this._optionValueSources[e]=p,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let a;return this._getCommandAndAncestors().forEach(p=>{p.getOptionValueSource(e)!==void 0&&(a=p.getOptionValueSource(e))}),a}_prepareUserArgs(e,a){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");a=a||{},e===void 0&&(e=d.argv,d.versions&&d.versions.electron&&(a.from="electron")),this.rawArgs=e.slice();let p;switch(a.from){case void 0:case"node":this._scriptPath=e[1],p=e.slice(2);break;case"electron":d.defaultApp?(this._scriptPath=e[1],p=e.slice(2)):p=e.slice(1);break;case"user":p=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${a.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",p}parse(e,a){const p=this._prepareUserArgs(e,a);return this._parseCommand([],p),this}async parseAsync(e,a){const p=this._prepareUserArgs(e,a);return await this._parseCommand([],p),this}_executeSubCommand(e,a){a=a.slice();let p=!1;const m=[".js",".ts",".tsx",".mjs",".cjs"];function u(S,T){const M=c.resolve(S,T);if(i.existsSync(M))return M;if(m.includes(c.extname(T)))return;const P=m.find(F=>i.existsSync(`${M}${F}`));if(P)return`${M}${P}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let g=e._executableFile||`${this._name}-${e._name}`,O=this._executableDir||"";if(this._scriptPath){let S;try{S=i.realpathSync(this._scriptPath)}catch{S=this._scriptPath}O=c.resolve(c.dirname(S),O)}if(O){let S=u(O,g);if(!S&&!e._executableFile&&this._scriptPath){const T=c.basename(this._scriptPath,c.extname(this._scriptPath));T!==this._name&&(S=u(O,`${T}-${e._name}`))}g=S||g}p=m.includes(c.extname(g));let y;d.platform!=="win32"?p?(a.unshift(g),a=E(d.execArgv).concat(a),y=b.spawn(d.argv[0],a,{stdio:"inherit"})):y=b.spawn(g,a,{stdio:"inherit"}):(a.unshift(g),a=E(d.execArgv).concat(a),y=b.spawn(d.execPath,a,{stdio:"inherit"})),y.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(T=>{d.on(T,()=>{y.killed===!1&&y.exitCode===null&&y.kill(T)})});const w=this._exitCallback;w?y.on("close",()=>{w(new s(d.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):y.on("close",d.exit.bind(d)),y.on("error",S=>{if(S.code==="ENOENT"){const T=O?`searched for local subcommand relative to directory '${O}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",M=`'${g}' does not exist - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead - if the default executable name is not suitable, use the executableFile option to supply a custom name or path - ${T}`;throw new Error(M)}else if(S.code==="EACCES")throw new Error(`'${g}' not executable`);if(!w)d.exit(1);else{const T=new s(1,"commander.executeSubCommandAsync","(error)");T.nestedError=S,w(T)}}),this.runningCommand=y}_dispatchSubcommand(e,a,p){const m=this._findCommand(e);m||this.help({error:!0});let u;return u=this._chainOrCallSubCommandHook(u,m,"preSubcommand"),u=this._chainOrCall(u,()=>{if(m._executableHandler)this._executeSubCommand(m,a.concat(p));else return m._parseCommand(a,p)}),u}_dispatchHelpCommand(e){e||this.help();const a=this._findCommand(e);return a&&!a._executableHandler&&a.help(),this._dispatchSubcommand(e,[],[this._helpLongFlag||this._helpShortFlag])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,a)=>{e.required&&this.args[a]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){const e=(p,m,u)=>{let g=m;if(m!==null&&p.parseArg){const O=`error: command-argument value '${m}' is invalid for argument '${p.name()}'.`;g=this._callParseArg(p,m,u,O)}return g};this._checkNumberOfArguments();const a=[];this.registeredArguments.forEach((p,m)=>{let u=p.defaultValue;p.variadic?m<this.args.length?(u=this.args.slice(m),p.parseArg&&(u=u.reduce((g,O)=>e(p,O,g),p.defaultValue))):u===void 0&&(u=[]):m<this.args.length&&(u=this.args[m],p.parseArg&&(u=e(p,u,p.defaultValue))),a[m]=u}),this.processedArgs=a}_chainOrCall(e,a){return e&&e.then&&typeof e.then=="function"?e.then(()=>a()):a()}_chainOrCallHooks(e,a){let p=e;const m=[];return this._getCommandAndAncestors().reverse().filter(u=>u._lifeCycleHooks[a]!==void 0).forEach(u=>{u._lifeCycleHooks[a].forEach(g=>{m.push({hookedCommand:u,callback:g})})}),a==="postAction"&&m.reverse(),m.forEach(u=>{p=this._chainOrCall(p,()=>u.callback(u.hookedCommand,this))}),p}_chainOrCallSubCommandHook(e,a,p){let m=e;return this._lifeCycleHooks[p]!==void 0&&this._lifeCycleHooks[p].forEach(u=>{m=this._chainOrCall(m,()=>u(this,a))}),m}_parseCommand(e,a){const p=this.parseOptions(a);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(p.operands),a=p.unknown,this.args=e.concat(a),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),a);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return C(this,a),this._dispatchSubcommand(this._defaultCommandName,e,a);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),C(this,p.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const m=()=>{p.unknown.length>0&&this.unknownOption(p.unknown[0])},u=`command:${this.name()}`;if(this._actionHandler){m(),this._processArguments();let g;return g=this._chainOrCallHooks(g,"preAction"),g=this._chainOrCall(g,()=>this._actionHandler(this.processedArgs)),this.parent&&(g=this._chainOrCall(g,()=>{this.parent.emit(u,e,a)})),g=this._chainOrCallHooks(g,"postAction"),g}if(this.parent&&this.parent.listenerCount(u))m(),this._processArguments(),this.parent.emit(u,e,a);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,a);this.listenerCount("command:*")?this.emit("command:*",e,a):this.commands.length?this.unknownCommand():(m(),this._processArguments())}else this.commands.length?(m(),this.help({error:!0})):(m(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(a=>a._name===e||a._aliases.includes(e))}_findOption(e){return this.options.find(a=>a.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(a=>{a.mandatory&&e.getOptionValue(a.attributeName())===void 0&&e.missingMandatoryOptionValue(a)})})}_checkForConflictingLocalOptions(){const e=this.options.filter(p=>{const m=p.attributeName();return this.getOptionValue(m)===void 0?!1:this.getOptionValueSource(m)!=="default"});e.filter(p=>p.conflictsWith.length>0).forEach(p=>{const m=e.find(u=>p.conflictsWith.includes(u.attributeName()));m&&this._conflictingOption(p,m)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){const a=[],p=[];let m=a;const u=e.slice();function g(y){return y.length>1&&y[0]==="-"}let O=null;for(;u.length;){const y=u.shift();if(y==="--"){m===p&&m.push(y),m.push(...u);break}if(O&&!g(y)){this.emit(`option:${O.name()}`,y);continue}if(O=null,g(y)){const w=this._findOption(y);if(w){if(w.required){const S=u.shift();S===void 0&&this.optionMissingArgument(w),this.emit(`option:${w.name()}`,S)}else if(w.optional){let S=null;u.length>0&&!g(u[0])&&(S=u.shift()),this.emit(`option:${w.name()}`,S)}else this.emit(`option:${w.name()}`);O=w.variadic?w:null;continue}}if(y.length>2&&y[0]==="-"&&y[1]!=="-"){const w=this._findOption(`-${y[1]}`);if(w){w.required||w.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${w.name()}`,y.slice(2)):(this.emit(`option:${w.name()}`),u.unshift(`-${y.slice(2)}`));continue}}if(/^--[^=]+=/.test(y)){const w=y.indexOf("="),S=this._findOption(y.slice(0,w));if(S&&(S.required||S.optional)){this.emit(`option:${S.name()}`,y.slice(w+1));continue}}if(g(y)&&(m=p),(this._enablePositionalOptions||this._passThroughOptions)&&a.length===0&&p.length===0){if(this._findCommand(y)){a.push(y),u.length>0&&p.push(...u);break}else if(y===this._helpCommandName&&this._hasImplicitHelpCommand()){a.push(y),u.length>0&&a.push(...u);break}else if(this._defaultCommandName){p.push(y),u.length>0&&p.push(...u);break}}if(this._passThroughOptions){m.push(y),u.length>0&&m.push(...u);break}m.push(y)}return{operands:a,unknown:p}}opts(){if(this._storeOptionsAsProperties){const e={},a=this.options.length;for(let p=0;p<a;p++){const m=this.options[p].attributeName();e[m]=m===this._versionOptionName?this._version:this[m]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,a)=>Object.assign(e,a.opts()),{})}error(e,a){this._outputConfiguration.outputError(`${e} `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError} `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(` `),this.outputHelp({error:!0}));const p=a||{},m=p.exitCode||1,u=p.code||"commander.error";this._exit(m,u,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in d.env){const a=e.attributeName();(this.getOptionValue(a)===void 0||["default","config","env"].includes(this.getOptionValueSource(a)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,d.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){const e=new f(this.options),a=p=>this.getOptionValue(p)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(p));this.options.filter(p=>p.implied!==void 0&&a(p.attributeName())&&e.valueFromOption(this.getOptionValue(p.attributeName()),p)).forEach(p=>{Object.keys(p.implied).filter(m=>!a(m)).forEach(m=>{this.setOptionValueWithSource(m,p.implied[m],"implied")})})}missingArgument(e){const a=`error: missing required argument '${e}'`;this.error(a,{code:"commander.missingArgument"})}optionMissingArgument(e){const a=`error: option '${e.flags}' argument missing`;this.error(a,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const a=`error: required option '${e.flags}' not specified`;this.error(a,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,a){const p=g=>{const O=g.attributeName(),y=this.getOptionValue(O),w=this.options.find(T=>T.negate&&O===T.attributeName()),S=this.options.find(T=>!T.negate&&O===T.attributeName());return w&&(w.presetArg===void 0&&y===!1||w.presetArg!==void 0&&y===w.presetArg)?w:S||g},m=g=>{const O=p(g),y=O.attributeName();return this.getOptionValueSource(y)==="env"?`environment variable '${O.envVar}'`:`option '${O.flags}'`},u=`error: ${m(e)} cannot be used with ${m(a)}`;this.error(u,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let a="";if(e.startsWith("--")&&this._showSuggestionAfterError){let m=[],u=this;do{const g=u.createHelp().visibleOptions(u).filter(O=>O.long).map(O=>O.long);m=m.concat(g),u=u.parent}while(u&&!u._enablePositionalOptions);a=v(e,m)}const p=`error: unknown option '${e}'${a}`;this.error(p,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const a=this.registeredArguments.length,p=a===1?"":"s",u=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${a} argument${p} but got ${e.length}.`;this.error(u,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let a="";if(this._showSuggestionAfterError){const m=[];this.createHelp().visibleCommands(this).forEach(u=>{m.push(u.name()),u.alias()&&m.push(u.alias())}),a=v(e,m)}const p=`error: unknown command '${e}'${a}`;this.error(p,{code:"commander.unknownCommand"})}version(e,a,p){if(e===void 0)return this._version;this._version=e,a=a||"-V, --version",p=p||"output the version number";const m=this.createOption(a,p);return this._versionOptionName=m.attributeName(),this.options.push(m),this.on("option:"+m.name(),()=>{this._outputConfiguration.writeOut(`${e} `),this._exit(0,"commander.version",e)}),this}description(e,a){return e===void 0&&a===void 0?this._description:(this._description=e,a&&(this._argsDescription=a),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let a=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(a=this.commands[this.commands.length-1]),e===a._name)throw new Error("Command alias can't be the same as its name");return a._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(a=>this.alias(a)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;const a=this.registeredArguments.map(p=>r(p));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?a:[]).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){const a=this.createHelp();return a.helpWidth===void 0&&(a.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),a.formatHelp(this,a)}_getHelpContext(e){e=e||{};const a={error:!!e.error};let p;return a.error?p=m=>this._outputConfiguration.writeErr(m):p=m=>this._outputConfiguration.writeOut(m),a.write=e.write||p,a.command=this,a}outputHelp(e){let a;typeof e=="function"&&(a=e,e=void 0);const p=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(u=>u.emit("beforeAllHelp",p)),this.emit("beforeHelp",p);let m=this.helpInformation(p);if(a&&(m=a(m),typeof m!="string"&&!Buffer.isBuffer(m)))throw new Error("outputHelp callback must return a string or a Buffer");p.write(m),this._helpLongFlag&&this.emit(this._helpLongFlag),this.emit("afterHelp",p),this._getCommandAndAncestors().forEach(u=>u.emit("afterAllHelp",p))}helpOption(e,a){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=a||this._helpDescription;const p=l(this._helpFlags);return this._helpShortFlag=p.shortFlag,this._helpLongFlag=p.longFlag,this}help(e){this.outputHelp(e);let a=d.exitCode||0;a===0&&e&&typeof e!="function"&&e.error&&(a=1),this._exit(a,"commander.help","(outputHelp)")}addHelpText(e,a){const p=["beforeAll","before","after","afterAll"];if(!p.includes(e))throw new Error(`Unexpected value for position to addHelpText. Expecting one of '${p.join("', '")}'`);const m=`${e}Help`;return this.on(m,u=>{let g;typeof a=="function"?g=a({error:u.error,command:u.command}):g=a,g&&u.write(`${g} `)}),this}};function C(k,e){k._hasHelpOption&&e.find(p=>p===k._helpLongFlag||p===k._helpShortFlag)&&(k.outputHelp(),k._exit(0,"commander.helpDisplayed","(outputHelp)"))}function E(k){return k.map(e=>{if(!e.startsWith("--inspect"))return e;let a,p="127.0.0.1",m="9229",u;return(u=e.match(/^(--inspect(-brk)?)$/))!==null?a=u[1]:(u=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(a=u[1],/^\d+$/.test(u[3])?m=u[3]:p=u[3]):(u=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(a=u[1],p=u[3],m=u[4]),a&&m!=="0"?`${a}=${p}:${parseInt(m)+1}`:e})}h.Command=_}}),require_commander=__commonJS({"node_modules/commander/index.js"(h,A){var{Argument:b}=require_argument(),{Command:c}=require_command(),{CommanderError:i,InvalidArgumentError:d}=require_error(),{Help:t}=require_help(),{Option:r}=require_option();h=A.exports=new c,h.program=h,h.Command=c,h.Option=r,h.Argument=b,h.Help=t,h.CommanderError=i,h.InvalidArgumentError=d,h.InvalidOptionArgumentError=d}}),require_color_name=__commonJS({"node_modules/color-name/index.js"(h,A){"use strict";A.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}}),require_conversions=__commonJS({"node_modules/color-convert/conversions.js"(h,A){var b=require_color_name(),c={};for(const t of Object.keys(b))c[b[t]]=t;var i={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};A.exports=i;for(const t of Object.keys(i)){if(!("channels"in i[t]))throw new Error("missing channels property: "+t);if(!("labels"in i[t]))throw new Error("missing channel labels property: "+t);if(i[t].labels.length!==i[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:r,labels:s}=i[t];delete i[t].channels,delete i[t].labels,Object.defineProperty(i[t],"channels",{value:r}),Object.defineProperty(i[t],"labels",{value:s})}i.rgb.hsl=function(t){const r=t[0]/255,s=t[1]/255,o=t[2]/255,n=Math.min(r,s,o),l=Math.max(r,s,o),f=l-n;let v,_;l===n?v=0:r===l?v=(s-o)/f:s===l?v=2+(o-r)/f:o===l&&(v=4+(r-s)/f),v=Math.min(v*60,360),v<0&&(v+=360);const C=(n+l)/2;return l===n?_=0:C<=.5?_=f/(l+n):_=f/(2-l-n),[v,_*100,C*100]},i.rgb.hsv=function(t){let r,s,o,n,l;const f=t[0]/255,v=t[1]/255,_=t[2]/255,C=Math.max(f,v,_),E=C-Math.min(f,v,_),k=function(e){return(C-e)/6/E+1/2};return E===0?(n=0,l=0):(l=E/C,r=k(f),s=k(v),o=k(_),f===C?n=o-s:v===C?n=1/3+r-o:_===C&&(n=2/3+s-r),n<0?n+=1:n>1&&(n-=1)),[n*360,l*100,C*100]},i.rgb.hwb=function(t){const r=t[0],s=t[1];let o=t[2];const n=i.rgb.hsl(t)[0],l=1/255*Math.min(r,Math.min(s,o));return o=1-1/255*Math.max(r,Math.max(s,o)),[n,l*100,o*100]},i.rgb.cmyk=function(t){const r=t[0]/255,s=t[1]/255,o=t[2]/255,n=Math.min(1-r,1-s,1-o),l=(1-r-n)/(1-n)||0,f=(1-s-n)/(1-n)||0,v=(1-o-n)/(1-n)||0;return[l*100,f*100,v*100,n*100]};function d(t,r){return(t[0]-r[0])**2+(t[1]-r[1])**2+(t[2]-r[2])**2}i.rgb.keyword=function(t){const r=c[t];if(r)return r;let s=1/0,o;for(const n of Object.keys(b)){const l=b[n],f=d(t,l);f<s&&(s=f,o=n)}return o},i.keyword.rgb=function(t){return b[t]},i.rgb.xyz=function(t){let r=t[0]/255,s=t[1]/255,o=t[2]/255;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92;const n=r*.4124+s*.3576+o*.1805,l=r*.2126+s*.7152+o*.0722,f=r*.0193+s*.1192+o*.9505;return[n*100,l*100,f*100]},i.rgb.lab=function(t){const r=i.rgb.xyz(t);let s=r[0],o=r[1],n=r[2];s/=95.047,o/=100,n/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;const l=116*o-16,f=500*(s-o),v=200*(o-n);return[l,f,v]},i.hsl.rgb=function(t){const r=t[0]/360,s=t[1]/100,o=t[2]/100;let n,l,f;if(s===0)return f=o*255,[f,f,f];o<.5?n=o*(1+s):n=o+s-o*s;const v=2*o-n,_=[0,0,0];for(let C=0;C<3;C++)l=r+1/3*-(C-1),l<0&&l++,l>1&&l--,6*l<1?f=v+(n-v)*6*l:2*l<1?f=n:3*l<2?f=v+(n-v)*(2/3-l)*6:f=v,_[C]=f*255;return _},i.hsl.hsv=function(t){const r=t[0];let s=t[1]/100,o=t[2]/100,n=s;const l=Math.max(o,.01);o*=2,s*=o<=1?o:2-o,n*=l<=1?l:2-l;const f=(o+s)/2,v=o===0?2*n/(l+n):2*s/(o+s);return[r,v*100,f*100]},i.hsv.rgb=function(t){const r=t[0]/60,s=t[1]/100;let o=t[2]/100;const n=Math.floor(r)%6,l=r-Math.floor(r),f=255*o*(1-s),v=255*o*(1-s*l),_=255*o*(1-s*(1-l));switch(o*=255,n){case 0:return[o,_,f];case 1:return[v,o,f];case 2:return[f,o,_];case 3:return[f,v,o];case 4:return[_,f,o];case 5:return[o,f,v]}},i.hsv.hsl=function(t){const r=t[0],s=t[1]/100,o=t[2]/100,n=Math.max(o,.01);let l,f;f=(2-s)*o;const v=(2-s)*n;return l=s*n,l/=v<=1?v:2-v,l=l||0,f/=2,[r,l*100,f*100]},i.hwb.rgb=function(t){const r=t[0]/360;let s=t[1]/100,o=t[2]/100;const n=s+o;let l;n>1&&(s/=n,o/=n);const f=Math.floor(6*r),v=1-o;l=6*r-f,f&1&&(l=1-l);const _=s+l*(v-s);let C,E,k;switch(f){default:case 6:case 0:C=v,E=_,k=s;break;case 1:C=_,E=v,k=s;break;case 2:C=s,E=v,k=_;break;case 3:C=s,E=_,k=v;break;case 4:C=_,E=s,k=v;break;case 5:C=v,E=s,k=_;break}return[C*255,E*255,k*255]},i.cmyk.rgb=function(t){const r=t[0]/100,s=t[1]/100,o=t[2]/100,n=t[3]/100,l=1-Math.min(1,r*(1-n)+n),f=1-Math.min(1,s*(1-n)+n),v=1-Math.min(1,o*(1-n)+n);return[l*255,f*255,v*255]},i.xyz.rgb=function(t){const r=t[0]/100,s=t[1]/100,o=t[2]/100;let n,l,f;return n=r*3.2406+s*-1.5372+o*-.4986,l=r*-.9689+s*1.8758+o*.0415,f=r*.0557+s*-.204+o*1.057,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,f=f>.0031308?1.055*f**(1/2.4)-.055:f*12.92,n=Math.min(Math.max(0,n),1),l=Math.min(Math.max(0,l),1),f=Math.min(Math.max(0,f),1),[n*255,l*255,f*255]},i.xyz.lab=function(t){let r=t[0],s=t[1],o=t[2];r/=95.047,s/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const n=116*s-16,l=500*(r-s),f=200*(s-o);return[n,l,f]},i.lab.xyz=function(t){const r=t[0],s=t[1],o=t[2];let n,l,f;l=(r+16)/116,n=s/500+l,f=l-o/200;const v=l**3,_=n**3,C=f**3;return l=v>.008856?v:(l-16/116)/7.787,n=_>.008856?_:(n-16/116)/7.787,f=C>.008856?C:(f-16/116)/7.787,n*=95.047,l*=100,f*=108.883,[n,l,f]},i.lab.lch=function(t){const r=t[0],s=t[1],o=t[2];let n;n=Math.atan2(o,s)*360/2/Math.PI,n<0&&(n+=360);const f=Math.sqrt(s*s+o*o);return[r,f,n]},i.lch.lab=function(t){const r=t[0],s=t[1],n=t[2]/360*2*Math.PI,l=s*Math.cos(n),f=s*Math.sin(n);return[r,l,f]},i.rgb.ansi16=function(t,r=null){const[s,o,n]=t;let l=r===null?i.rgb.hsv(t)[2]:r;if(l=Math.round(l/50),l===0)return 30;let f=30+(Math.round(n/255)<<2|Math.round(o/255)<<1|Math.round(s/255));return l===2&&(f+=60),f},i.hsv.ansi16=function(t){return i.rgb.ansi16(i.hsv.rgb(t),t[2])},i.rgb.ansi256=function(t){const r=t[0],s=t[1],o=t[2];return r===s&&s===o?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(s/255*5)+Math.round(o/255*5)},i.ansi16.rgb=function(t){let r=t%10;if(r===0||r===7)return t>50&&(r+=3.5),r=r/10.5*255,[r,r,r];const s=(~~(t>50)+1)*.5,o=(r&1)*s*255,n=(r>>1&1)*s*255,l=(r>>2&1)*s*255;return[o,n,l]},i.ansi256.rgb=function(t){if(t>=232){const l=(t-232)*10+8;return[l,l,l]}t-=16;let r;const s=Math.floor(t/36)/5*255,o=Math.floor((r=t%36)/6)/5*255,n=r%6/5*255;return[s,o,n]},i.rgb.hex=function(t){const s=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(s.length)+s},i.hex.rgb=function(t){const r=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r)return[0,0,0];let s=r[0];r[0].length===3&&(s=s.split("").map(v=>v+v).join(""));const o=parseInt(s,16),n=o>>16&255,l=o>>8&255,f=o&255;return[n,l,f]},i.rgb.hcg=function(t){const r=t[0]/255,s=t[1]/255,o=t[2]/255,n=Math.max(Math.max(r,s),o),l=Math.min(Math.min(r,s),o),f=n-l;let v,_;return f<1?v=l/(1-f):v=0,f<=0?_=0:n===r?_=(s-o)/f%6:n===s?_=2+(o-r)/f:_=4+(r-s)/f,_/=6,_%=1,[_*360,f*100,v*100]},i.hsl.hcg=function(t){const r=t[1]/100,s=t[2]/100,o=s<.5?2*r*s:2*r*(1-s);let n=0;return o<1&&(n=(s-.5*o)/(1-o)),[t[0],o*100,n*100]},i.hsv.hcg=function(t){const r=t[1]/100,s=t[2]/100,o=r*s;let n=0;return o<1&&(n=(s-o)/(1-o)),[t[0],o*100,n*100]},i.hcg.rgb=function(t){const r=t[0]/360,s=t[1]/100,o=t[2]/100;if(s===0)return[o*255,o*255,o*255];const n=[0,0,0],l=r%1*6,f=l%1,v=1-f;let _=0;switch(Math.floor(l)){case 0:n[0]=1,n[1]=f,n[2]=0;break;case 1:n[0]=v,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=f;break;case 3:n[0]=0,n[1]=v,n[2]=1;break;case 4:n[0]=f,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=v}return _=(1-s)*o,[(s*n[0]+_)*255,(s*n[1]+_)*255,(s*n[2]+_)*255]},i.hcg.hsv=function(t){const r=t[1]/100,s=t[2]/100,o=r+s*(1-r);let n=0;return o>0&&(n=r/o),[t[0],n*100,o*100]},i.hcg.hsl=function(t){const r=t[1]/100,o=t[2]/100*(1-r)+.5*r;let n=0;return o>0&&o<.5?n=r/(2*o):o>=.5&&o<1&&(n=r/(2*(1-o))),[t[0],n*100,o*100]},i.hcg.hwb=function(t){const r=t[1]/100,s=t[2]/100,o=r+s*(1-r);return[t[0],(o-r)*100,(1-o)*100]},i.hwb.hcg=function(t){const r=t[1]/100,o=1-t[2]/100,n=o-r;let l=0;return n<1&&(l=(o-n)/(1-n)),[t[0],n*100,l*100]},i.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},i.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},i.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},i.gray.hsl=function(t){return[0,0,t[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(t){return[0,100,t[0]]},i.gray.cmyk=function(t){return[0,0,0,t[0]]},i.gray.lab=function(t){return[t[0],0,0]},i.gray.hex=function(t){const r=Math.round(t[0]/100*255)&255,o=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".substring(o.length)+o},i.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}}),require_route=__commonJS({"node_modules/color-convert/route.js"(h,A){var b=require_conversions();function c(){const r={},s=Object.keys(b);for(let o=s.length,n=0;n<o;n++)r[s[n]]={distance:-1,parent:null};return r}function i(r){const s=c(),o=[r];for(s[r].distance=0;o.length;){const n=o.pop(),l=Object.keys(b[n]);for(let f=l.length,v=0;v<f;v++){const _=l[v],C=s[_];C.distance===-1&&(C.distance=s[n].distance+1,C.parent=n,o.unshift(_))}}return s}function d(r,s){return function(o){return s(r(o))}}function t(r,s){const o=[s[r].parent,r];let n=b[s[r].parent][r],l=s[r].parent;for(;s[l].parent;)o.unshift(s[l].parent),n=d(b[s[l].parent][l],n),l=s[l].parent;return n.conversion=o,n}A.exports=function(r){const s=i(r),o={},n=Object.keys(s);for(let l=n.length,f=0;f<l;f++){const v=n[f];s[v].parent!==null&&(o[v]=t(v,s))}return o}}}),require_color_convert=__commonJS({"node_modules/color-convert/index.js"(h,A){var b=require_conversions(),c=require_route(),i={},d=Object.keys(b);function t(s){const o=function(...n){const l=n[0];return l==null?l:(l.length>1&&(n=l),s(n))};return"conversion"in s&&(o.conversion=s.conversion),o}function r(s){const o=function(...n){const l=n[0];if(l==null)return l;l.length>1&&(n=l);const f=s(n);if(typeof f=="object")for(let v=f.length,_=0;_<v;_++)f[_]=Math.round(f[_]);return f};return"conversion"in s&&(o.conversion=s.conversion),o}d.forEach(s=>{i[s]={},Object.defineProperty(i[s],"channels",{value:b[s].channels}),Object.defineProperty(i[s],"labels",{value:b[s].labels});const o=c(s);Object.keys(o).forEach(l=>{const f=o[l];i[s][l]=r(f),i[s][l].raw=t(f)})}),A.exports=i}}),require_ansi_styles=__commonJS({"node_modules/ansi-styles/index.js"(h,A){"use strict";var b=(l,f)=>(...v)=>`\x1B[${l(...v)+f}m`,c=(l,f)=>(...v)=>{const _=l(...v);return`\x1B[${38+f};5;${_}m`},i=(l,f)=>(...v)=>{const _=l(...v);return`\x1B[${38+f};2;${_[0]};${_[1]};${_[2]}m`},d=l=>l,t=(l,f,v)=>[l,f,v],r=(l,f,v)=>{Object.defineProperty(l,f,{get:()=>{const _=v();return Object.defineProperty(l,f,{value:_,enumerable:!0,configurable:!0}),_},enumerable:!0,configurable:!0})},s,o=(l,f,v,_)=>{s===void 0&&(s=require_color_convert());const C=_?10:0,E={};for(const[k,e]of Object.entries(s)){const a=k==="ansi16"?"ansi":k;k===f?E[a]=l(v,C):typeof e=="object"&&(E[a]=l(e[f],C))}return E};function n(){const l=new Map,f={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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]}};f.color.gray=f.color.blackBright,f.bgColor.bgGray=f.bgColor.bgBlackBright,f.color.grey=f.color.blackBright,f.bgColor.bgGrey=f.bgColor.bgBlackBright;for(const[v,_]of Object.entries(f)){for(const[C,E]of Object.entries(_))f[C]={open:`\x1B[${E[0]}m`,close:`\x1B[${E[1]}m`},_[C]=f[C],l.set(E[0],E[1]);Object.defineProperty(f,v,{value:_,enumerable:!1})}return Object.defineProperty(f,"codes",{value:l,enumerable:!1}),f.color.close="\x1B[39m",f.bgColor.close="\x1B[49m",r(f.color,"ansi",()=>o(b,"ansi16",d,!1)),r(f.color,"ansi256",()=>o(c,"ansi256",d,!1)),r(f.color,"ansi1