UNPKG

@lntvow/admin-vue

Version:
23 lines 964 kB
#!/usr/bin/env node import{a as F,b as c,c as yt}from"./chunk-BLPUKQJE.js";var Zn=c(yc=>{"use strict";var hu=class extends Error{constructor(r,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=r,this.nestedError=void 0}},mc=class extends hu{constructor(r){super(1,"commander.invalidArgument",r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};yc.CommanderError=hu;yc.InvalidArgumentError=mc});var du=c(_c=>{"use strict";var{InvalidArgumentError:I4}=Zn(),Ec=class{constructor(r,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,r[0]){case"<":this.required=!0,this._name=r.slice(1,-1);break;case"[":this.required=!1,this._name=r.slice(1,-1);break;default:this.required=!0,this._name=r;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(r,t){return t===this.defaultValue||!Array.isArray(t)?[r]:t.concat(r)}default(r,t){return this.defaultValue=r,this.defaultValueDescription=t,this}argParser(r){return this.parseArg=r,this}choices(r){return this.argChoices=r.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new I4(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function R4(e){let r=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+r+">":"["+r+"]"}_c.Argument=Ec;_c.humanReadableArgName=R4});var Fc=c(Ap=>{"use strict";var{humanReadableArgName:k4}=du(),gc=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(r){let t=r.commands.filter(i=>!i._hidden),n=r._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((i,u)=>i.name().localeCompare(u.name())),t}compareOptions(r,t){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(r).localeCompare(n(t))}visibleOptions(r){let t=r.options.filter(i=>!i.hidden),n=r._getHelpOption();if(n&&!n.hidden){let i=n.short&&r._findOption(n.short),u=n.long&&r._findOption(n.long);!i&&!u?t.push(n):n.long&&!u?t.push(r.createOption(n.long,n.description)):n.short&&!i&&t.push(r.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(r){if(!this.showGlobalOptions)return[];let t=[];for(let n=r.parent;n;n=n.parent){let i=n.options.filter(u=>!u.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(r){return r._argsDescription&&r.registeredArguments.forEach(t=>{t.description=t.description||r._argsDescription[t.name()]||""}),r.registeredArguments.find(t=>t.description)?r.registeredArguments:[]}subcommandTerm(r){let t=r.registeredArguments.map(n=>k4(n)).join(" ");return r._name+(r._aliases[0]?"|"+r._aliases[0]:"")+(r.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(r){return r.flags}argumentTerm(r){return r.name()}longestSubcommandTermLength(r,t){return t.visibleCommands(r).reduce((n,i)=>Math.max(n,t.subcommandTerm(i).length),0)}longestOptionTermLength(r,t){return t.visibleOptions(r).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestGlobalOptionTermLength(r,t){return t.visibleGlobalOptions(r).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestArgumentTermLength(r,t){return t.visibleArguments(r).reduce((n,i)=>Math.max(n,t.argumentTerm(i).length),0)}commandUsage(r){let t=r._name;r._aliases[0]&&(t=t+"|"+r._aliases[0]);let n="";for(let i=r.parent;i;i=i.parent)n=i.name()+" "+n;return n+t+" "+r.usage()}commandDescription(r){return r.description()}subcommandDescription(r){return r.summary()||r.description()}optionDescription(r){let t=[];return r.argChoices&&t.push(`choices: ${r.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),r.defaultValue!==void 0&&(r.required||r.optional||r.isBoolean()&&typeof r.defaultValue=="boolean")&&t.push(`default: ${r.defaultValueDescription||JSON.stringify(r.defaultValue)}`),r.presetArg!==void 0&&r.optional&&t.push(`preset: ${JSON.stringify(r.presetArg)}`),r.envVar!==void 0&&t.push(`env: ${r.envVar}`),t.length>0?`${r.description} (${t.join(", ")})`:r.description}argumentDescription(r){let t=[];if(r.argChoices&&t.push(`choices: ${r.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),r.defaultValue!==void 0&&t.push(`default: ${r.defaultValueDescription||JSON.stringify(r.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return r.description?`${r.description} ${n}`:n}return r.description}formatHelp(r,t){let n=t.padWidth(r,t),i=t.helpWidth||80,u=2,o=2;function a(D,b){if(b){let m=`${D.padEnd(n+o)}${b}`;return t.wrap(m,i-u,n+o)}return D}function s(D){return D.join(` `).replace(/^/gm," ".repeat(u))}let l=[`Usage: ${t.commandUsage(r)}`,""],h=t.commandDescription(r);h.length>0&&(l=l.concat([t.wrap(h,i,0),""]));let d=t.visibleArguments(r).map(D=>a(t.argumentTerm(D),t.argumentDescription(D)));d.length>0&&(l=l.concat(["Arguments:",s(d),""]));let p=t.visibleOptions(r).map(D=>a(t.optionTerm(D),t.optionDescription(D)));if(p.length>0&&(l=l.concat(["Options:",s(p),""])),this.showGlobalOptions){let D=t.visibleGlobalOptions(r).map(b=>a(t.optionTerm(b),t.optionDescription(b)));D.length>0&&(l=l.concat(["Global Options:",s(D),""]))}let v=t.visibleCommands(r).map(D=>a(t.subcommandTerm(D),t.subcommandDescription(D)));return v.length>0&&(l=l.concat(["Commands:",s(v),""])),l.join(` `)}padWidth(r,t){return Math.max(t.longestOptionTermLength(r,t),t.longestGlobalOptionTermLength(r,t),t.longestSubcommandTermLength(r,t),t.longestArgumentTermLength(r,t))}wrap(r,t,n,i=40){let u=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",o=new RegExp(`[\\n][${u}]+`);if(r.match(o))return r;let a=t-n;if(a<i)return r;let s=r.slice(0,n),l=r.slice(n).replace(`\r `,` `),h=" ".repeat(n),p="\\s\u200B",v=new RegExp(` |.{1,${a-1}}([${p}]|$)|[^${p}]+?([${p}]|$)`,"g"),D=l.match(v)||[];return s+D.map((b,m)=>b===` `?"":(m>0?h:"")+b.trimEnd()).join(` `)}};Ap.Help=gc});var Oc=c(Ac=>{"use strict";var{InvalidArgumentError:L4}=Zn(),Cc=class{constructor(r,t){this.flags=r,this.description=t||"",this.required=r.includes("<"),this.optional=r.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(r),this.mandatory=!1;let n=W4(r);this.short=n.shortFlag,this.long=n.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(r,t){return this.defaultValue=r,this.defaultValueDescription=t,this}preset(r){return this.presetArg=r,this}conflicts(r){return this.conflictsWith=this.conflictsWith.concat(r),this}implies(r){let t=r;return typeof r=="string"&&(t={[r]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(r){return this.envVar=r,this}argParser(r){return this.parseArg=r,this}makeOptionMandatory(r=!0){return this.mandatory=!!r,this}hideHelp(r=!0){return this.hidden=!!r,this}_concatValue(r,t){return t===this.defaultValue||!Array.isArray(t)?[r]:t.concat(r)}choices(r){return this.argChoices=r.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new L4(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return N4(this.name().replace(/^no-/,""))}is(r){return this.short===r||this.long===r}isBoolean(){return!this.required&&!this.optional&&!this.negate}},wc=class{constructor(r){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,r.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(r,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,u=i!==void 0?i:!1;return t.negate===(u===r)}};function N4(e){return e.split("-").reduce((r,t)=>r+t[0].toUpperCase()+t.slice(1))}function W4(e){let r,t,n=e.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(r=n.shift()),t=n.shift(),!r&&/^-[^-]$/.test(t)&&(r=t,t=void 0),{shortFlag:r,longFlag:t}}Ac.Option=Cc;Ac.DualOptions=wc});var Sp=c(Op=>{"use strict";function U4(e,r){if(Math.abs(e.length-r.length)>3)return Math.max(e.length,r.length);let t=[];for(let n=0;n<=e.length;n++)t[n]=[n];for(let n=0;n<=r.length;n++)t[0][n]=n;for(let n=1;n<=r.length;n++)for(let i=1;i<=e.length;i++){let u=1;e[i-1]===r[n-1]?u=0:u=1,t[i][n]=Math.min(t[i-1][n]+1,t[i][n-1]+1,t[i-1][n-1]+u),i>1&&n>1&&e[i-1]===r[n-2]&&e[i-2]===r[n-1]&&(t[i][n]=Math.min(t[i][n],t[i-2][n-2]+1))}return t[e.length][r.length]}function V4(e,r){if(!r||r.length===0)return"";r=Array.from(new Set(r));let t=e.startsWith("--");t&&(e=e.slice(2),r=r.map(o=>o.slice(2)));let n=[],i=3,u=.4;return r.forEach(o=>{if(o.length<=1)return;let a=U4(e,o),s=Math.max(e.length,o.length);(s-a)/s>u&&(a<i?(i=a,n=[o]):a===i&&n.push(o))}),n.sort((o,a)=>o.localeCompare(a)),t&&(n=n.map(o=>`--${o}`)),n.length>1?` (Did you mean one of ${n.join(", ")}?)`:n.length===1?` (Did you mean ${n[0]}?)`:""}Op.suggestSimilar=V4});var jp=c(Tp=>{"use strict";var $4=F("node:events").EventEmitter,Sc=F("node:child_process"),ze=F("node:path"),qc=F("node:fs"),W=F("node:process"),{Argument:H4,humanReadableArgName:G4}=du(),{CommanderError:Bc}=Zn(),{Help:K4}=Fc(),{Option:qp,DualOptions:z4}=Oc(),{suggestSimilar:Bp}=Sp(),Pc=class e extends $4{constructor(r){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=r||"",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=>W.stdout.write(t),writeErr:t=>W.stderr.write(t),getOutHelpWidth:()=>W.stdout.isTTY?W.stdout.columns:void 0,getErrHelpWidth:()=>W.stderr.isTTY?W.stderr.columns:void 0,outputError:(t,n)=>n(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(r){return this._outputConfiguration=r._outputConfiguration,this._helpOption=r._helpOption,this._helpCommand=r._helpCommand,this._helpConfiguration=r._helpConfiguration,this._exitCallback=r._exitCallback,this._storeOptionsAsProperties=r._storeOptionsAsProperties,this._combineFlagAndOptionalValue=r._combineFlagAndOptionalValue,this._allowExcessArguments=r._allowExcessArguments,this._enablePositionalOptions=r._enablePositionalOptions,this._showHelpAfterError=r._showHelpAfterError,this._showSuggestionAfterError=r._showSuggestionAfterError,this}_getCommandAndAncestors(){let r=[];for(let t=this;t;t=t.parent)r.push(t);return r}command(r,t,n){let i=t,u=n;typeof i=="object"&&i!==null&&(u=i,i=null),u=u||{};let[,o,a]=r.match(/([^ ]+) *(.*)/),s=this.createCommand(o);return i&&(s.description(i),s._executableHandler=!0),u.isDefault&&(this._defaultCommandName=s._name),s._hidden=!!(u.noHelp||u.hidden),s._executableFile=u.executableFile||null,a&&s.arguments(a),this._registerCommand(s),s.parent=this,s.copyInheritedSettings(this),i?this:s}createCommand(r){return new e(r)}createHelp(){return Object.assign(new K4,this.configureHelp())}configureHelp(r){return r===void 0?this._helpConfiguration:(this._helpConfiguration=r,this)}configureOutput(r){return r===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,r),this)}showHelpAfterError(r=!0){return typeof r!="string"&&(r=!!r),this._showHelpAfterError=r,this}showSuggestionAfterError(r=!0){return this._showSuggestionAfterError=!!r,this}addCommand(r,t){if(!r._name)throw new Error(`Command passed to .addCommand() must have a name - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=r._name),(t.noHelp||t.hidden)&&(r._hidden=!0),this._registerCommand(r),r.parent=this,r._checkForBrokenPassThrough(),this}createArgument(r,t){return new H4(r,t)}argument(r,t,n,i){let u=this.createArgument(r,t);return typeof n=="function"?u.default(i).argParser(n):u.default(n),this.addArgument(u),this}arguments(r){return r.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(r){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(r.required&&r.defaultValue!==void 0&&r.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${r.name()}'`);return this.registeredArguments.push(r),this}helpCommand(r,t){if(typeof r=="boolean")return this._addImplicitHelpCommand=r,this;r=r??"help [command]";let[,n,i]=r.match(/([^ ]+) *(.*)/),u=t??"display help for command",o=this.createCommand(n);return o.helpOption(!1),i&&o.arguments(i),u&&o.description(u),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(r,t){return typeof r!="object"?(this.helpCommand(r,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=r,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(r,t){let n=["preSubcommand","preAction","postAction"];if(!n.includes(r))throw new Error(`Unexpected value for event passed to hook : '${r}'. Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[r]?this._lifeCycleHooks[r].push(t):this._lifeCycleHooks[r]=[t],this}exitOverride(r){return r?this._exitCallback=r:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(r,t,n){this._exitCallback&&this._exitCallback(new Bc(r,t,n)),W.exit(r)}action(r){let t=n=>{let i=this.registeredArguments.length,u=n.slice(0,i);return this._storeOptionsAsProperties?u[i]=this:u[i]=this.opts(),u.push(this),r.apply(this,u)};return this._actionHandler=t,this}createOption(r,t){return new qp(r,t)}_callParseArg(r,t,n,i){try{return r.parseArg(t,n)}catch(u){if(u.code==="commander.invalidArgument"){let o=`${i} ${u.message}`;this.error(o,{exitCode:u.exitCode,code:u.code})}throw u}}_registerOption(r){let t=r.short&&this._findOption(r.short)||r.long&&this._findOption(r.long);if(t){let n=r.long&&this._findOption(r.long)?r.long:r.short;throw new Error(`Cannot add option '${r.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}' - already used by option '${t.flags}'`)}this.options.push(r)}_registerCommand(r){let t=i=>[i.name()].concat(i.aliases()),n=t(r).find(i=>this._findCommand(i));if(n){let i=t(this._findCommand(n)).join("|"),u=t(r).join("|");throw new Error(`cannot add command '${u}' as already have command '${i}'`)}this.commands.push(r)}addOption(r){this._registerOption(r);let t=r.name(),n=r.attributeName();if(r.negate){let u=r.long.replace(/^--no-/,"--");this._findOption(u)||this.setOptionValueWithSource(n,r.defaultValue===void 0?!0:r.defaultValue,"default")}else r.defaultValue!==void 0&&this.setOptionValueWithSource(n,r.defaultValue,"default");let i=(u,o,a)=>{u==null&&r.presetArg!==void 0&&(u=r.presetArg);let s=this.getOptionValue(n);u!==null&&r.parseArg?u=this._callParseArg(r,u,s,o):u!==null&&r.variadic&&(u=r._concatValue(u,s)),u==null&&(r.negate?u=!1:r.isBoolean()||r.optional?u=!0:u=""),this.setOptionValueWithSource(n,u,a)};return this.on("option:"+t,u=>{let o=`error: option '${r.flags}' argument '${u}' is invalid.`;i(u,o,"cli")}),r.envVar&&this.on("optionEnv:"+t,u=>{let o=`error: option '${r.flags}' value '${u}' from env '${r.envVar}' is invalid.`;i(u,o,"env")}),this}_optionEx(r,t,n,i,u){if(typeof t=="object"&&t instanceof qp)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,n);if(o.makeOptionMandatory(!!r.mandatory),typeof i=="function")o.default(u).argParser(i);else if(i instanceof RegExp){let a=i;i=(s,l)=>{let h=a.exec(s);return h?h[0]:l},o.default(u).argParser(i)}else o.default(i);return this.addOption(o)}option(r,t,n,i){return this._optionEx({},r,t,n,i)}requiredOption(r,t,n,i){return this._optionEx({mandatory:!0},r,t,n,i)}combineFlagAndOptionalValue(r=!0){return this._combineFlagAndOptionalValue=!!r,this}allowUnknownOption(r=!0){return this._allowUnknownOption=!!r,this}allowExcessArguments(r=!0){return this._allowExcessArguments=!!r,this}enablePositionalOptions(r=!0){return this._enablePositionalOptions=!!r,this}passThroughOptions(r=!0){return this._passThroughOptions=!!r,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(r=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!r,this}getOptionValue(r){return this._storeOptionsAsProperties?this[r]:this._optionValues[r]}setOptionValue(r,t){return this.setOptionValueWithSource(r,t,void 0)}setOptionValueWithSource(r,t,n){return this._storeOptionsAsProperties?this[r]=t:this._optionValues[r]=t,this._optionValueSources[r]=n,this}getOptionValueSource(r){return this._optionValueSources[r]}getOptionValueSourceWithGlobals(r){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(r)!==void 0&&(t=n.getOptionValueSource(r))}),t}_prepareUserArgs(r,t){if(r!==void 0&&!Array.isArray(r))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},r===void 0&&t.from===void 0){W.versions?.electron&&(t.from="electron");let i=W.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(t.from="eval")}r===void 0&&(r=W.argv),this.rawArgs=r.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=r[1],n=r.slice(2);break;case"electron":W.defaultApp?(this._scriptPath=r[1],n=r.slice(2)):n=r.slice(1);break;case"user":n=r.slice(0);break;case"eval":n=r.slice(1);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",n}parse(r,t){let n=this._prepareUserArgs(r,t);return this._parseCommand([],n),this}async parseAsync(r,t){let n=this._prepareUserArgs(r,t);return await this._parseCommand([],n),this}_executeSubCommand(r,t){t=t.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function u(h,d){let p=ze.resolve(h,d);if(qc.existsSync(p))return p;if(i.includes(ze.extname(d)))return;let v=i.find(D=>qc.existsSync(`${p}${D}`));if(v)return`${p}${v}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=r._executableFile||`${this._name}-${r._name}`,a=this._executableDir||"";if(this._scriptPath){let h;try{h=qc.realpathSync(this._scriptPath)}catch{h=this._scriptPath}a=ze.resolve(ze.dirname(h),a)}if(a){let h=u(a,o);if(!h&&!r._executableFile&&this._scriptPath){let d=ze.basename(this._scriptPath,ze.extname(this._scriptPath));d!==this._name&&(h=u(a,`${d}-${r._name}`))}o=h||o}n=i.includes(ze.extname(o));let s;W.platform!=="win32"?n?(t.unshift(o),t=Pp(W.execArgv).concat(t),s=Sc.spawn(W.argv[0],t,{stdio:"inherit"})):s=Sc.spawn(o,t,{stdio:"inherit"}):(t.unshift(o),t=Pp(W.execArgv).concat(t),s=Sc.spawn(W.execPath,t,{stdio:"inherit"})),s.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{W.on(d,()=>{s.killed===!1&&s.exitCode===null&&s.kill(d)})});let l=this._exitCallback;s.on("close",h=>{h=h??1,l?l(new Bc(h,"commander.executeSubCommandAsync","(close)")):W.exit(h)}),s.on("error",h=>{if(h.code==="ENOENT"){let d=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",p=`'${o}' does not exist - if '${r._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 - ${d}`;throw new Error(p)}else if(h.code==="EACCES")throw new Error(`'${o}' not executable`);if(!l)W.exit(1);else{let d=new Bc(1,"commander.executeSubCommandAsync","(error)");d.nestedError=h,l(d)}}),this.runningCommand=s}_dispatchSubcommand(r,t,n){let i=this._findCommand(r);i||this.help({error:!0});let u;return u=this._chainOrCallSubCommandHook(u,i,"preSubcommand"),u=this._chainOrCall(u,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(n));else return i._parseCommand(t,n)}),u}_dispatchHelpCommand(r){r||this.help();let t=this._findCommand(r);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(r,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((r,t)=>{r.required&&this.args[t]==null&&this.missingArgument(r.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let r=(n,i,u)=>{let o=i;if(i!==null&&n.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,i,u,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,i)=>{let u=n.defaultValue;n.variadic?i<this.args.length?(u=this.args.slice(i),n.parseArg&&(u=u.reduce((o,a)=>r(n,a,o),n.defaultValue))):u===void 0&&(u=[]):i<this.args.length&&(u=this.args[i],n.parseArg&&(u=r(n,u,n.defaultValue))),t[i]=u}),this.processedArgs=t}_chainOrCall(r,t){return r&&r.then&&typeof r.then=="function"?r.then(()=>t()):t()}_chainOrCallHooks(r,t){let n=r,i=[];return this._getCommandAndAncestors().reverse().filter(u=>u._lifeCycleHooks[t]!==void 0).forEach(u=>{u._lifeCycleHooks[t].forEach(o=>{i.push({hookedCommand:u,callback:o})})}),t==="postAction"&&i.reverse(),i.forEach(u=>{n=this._chainOrCall(n,()=>u.callback(u.hookedCommand,this))}),n}_chainOrCallSubCommandHook(r,t,n){let i=r;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(u=>{i=this._chainOrCall(i,()=>u(this,t))}),i}_parseCommand(r,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),r=r.concat(n.operands),t=n.unknown,this.args=r.concat(t),r&&this._findCommand(r[0]))return this._dispatchSubcommand(r[0],r.slice(1),t);if(this._getHelpCommand()&&r[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(r[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,r,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},u=`command:${this.name()}`;if(this._actionHandler){i(),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(u,r,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(u))i(),this._processArguments(),this.parent.emit(u,r,t);else if(r.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",r,t);this.listenerCount("command:*")?this.emit("command:*",r,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(r){if(r)return this.commands.find(t=>t._name===r||t._aliases.includes(r))}_findOption(r){return this.options.find(t=>t.is(r))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(r=>{r.options.forEach(t=>{t.mandatory&&r.getOptionValue(t.attributeName())===void 0&&r.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let r=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});r.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=r.find(u=>n.conflictsWith.includes(u.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(r=>{r._checkForConflictingLocalOptions()})}parseOptions(r){let t=[],n=[],i=t,u=r.slice();function o(s){return s.length>1&&s[0]==="-"}let a=null;for(;u.length;){let s=u.shift();if(s==="--"){i===n&&i.push(s),i.push(...u);break}if(a&&!o(s)){this.emit(`option:${a.name()}`,s);continue}if(a=null,o(s)){let l=this._findOption(s);if(l){if(l.required){let h=u.shift();h===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,h)}else if(l.optional){let h=null;u.length>0&&!o(u[0])&&(h=u.shift()),this.emit(`option:${l.name()}`,h)}else this.emit(`option:${l.name()}`);a=l.variadic?l:null;continue}}if(s.length>2&&s[0]==="-"&&s[1]!=="-"){let l=this._findOption(`-${s[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,s.slice(2)):(this.emit(`option:${l.name()}`),u.unshift(`-${s.slice(2)}`));continue}}if(/^--[^=]+=/.test(s)){let l=s.indexOf("="),h=this._findOption(s.slice(0,l));if(h&&(h.required||h.optional)){this.emit(`option:${h.name()}`,s.slice(l+1));continue}}if(o(s)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(s)){t.push(s),u.length>0&&n.push(...u);break}else if(this._getHelpCommand()&&s===this._getHelpCommand().name()){t.push(s),u.length>0&&t.push(...u);break}else if(this._defaultCommandName){n.push(s),u.length>0&&n.push(...u);break}}if(this._passThroughOptions){i.push(s),u.length>0&&i.push(...u);break}i.push(s)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let r={},t=this.options.length;for(let n=0;n<t;n++){let i=this.options[n].attributeName();r[i]=i===this._versionOptionName?this._version:this[i]}return r}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((r,t)=>Object.assign(r,t.opts()),{})}error(r,t){this._outputConfiguration.outputError(`${r} `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError} `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(` `),this.outputHelp({error:!0}));let n=t||{},i=n.exitCode||1,u=n.code||"commander.error";this._exit(i,u,r)}_parseOptionsEnv(){this.options.forEach(r=>{if(r.envVar&&r.envVar in W.env){let t=r.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(r.required||r.optional?this.emit(`optionEnv:${r.name()}`,W.env[r.envVar]):this.emit(`optionEnv:${r.name()}`))}})}_parseOptionsImplied(){let r=new z4(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&r.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(r){let t=`error: missing required argument '${r}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(r){let t=`error: option '${r.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(r){let t=`error: required option '${r.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(r,t){let n=o=>{let a=o.attributeName(),s=this.getOptionValue(a),l=this.options.find(d=>d.negate&&a===d.attributeName()),h=this.options.find(d=>!d.negate&&a===d.attributeName());return l&&(l.presetArg===void 0&&s===!1||l.presetArg!==void 0&&s===l.presetArg)?l:h||o},i=o=>{let a=n(o),s=a.attributeName();return this.getOptionValueSource(s)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},u=`error: ${i(r)} cannot be used with ${i(t)}`;this.error(u,{code:"commander.conflictingOption"})}unknownOption(r){if(this._allowUnknownOption)return;let t="";if(r.startsWith("--")&&this._showSuggestionAfterError){let i=[],u=this;do{let o=u.createHelp().visibleOptions(u).filter(a=>a.long).map(a=>a.long);i=i.concat(o),u=u.parent}while(u&&!u._enablePositionalOptions);t=Bp(r,i)}let n=`error: unknown option '${r}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(r){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",u=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${r.length}.`;this.error(u,{code:"commander.excessArguments"})}unknownCommand(){let r=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(u=>{i.push(u.name()),u.alias()&&i.push(u.alias())}),t=Bp(r,i)}let n=`error: unknown command '${r}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(r,t,n){if(r===void 0)return this._version;this._version=r,t=t||"-V, --version",n=n||"output the version number";let i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${r} `),this._exit(0,"commander.version",r)}),this}description(r,t){return r===void 0&&t===void 0?this._description:(this._description=r,t&&(this._argsDescription=t),this)}summary(r){return r===void 0?this._summary:(this._summary=r,this)}alias(r){if(r===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]),r===t._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(r);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${r}' to command '${this.name()}' as already have command '${i}'`)}return t._aliases.push(r),this}aliases(r){return r===void 0?this._aliases:(r.forEach(t=>this.alias(t)),this)}usage(r){if(r===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(n=>G4(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=r,this}name(r){return r===void 0?this._name:(this._name=r,this)}nameFromFilename(r){return this._name=ze.basename(r,ze.extname(r)),this}executableDir(r){return r===void 0?this._executableDir:(this._executableDir=r,this)}helpInformation(r){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=r&&r.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(r){r=r||{};let t={error:!!r.error},n;return t.error?n=i=>this._outputConfiguration.writeErr(i):n=i=>this._outputConfiguration.writeOut(i),t.write=r.write||n,t.command=this,t}outputHelp(r){let t;typeof r=="function"&&(t=r,r=void 0);let n=this._getHelpContext(r);this._getCommandAndAncestors().reverse().forEach(u=>u.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation(n);if(t&&(i=t(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(u=>u.emit("afterAllHelp",n))}helpOption(r,t){return typeof r=="boolean"?(r?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(r=r??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(r,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(r){return this._helpOption=r,this}help(r){this.outputHelp(r);let t=W.exitCode||0;t===0&&r&&typeof r!="function"&&r.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(r,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(r))throw new Error(`Unexpected value for position to addHelpText. Expecting one of '${n.join("', '")}'`);let i=`${r}Help`;return this.on(i,u=>{let o;typeof t=="function"?o=t({error:u.error,command:u.command}):o=t,o&&u.write(`${o} `)}),this}_outputHelpIfRequested(r){let t=this._getHelpOption();t&&r.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Pp(e){return e.map(r=>{if(!r.startsWith("--inspect"))return r;let t,n="127.0.0.1",i="9229",u;return(u=r.match(/^(--inspect(-brk)?)$/))!==null?t=u[1]:(u=r.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=u[1],/^\d+$/.test(u[3])?i=u[3]:n=u[3]):(u=r.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=u[1],n=u[3],i=u[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:r})}Tp.Command=Pc});var kp=c(fe=>{"use strict";var{Argument:Mp}=du(),{Command:Tc}=jp(),{CommanderError:Y4,InvalidArgumentError:Ip}=Zn(),{Help:Q4}=Fc(),{Option:Rp}=Oc();fe.program=new Tc;fe.createCommand=e=>new Tc(e);fe.createOption=(e,r)=>new Rp(e,r);fe.createArgument=(e,r)=>new Mp(e,r);fe.Command=Tc;fe.Option=Rp;fe.Argument=Mp;fe.Help=Q4;fe.CommanderError=Y4;fe.InvalidArgumentError=Ip;fe.InvalidOptionArgumentError=Ip});var Wp=c((Xie,Np)=>{"use strict";Np.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]}});var jc=c((Zie,Vp)=>{"use strict";var ri=Wp(),Up={};for(let e of Object.keys(ri))Up[ri[e]]=e;var _={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"]}};Vp.exports=_;for(let e of Object.keys(_)){if(!("channels"in _[e]))throw new Error("missing channels property: "+e);if(!("labels"in _[e]))throw new Error("missing channel labels property: "+e);if(_[e].labels.length!==_[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:r,labels:t}=_[e];delete _[e].channels,delete _[e].labels,Object.defineProperty(_[e],"channels",{value:r}),Object.defineProperty(_[e],"labels",{value:t})}_.rgb.hsl=function(e){let r=e[0]/255,t=e[1]/255,n=e[2]/255,i=Math.min(r,t,n),u=Math.max(r,t,n),o=u-i,a,s;u===i?a=0:r===u?a=(t-n)/o:t===u?a=2+(n-r)/o:n===u&&(a=4+(r-t)/o),a=Math.min(a*60,360),a<0&&(a+=360);let l=(i+u)/2;return u===i?s=0:l<=.5?s=o/(u+i):s=o/(2-u-i),[a,s*100,l*100]};_.rgb.hsv=function(e){let r,t,n,i,u,o=e[0]/255,a=e[1]/255,s=e[2]/255,l=Math.max(o,a,s),h=l-Math.min(o,a,s),d=function(p){return(l-p)/6/h+1/2};return h===0?(i=0,u=0):(u=h/l,r=d(o),t=d(a),n=d(s),o===l?i=n-t:a===l?i=1/3+r-n:s===l&&(i=2/3+t-r),i<0?i+=1:i>1&&(i-=1)),[i*360,u*100,l*100]};_.rgb.hwb=function(e){let r=e[0],t=e[1],n=e[2],i=_.rgb.hsl(e)[0],u=1/255*Math.min(r,Math.min(t,n));return n=1-1/255*Math.max(r,Math.max(t,n)),[i,u*100,n*100]};_.rgb.cmyk=function(e){let r=e[0]/255,t=e[1]/255,n=e[2]/255,i=Math.min(1-r,1-t,1-n),u=(1-r-i)/(1-i)||0,o=(1-t-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[u*100,o*100,a*100,i*100]};function J4(e,r){return(e[0]-r[0])**2+(e[1]-r[1])**2+(e[2]-r[2])**2}_.rgb.keyword=function(e){let r=Up[e];if(r)return r;let t=1/0,n;for(let i of Object.keys(ri)){let u=ri[i],o=J4(e,u);o<t&&(t=o,n=i)}return n};_.keyword.rgb=function(e){return ri[e]};_.rgb.xyz=function(e){let r=e[0]/255,t=e[1]/255,n=e[2]/255;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let i=r*.4124+t*.3576+n*.1805,u=r*.2126+t*.7152+n*.0722,o=r*.0193+t*.1192+n*.9505;return[i*100,u*100,o*100]};_.rgb.lab=function(e){let r=_.rgb.xyz(e),t=r[0],n=r[1],i=r[2];t/=95.047,n/=100,i/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let u=116*n-16,o=500*(t-n),a=200*(n-i);return[u,o,a]};_.hsl.rgb=function(e){let r=e[0]/360,t=e[1]/100,n=e[2]/100,i,u,o;if(t===0)return o=n*255,[o,o,o];n<.5?i=n*(1+t):i=n+t-n*t;let a=2*n-i,s=[0,0,0];for(let l=0;l<3;l++)u=r+1/3*-(l-1),u<0&&u++,u>1&&u--,6*u<1?o=a+(i-a)*6*u:2*u<1?o=i:3*u<2?o=a+(i-a)*(2/3-u)*6:o=a,s[l]=o*255;return s};_.hsl.hsv=function(e){let r=e[0],t=e[1]/100,n=e[2]/100,i=t,u=Math.max(n,.01);n*=2,t*=n<=1?n:2-n,i*=u<=1?u:2-u;let o=(n+t)/2,a=n===0?2*i/(u+i):2*t/(n+t);return[r,a*100,o*100]};_.hsv.rgb=function(e){let r=e[0]/60,t=e[1]/100,n=e[2]/100,i=Math.floor(r)%6,u=r-Math.floor(r),o=255*n*(1-t),a=255*n*(1-t*u),s=255*n*(1-t*(1-u));switch(n*=255,i){case 0:return[n,s,o];case 1:return[a,n,o];case 2:return[o,n,s];case 3:return[o,a,n];case 4:return[s,o,n];case 5:return[n,o,a]}};_.hsv.hsl=function(e){let r=e[0],t=e[1]/100,n=e[2]/100,i=Math.max(n,.01),u,o;o=(2-t)*n;let a=(2-t)*i;return u=t*i,u/=a<=1?a:2-a,u=u||0,o/=2,[r,u*100,o*100]};_.hwb.rgb=function(e){let r=e[0]/360,t=e[1]/100,n=e[2]/100,i=t+n,u;i>1&&(t/=i,n/=i);let o=Math.floor(6*r),a=1-n;u=6*r-o,o&1&&(u=1-u);let s=t+u*(a-t),l,h,d;switch(o){default:case 6:case 0:l=a,h=s,d=t;break;case 1:l=s,h=a,d=t;break;case 2:l=t,h=a,d=s;break;case 3:l=t,h=s,d=a;break;case 4:l=s,h=t,d=a;break;case 5:l=a,h=t,d=s;break}return[l*255,h*255,d*255]};_.cmyk.rgb=function(e){let r=e[0]/100,t=e[1]/100,n=e[2]/100,i=e[3]/100,u=1-Math.min(1,r*(1-i)+i),o=1-Math.min(1,t*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[u*255,o*255,a*255]};_.xyz.rgb=function(e){let r=e[0]/100,t=e[1]/100,n=e[2]/100,i,u,o;return i=r*3.2406+t*-1.5372+n*-.4986,u=r*-.9689+t*1.8758+n*.0415,o=r*.0557+t*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),u=Math.min(Math.max(0,u),1),o=Math.min(Math.max(0,o),1),[i*255,u*255,o*255]};_.xyz.lab=function(e){let r=e[0],t=e[1],n=e[2];r/=95.047,t/=100,n/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let i=116*t-16,u=500*(r-t),o=200*(t-n);return[i,u,o]};_.lab.xyz=function(e){let r=e[0],t=e[1],n=e[2],i,u,o;u=(r+16)/116,i=t/500+u,o=u-n/200;let a=u**3,s=i**3,l=o**3;return u=a>.008856?a:(u-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,o=l>.008856?l:(o-16/116)/7.787,i*=95.047,u*=100,o*=108.883,[i,u,o]};_.lab.lch=function(e){let r=e[0],t=e[1],n=e[2],i;i=Math.atan2(n,t)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(t*t+n*n);return[r,o,i]};_.lch.lab=function(e){let r=e[0],t=e[1],i=e[2]/360*2*Math.PI,u=t*Math.cos(i),o=t*Math.sin(i);return[r,u,o]};_.rgb.ansi16=function(e,r=null){let[t,n,i]=e,u=r===null?_.rgb.hsv(e)[2]:r;if(u=Math.round(u/50),u===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return u===2&&(o+=60),o};_.hsv.ansi16=function(e){return _.rgb.ansi16(_.hsv.rgb(e),e[2])};_.rgb.ansi256=function(e){let r=e[0],t=e[1],n=e[2];return r===t&&t===n?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)};_.ansi16.rgb=function(e){let r=e%10;if(r===0||r===7)return e>50&&(r+=3.5),r=r/10.5*255,[r,r,r];let t=(~~(e>50)+1)*.5,n=(r&1)*t*255,i=(r>>1&1)*t*255,u=(r>>2&1)*t*255;return[n,i,u]};_.ansi256.rgb=function(e){if(e>=232){let u=(e-232)*10+8;return[u,u,u]}e-=16;let r,t=Math.floor(e/36)/5*255,n=Math.floor((r=e%36)/6)/5*255,i=r%6/5*255;return[t,n,i]};_.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t};_.hex.rgb=function(e){let r=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r)return[0,0,0];let t=r[0];r[0].length===3&&(t=t.split("").map(a=>a+a).join(""));let n=parseInt(t,16),i=n>>16&255,u=n>>8&255,o=n&255;return[i,u,o]};_.rgb.hcg=function(e){let r=e[0]/255,t=e[1]/255,n=e[2]/255,i=Math.max(Math.max(r,t),n),u=Math.min(Math.min(r,t),n),o=i-u,a,s;return o<1?a=u/(1-o):a=0,o<=0?s=0:i===r?s=(t-n)/o%6:i===t?s=2+(n-r)/o:s=4+(r-t)/o,s/=6,s%=1,[s*360,o*100,a*100]};_.hsl.hcg=function(e){let r=e[1]/100,t=e[2]/100,n=t<.5?2*r*t:2*r*(1-t),i=0;return n<1&&(i=(t-.5*n)/(1-n)),[e[0],n*100,i*100]};_.hsv.hcg=function(e){let r=e[1]/100,t=e[2]/100,n=r*t,i=0;return n<1&&(i=(t-n)/(1-n)),[e[0],n*100,i*100]};_.hcg.rgb=function(e){let r=e[0]/360,t=e[1]/100,n=e[2]/100;if(t===0)return[n*255,n*255,n*255];let i=[0,0,0],u=r%1*6,o=u%1,a=1-o,s=0;switch(Math.floor(u)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return s=(1-t)*n,[(t*i[0]+s)*255,(t*i[1]+s)*255,(t*i[2]+s)*255]};_.hcg.hsv=function(e){let r=e[1]/100,t=e[2]/100,n=r+t*(1-r),i=0;return n>0&&(i=r/n),[e[0],i*100,n*100]};_.hcg.hsl=function(e){let r=e[1]/100,n=e[2]/100*(1-r)+.5*r,i=0;return n>0&&n<.5?i=r/(2*n):n>=.5&&n<1&&(i=r/(2*(1-n))),[e[0],i*100,n*100]};_.hcg.hwb=function(e){let r=e[1]/100,t=e[2]/100,n=r+t*(1-r);return[e[0],(n-r)*100,(1-n)*100]};_.hwb.hcg=function(e){let r=e[1]/100,n=1-e[2]/100,i=n-r,u=0;return i<1&&(u=(n-i)/(1-i)),[e[0],i*100,u*100]};_.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};_.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};_.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};_.gray.hsl=function(e){return[0,0,e[0]]};_.gray.hsv=_.gray.hsl;_.gray.hwb=function(e){return[0,100,e[0]]};_.gray.cmyk=function(e){return[0,0,0,e[0]]};_.gray.lab=function(e){return[e[0],0,0]};_.gray.hex=function(e){let r=Math.round(e[0]/100*255)&255,n=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".substring(n.length)+n};_.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var Hp=c((eue,$p)=>{"use strict";var xu=jc();function X4(){let e={},r=Object.keys(xu);for(let t=r.length,n=0;n<t;n++)e[r[n]]={distance:-1,parent:null};return e}function Z4(e){let r=X4(),t=[e];for(r[e].distance=0;t.length;){let n=t.pop(),i=Object.keys(xu[n]);for(let u=i.length,o=0;o<u;o++){let a=i[o],s=r[a];s.distance===-1&&(s.distance=r[n].distance+1,s.parent=n,t.unshift(a))}}return r}function e5(e,r){return function(t){return r(e(t))}}function r5(e,r){let t=[r[e].parent,e],n=xu[r[e].parent][e],i=r[e].parent;for(;r[i].parent;)t.unshift(r[i].parent),n=e5(xu[r[i].parent][i],n),i=r[i].parent;return n.conversion=t,n}$p.exports=function(e){let r=Z4(e),t={},n=Object.keys(r);for(let i=n.length,u=0;u<i;u++){let o=n[u];r[o].parent!==null&&(t[o]=r5(o,r))}return t}});var Kp=c((rue,Gp)=>{"use strict";var Mc=jc(),t5=Hp(),Et={},n5=Object.keys(Mc);function i5(e){let r=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(r.conversion=e.conversion),r}function u5(e){let r=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let i=e(t);if(typeof i=="object")for(let u=i.length,o=0;o<u;o++)i[o]=Math.round(i[o]);return i};return"conversion"in e&&(r.conversion=e.conversion),r}n5.forEach(e=>{Et[e]={},Object.defineProperty(Et[e],"channels",{value:Mc[e].channels}),Object.defineProperty(Et[e],"labels",{value:Mc[e].labels});let r=t5(e);Object.keys(r).forEach(n=>{let i=r[n];Et[e][n]=u5(i),Et[e][n].raw=i5(i)})});Gp.exports=Et});var Rc=c((tue,Xp)=>{"use strict";var zp=(e,r)=>(...t)=>`\x1B[${e(...t)+r}m`,Yp=(e,r)=>(...t)=>{let n=e(...t);return`\x1B[${38+r};5;${n}m`},Qp=(e,r)=>(...t)=>{let n=e(...t);return`\x1B[${38+r};2;${n[0]};${n[1]};${n[2]}m`},pu=e=>e,Jp=(e,r,t)=>[e,r,t],_t=(e,r,t)=>{Object.defineProperty(e,r,{get:()=>{let n=t();return Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},Ic,gt=(e,r,t,n)=>{Ic===void 0&&(Ic=Kp());let i=n?10:0,u={};for(let[o,a]of Object.entries(Ic)){let s=o==="ansi16"?"ansi":o;o===r?u[s]=e(t,i):typeof a=="object"&&(u[s]=e(a[r],i))}return u};function o5(){let e=new Map,r={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]}};r.color.gray=r.color.blackBright,r.bgColor.bgGray=r.bgColor.bgBlackBright,r.color.grey=r.color.blackBright,r.bgColor.bgGrey=r.bgColor.bgBlackBright;for(let[t,n]of Object.entries(r)){for(let[i,u]of Object.entries(n))r[i]={open:`\x1B[${u[0]}m`,close:`\x1B[${u[1]}m`},n[i]=r[i],e.set(u[0],u[1]);Object.defineProperty(r,t,{value:n,enumerable:!1})}return Object.defineProperty(r,"codes",{value:e,enumerable:!1}),r.color.close="\x1B[39m",r.bgColor.close="\x1B[49m",_t(r.color,"ansi",()=>gt(zp,"ansi16",pu,!1)),_t(r.color,"ansi256",()=>gt(Yp,"ansi256",pu,!1)),_t(r.color,"ansi16m",()=>gt(Qp,"rgb",Jp,!1)),_t(r.bgColor,"ansi",()=>gt(zp,"ansi16",pu,!0)),_t(r.bgColor,"ansi256",()=>gt(Yp,"ansi256",pu,!0)),_t(r.bgColor,"ansi16m",()=>gt(Qp,"rgb",Jp,!0)),r}Object.defineProperty(Xp,"exports",{enumerable:!0,get:o5})});var e2=c((nue,Zp)=>{"use strict";Zp.exports=(e,r=process.ar