create-vitnode-app 0.0.7-canary.40 → 0.0.7-canary.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,34 +1,41 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var Pe=Object.create;var ne=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var De=Object.getOwnPropertyNames;var Fe=Object.getPrototypeOf,Ie=Object.prototype.hasOwnProperty;var x=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Te=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of De(e))!Ie.call(o,n)&&n!==t&&ne(o,n,{get:()=>e[n],enumerable:!(i=je(e,n))||i.enumerable});return o};var v=(o,e,t)=>(t=o!=null?Pe(Fe(o)):{},Te(e||!o||!o.__esModule?ne(t,"default",{value:o,enumerable:!0}):t,o));var V=x(W=>{"use strict";var P=class extends Error{constructor(e,t,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},T=class extends P{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};W.CommanderError=P;W.InvalidArgumentError=T});var j=x(q=>{"use strict";var{InvalidArgumentError:We}=V(),M=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new We(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Me(o){let e=o.name()+(o.variadic===!0?"...":"");return o.required?"<"+e+">":"["+e+"]"}q.Argument=M;q.humanReadableArgName=Me});var J=x(se=>{"use strict";var{humanReadableArgName:qe}=j(),R=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let t=e.commands.filter(n=>!n._hidden),i=e._getHelpCommand();return i&&!i._hidden&&t.push(i),this.sortSubcommands&&t.sort((n,s)=>n.name().localeCompare(s.name())),t}compareOptions(e,t){let i=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return i(e).localeCompare(i(t))}visibleOptions(e){let t=e.options.filter(n=>!n.hidden),i=e._getHelpOption();if(i&&!i.hidden){let n=i.short&&e._findOption(i.short),s=i.long&&e._findOption(i.long);!n&&!s?t.push(i):i.long&&!s?t.push(e.createOption(i.long,i.description)):i.short&&!n&&t.push(e.createOption(i.short,i.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let i=e.parent;i;i=i.parent){let n=i.options.filter(s=>!s.hidden);t.push(...n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(i=>qe(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((i,n)=>Math.max(i,t.subcommandTerm(n).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((i,n)=>Math.max(i,t.optionTerm(n).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((i,n)=>Math.max(i,t.optionTerm(n).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((i,n)=>Math.max(i,t.argumentTerm(n).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let i="";for(let n=e.parent;n;n=n.parent)i=n.name()+" "+i;return i+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let i=`(${t.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatHelp(e,t){let i=t.padWidth(e,t),n=t.helpWidth||80,s=2,r=2;function l(d,w){if(w){let I=`${d.padEnd(i+r)}${w}`;return t.wrap(I,n-s,i+r)}return d}function a(d){return d.join(`
3
- `).replace(/^/gm," ".repeat(s))}let c=[`Usage: ${t.commandUsage(e)}`,""],u=t.commandDescription(e);u.length>0&&(c=c.concat([t.wrap(u,n,0),""]));let h=t.visibleArguments(e).map(d=>l(t.argumentTerm(d),t.argumentDescription(d)));h.length>0&&(c=c.concat(["Arguments:",a(h),""]));let f=t.visibleOptions(e).map(d=>l(t.optionTerm(d),t.optionDescription(d)));if(f.length>0&&(c=c.concat(["Options:",a(f),""])),this.showGlobalOptions){let d=t.visibleGlobalOptions(e).map(w=>l(t.optionTerm(w),t.optionDescription(w)));d.length>0&&(c=c.concat(["Global Options:",a(d),""]))}let A=t.visibleCommands(e).map(d=>l(t.subcommandTerm(d),t.subcommandDescription(d)));return A.length>0&&(c=c.concat(["Commands:",a(A),""])),c.join(`
4
- `)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,i,n=40){let s=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",r=new RegExp(`[\\n][${s}]+`);if(e.match(r))return e;let l=t-i;if(l<n)return e;let a=e.slice(0,i),c=e.slice(i).replace(`\r
2
+ "use strict";var _i=Object.create;var dt=Object.defineProperty;var Ai=Object.getOwnPropertyDescriptor;var Bi=Object.getOwnPropertyNames;var vi=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty;var f=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var xi=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Bi(t))!bi.call(e,r)&&r!==n&&dt(e,r,{get:()=>t[r],enumerable:!(i=Ai(t,r))||i.enumerable});return e};var F=(e,t,n)=>(n=e!=null?_i(vi(e)):{},xi(t||!e||!e.__esModule?dt(n,"default",{value:e,enumerable:!0}):n,e));var X=f(be=>{"use strict";var oe=class extends Error{constructor(t,n,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=t,this.nestedError=void 0}},ve=class extends oe{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};be.CommanderError=oe;be.InvalidArgumentError=ve});var ae=f(ye=>{"use strict";var{InvalidArgumentError:yi}=X(),xe=class{constructor(t,n){switch(this.description=n||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,n){return n===this.defaultValue||!Array.isArray(n)?[t]:n.concat(t)}default(t,n){return this.defaultValue=t,this.defaultValueDescription=n,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(n,i)=>{if(!this.argChoices.includes(n))throw new yi(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(n,i):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Oi(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}ye.Argument=xe;ye.humanReadableArgName=Oi});var we=f(gt=>{"use strict";var{humanReadableArgName:wi}=ae(),Oe=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(t){let n=t.commands.filter(r=>!r._hidden),i=t._getHelpCommand();return i&&!i._hidden&&n.push(i),this.sortSubcommands&&n.sort((r,u)=>r.name().localeCompare(u.name())),n}compareOptions(t,n){let i=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return i(t).localeCompare(i(n))}visibleOptions(t){let n=t.options.filter(r=>!r.hidden),i=t._getHelpOption();if(i&&!i.hidden){let r=i.short&&t._findOption(i.short),u=i.long&&t._findOption(i.long);!r&&!u?n.push(i):i.long&&!u?n.push(t.createOption(i.long,i.description)):i.short&&!r&&n.push(t.createOption(i.short,i.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let n=[];for(let i=t.parent;i;i=i.parent){let r=i.options.filter(u=>!u.hidden);n.push(...r)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(n=>{n.description=n.description||t._argsDescription[n.name()]||""}),t.registeredArguments.find(n=>n.description)?t.registeredArguments:[]}subcommandTerm(t){let n=t.registeredArguments.map(i=>wi(i)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,n){return n.visibleCommands(t).reduce((i,r)=>Math.max(i,n.subcommandTerm(r).length),0)}longestOptionTermLength(t,n){return n.visibleOptions(t).reduce((i,r)=>Math.max(i,n.optionTerm(r).length),0)}longestGlobalOptionTermLength(t,n){return n.visibleGlobalOptions(t).reduce((i,r)=>Math.max(i,n.optionTerm(r).length),0)}longestArgumentTermLength(t,n){return n.visibleArguments(t).reduce((i,r)=>Math.max(i,n.argumentTerm(r).length),0)}commandUsage(t){let n=t._name;t._aliases[0]&&(n=n+"|"+t._aliases[0]);let i="";for(let r=t.parent;r;r=r.parent)i=r.name()+" "+i;return i+n+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let n=[];return t.argChoices&&n.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&n.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&n.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&n.push(`env: ${t.envVar}`),n.length>0?`${t.description} (${n.join(", ")})`:t.description}argumentDescription(t){let n=[];if(t.argChoices&&n.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&n.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),n.length>0){let i=`(${n.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}formatHelp(t,n){let i=n.padWidth(t,n),r=n.helpWidth||80,u=2,s=2;function o(h,v){if(v){let K=`${h.padEnd(i+s)}${v}`;return n.wrap(K,r-u,i+s)}return h}function a(h){return h.join(`
3
+ `).replace(/^/gm," ".repeat(u))}let D=[`Usage: ${n.commandUsage(t)}`,""],l=n.commandDescription(t);l.length>0&&(D=D.concat([n.wrap(l,r,0),""]));let c=n.visibleArguments(t).map(h=>o(n.argumentTerm(h),n.argumentDescription(h)));c.length>0&&(D=D.concat(["Arguments:",a(c),""]));let p=n.visibleOptions(t).map(h=>o(n.optionTerm(h),n.optionDescription(h)));if(p.length>0&&(D=D.concat(["Options:",a(p),""])),this.showGlobalOptions){let h=n.visibleGlobalOptions(t).map(v=>o(n.optionTerm(v),n.optionDescription(v)));h.length>0&&(D=D.concat(["Global Options:",a(h),""]))}let A=n.visibleCommands(t).map(h=>o(n.subcommandTerm(h),n.subcommandDescription(h)));return A.length>0&&(D=D.concat(["Commands:",a(A),""])),D.join(`
4
+ `)}padWidth(t,n){return Math.max(n.longestOptionTermLength(t,n),n.longestGlobalOptionTermLength(t,n),n.longestSubcommandTermLength(t,n),n.longestArgumentTermLength(t,n))}wrap(t,n,i,r=40){let u=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",s=new RegExp(`[\\n][${u}]+`);if(t.match(s))return t;let o=n-i;if(o<r)return t;let a=t.slice(0,i),D=t.slice(i).replace(`\r
5
5
  `,`
6
- `),u=" ".repeat(i),f="\\s\u200B",A=new RegExp(`
7
- |.{1,${l-1}}([${f}]|$)|[^${f}]+?([${f}]|$)`,"g"),d=c.match(A)||[];return a+d.map((w,I)=>w===`
8
- `?"":(I>0?u:"")+w.trimEnd()).join(`
9
- `)}};se.Help=R});var z=x(B=>{"use strict";var{InvalidArgumentError:Re}=V(),L=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let i=Le(e);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new Re(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Je(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},U=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(e,t){let i=t.attributeName();if(!this.dualOptions.has(i))return!0;let n=this.negativeOptions.get(i).presetArg,s=n!==void 0?n:!1;return t.negate===(s===e)}};function Je(o){return o.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Le(o){let e,t,i=o.split(/[ |,]+/);return i.length>1&&!/^[[<]/.test(i[1])&&(e=i.shift()),t=i.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}B.Option=L;B.DualOptions=U});var oe=x(re=>{"use strict";function Ue(o,e){if(Math.abs(o.length-e.length)>3)return Math.max(o.length,e.length);let t=[];for(let i=0;i<=o.length;i++)t[i]=[i];for(let i=0;i<=e.length;i++)t[0][i]=i;for(let i=1;i<=e.length;i++)for(let n=1;n<=o.length;n++){let s=1;o[n-1]===e[i-1]?s=0:s=1,t[n][i]=Math.min(t[n-1][i]+1,t[n][i-1]+1,t[n-1][i-1]+s),n>1&&i>1&&o[n-1]===e[i-2]&&o[n-2]===e[i-1]&&(t[n][i]=Math.min(t[n][i],t[n-2][i-2]+1))}return t[o.length][e.length]}function Be(o,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=o.startsWith("--");t&&(o=o.slice(2),e=e.map(r=>r.slice(2)));let i=[],n=3,s=.4;return e.forEach(r=>{if(r.length<=1)return;let l=Ue(o,r),a=Math.max(o.length,r.length);(a-l)/a>s&&(l<n?(n=l,i=[r]):l===n&&i.push(r))}),i.sort((r,l)=>r.localeCompare(l)),t&&(i=i.map(r=>`--${r}`)),i.length>1?`
6
+ `),l=" ".repeat(i),p="\\s\u200B",A=new RegExp(`
7
+ |.{1,${o-1}}([${p}]|$)|[^${p}]+?([${p}]|$)`,"g"),h=D.match(A)||[];return a+h.map((v,K)=>v===`
8
+ `?"":(K>0?l:"")+v.trimEnd()).join(`
9
+ `)}};gt.Help=Oe});var $e=f(ke=>{"use strict";var{InvalidArgumentError:Si}=X(),Se=class{constructor(t,n){this.flags=t,this.description=n||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let i=ki(t);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(t,n){return this.defaultValue=t,this.defaultValueDescription=n,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let n=t;return typeof t=="string"&&(n={[t]:!0}),this.implied=Object.assign(this.implied||{},n),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,n){return n===this.defaultValue||!Array.isArray(n)?[t]:n.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(n,i)=>{if(!this.argChoices.includes(n))throw new Si(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(n,i):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Ti(this.name().replace(/^no-/,""))}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Te=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(t,n){let i=n.attributeName();if(!this.dualOptions.has(i))return!0;let r=this.negativeOptions.get(i).presetArg,u=r!==void 0?r:!1;return n.negate===(u===t)}};function Ti(e){return e.split("-").reduce((t,n)=>t+n[0].toUpperCase()+n.slice(1))}function ki(e){let t,n,i=e.split(/[ |,]+/);return i.length>1&&!/^[[<]/.test(i[1])&&(t=i.shift()),n=i.shift(),!t&&/^-[^-]$/.test(n)&&(t=n,n=void 0),{shortFlag:t,longFlag:n}}ke.Option=Se;ke.DualOptions=Te});var Et=f(Ct=>{"use strict";function $i(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let n=[];for(let i=0;i<=e.length;i++)n[i]=[i];for(let i=0;i<=t.length;i++)n[0][i]=i;for(let i=1;i<=t.length;i++)for(let r=1;r<=e.length;r++){let u=1;e[r-1]===t[i-1]?u=0:u=1,n[r][i]=Math.min(n[r-1][i]+1,n[r][i-1]+1,n[r-1][i-1]+u),r>1&&i>1&&e[r-1]===t[i-2]&&e[r-2]===t[i-1]&&(n[r][i]=Math.min(n[r][i],n[r-2][i-2]+1))}return n[e.length][t.length]}function Ni(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let n=e.startsWith("--");n&&(e=e.slice(2),t=t.map(s=>s.slice(2)));let i=[],r=3,u=.4;return t.forEach(s=>{if(s.length<=1)return;let o=$i(e,s),a=Math.max(e.length,s.length);(a-o)/a>u&&(o<r?(r=o,i=[s]):o===r&&i.push(s))}),i.sort((s,o)=>s.localeCompare(o)),n&&(i=i.map(s=>`--${s}`)),i.length>1?`
10
10
  (Did you mean one of ${i.join(", ")}?)`:i.length===1?`
11
- (Did you mean ${i[0]}?)`:""}re.suggestSimilar=Be});var he=x(ue=>{"use strict";var ze=require("events").EventEmitter,G=require("child_process"),y=require("path"),Y=require("fs"),p=require("process"),{Argument:Ge,humanReadableArgName:Ye}=j(),{CommanderError:K}=V(),{Help:Ke}=J(),{Option:ae,DualOptions:Xe}=z(),{suggestSimilar:le}=oe(),X=class o extends ze{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:t=>p.stdout.write(t),writeErr:t=>p.stderr.write(t),getOutHelpWidth:()=>p.stdout.isTTY?p.stdout.columns:void 0,getErrHelpWidth:()=>p.stderr.isTTY?p.stderr.columns:void 0,outputError:(t,i)=>i(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,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(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,i){let n=t,s=i;typeof n=="object"&&n!==null&&(s=n,n=null),s=s||{};let[,r,l]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(r);return n&&(a.description(n),a._executableHandler=!0),s.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(s.noHelp||s.hidden),a._executableFile=s.executableFile||null,l&&a.arguments(l),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),n?this:a}createCommand(e){return new o(e)}createHelp(){return Object.assign(new Ke,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
12
- - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new Ge(e,t)}argument(e,t,i,n){let s=this.createArgument(e,t);return typeof i=="function"?s.default(n).argParser(i):s.default(i),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,i,n]=e.match(/([^ ]+) *(.*)/),s=t??"display help for command",r=this.createCommand(i);return r.helpOption(!1),n&&r.arguments(n),s&&r.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=r,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,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(e,t){let i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
13
- Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,i){this._exitCallback&&this._exitCallback(new K(e,t,i)),p.exit(e)}action(e){let t=i=>{let n=this.registeredArguments.length,s=i.slice(0,n);return this._storeOptionsAsProperties?s[n]=this:s[n]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new ae(e,t)}_callParseArg(e,t,i,n){try{return e.parseArg(t,i)}catch(s){if(s.code==="commander.invalidArgument"){let r=`${n} ${s.message}`;this.error(r,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let i=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
14
- - already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=n=>[n.name()].concat(n.aliases()),i=t(e).find(n=>this._findCommand(n));if(i){let n=t(this._findCommand(i)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),i=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(i,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");let n=(s,r,l)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let a=this.getOptionValue(i);s!==null&&e.parseArg?s=this._callParseArg(e,s,a,r):s!==null&&e.variadic&&(s=e._concatValue(s,a)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(i,s,l)};return this.on("option:"+t,s=>{let r=`error: option '${e.flags}' argument '${s}' is invalid.`;n(s,r,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let r=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;n(s,r,"env")}),this}_optionEx(e,t,i,n,s){if(typeof t=="object"&&t instanceof ae)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let r=this.createOption(t,i);if(r.makeOptionMandatory(!!e.mandatory),typeof n=="function")r.default(s).argParser(n);else if(n instanceof RegExp){let l=n;n=(a,c)=>{let u=l.exec(a);return u?u[0]:c},r.default(s).argParser(n)}else r.default(n);return this.addOption(r)}option(e,t,i,n){return this._optionEx({},e,t,i,n)}requiredOption(e,t,i,n){return this._optionEx({mandatory:!0},e,t,i,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,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(e=!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=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,i){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(e)!==void 0&&(t=i.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){p.versions?.electron&&(t.from="electron");let n=p.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(t.from="eval")}e===void 0&&(e=p.argv),this.rawArgs=e.slice();let i;switch(t.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":p.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;case"eval":i=e.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",i}parse(e,t){let i=this._prepareUserArgs(e,t);return this._parseCommand([],i),this}async parseAsync(e,t){let i=this._prepareUserArgs(e,t);return await this._parseCommand([],i),this}_executeSubCommand(e,t){t=t.slice();let i=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function s(u,h){let f=y.resolve(u,h);if(Y.existsSync(f))return f;if(n.includes(y.extname(h)))return;let A=n.find(d=>Y.existsSync(`${f}${d}`));if(A)return`${f}${A}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=e._executableFile||`${this._name}-${e._name}`,l=this._executableDir||"";if(this._scriptPath){let u;try{u=Y.realpathSync(this._scriptPath)}catch{u=this._scriptPath}l=y.resolve(y.dirname(u),l)}if(l){let u=s(l,r);if(!u&&!e._executableFile&&this._scriptPath){let h=y.basename(this._scriptPath,y.extname(this._scriptPath));h!==this._name&&(u=s(l,`${h}-${e._name}`))}r=u||r}i=n.includes(y.extname(r));let a;p.platform!=="win32"?i?(t.unshift(r),t=ce(p.execArgv).concat(t),a=G.spawn(p.argv[0],t,{stdio:"inherit"})):a=G.spawn(r,t,{stdio:"inherit"}):(t.unshift(r),t=ce(p.execArgv).concat(t),a=G.spawn(p.execPath,t,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(h=>{p.on(h,()=>{a.killed===!1&&a.exitCode===null&&a.kill(h)})});let c=this._exitCallback;a.on("close",u=>{u=u??1,c?c(new K(u,"commander.executeSubCommandAsync","(close)")):p.exit(u)}),a.on("error",u=>{if(u.code==="ENOENT"){let h=l?`searched for local subcommand relative to directory '${l}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",f=`'${r}' does not exist
15
- - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
11
+ (Did you mean ${i[0]}?)`:""}Ct.suggestSimilar=Ni});var bt=f(vt=>{"use strict";var Ii=require("events").EventEmitter,Ne=require("child_process"),I=require("path"),Ie=require("fs"),C=require("process"),{Argument:Pi,humanReadableArgName:Ri}=ae(),{CommanderError:Pe}=X(),{Help:Mi}=we(),{Option:_t,DualOptions:Vi}=$e(),{suggestSimilar:At}=Et(),Re=class e extends Ii{constructor(t){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=t||"",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:n=>C.stdout.write(n),writeErr:n=>C.stderr.write(n),getOutHelpWidth:()=>C.stdout.isTTY?C.stdout.columns:void 0,getErrHelpWidth:()=>C.stderr.isTTY?C.stderr.columns:void 0,outputError:(n,i)=>i(n)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let n=this;n;n=n.parent)t.push(n);return t}command(t,n,i){let r=n,u=i;typeof r=="object"&&r!==null&&(u=r,r=null),u=u||{};let[,s,o]=t.match(/([^ ]+) *(.*)/),a=this.createCommand(s);return r&&(a.description(r),a._executableHandler=!0),u.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(u.noHelp||u.hidden),a._executableFile=u.executableFile||null,o&&a.arguments(o),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),r?this:a}createCommand(t){return new e(t)}createHelp(){return Object.assign(new Mi,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,t),this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,n){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
12
+ - specify the name in Command constructor or using .name()`);return n=n||{},n.isDefault&&(this._defaultCommandName=t._name),(n.noHelp||n.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,n){return new Pi(t,n)}argument(t,n,i,r){let u=this.createArgument(t,n);return typeof i=="function"?u.default(r).argParser(i):u.default(i),this.addArgument(u),this}arguments(t){return t.trim().split(/ +/).forEach(n=>{this.argument(n)}),this}addArgument(t){let n=this.registeredArguments.slice(-1)[0];if(n&&n.variadic)throw new Error(`only the last argument can be variadic '${n.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,n){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,this;t=t??"help [command]";let[,i,r]=t.match(/([^ ]+) *(.*)/),u=n??"display help for command",s=this.createCommand(i);return s.helpOption(!1),r&&s.arguments(r),u&&s.description(u),this._addImplicitHelpCommand=!0,this._helpCommand=s,this}addHelpCommand(t,n){return typeof t!="object"?(this.helpCommand(t,n),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,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(t,n){let i=["preSubcommand","preAction","postAction"];if(!i.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
13
+ Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(n):this._lifeCycleHooks[t]=[n],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(t,n,i){this._exitCallback&&this._exitCallback(new Pe(t,n,i)),C.exit(t)}action(t){let n=i=>{let r=this.registeredArguments.length,u=i.slice(0,r);return this._storeOptionsAsProperties?u[r]=this:u[r]=this.opts(),u.push(this),t.apply(this,u)};return this._actionHandler=n,this}createOption(t,n){return new _t(t,n)}_callParseArg(t,n,i,r){try{return t.parseArg(n,i)}catch(u){if(u.code==="commander.invalidArgument"){let s=`${r} ${u.message}`;this.error(s,{exitCode:u.exitCode,code:u.code})}throw u}}_registerOption(t){let n=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(n){let i=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
14
+ - already used by option '${n.flags}'`)}this.options.push(t)}_registerCommand(t){let n=r=>[r.name()].concat(r.aliases()),i=n(t).find(r=>this._findCommand(r));if(i){let r=n(this._findCommand(i)).join("|"),u=n(t).join("|");throw new Error(`cannot add command '${u}' as already have command '${r}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);let n=t.name(),i=t.attributeName();if(t.negate){let u=t.long.replace(/^--no-/,"--");this._findOption(u)||this.setOptionValueWithSource(i,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(i,t.defaultValue,"default");let r=(u,s,o)=>{u==null&&t.presetArg!==void 0&&(u=t.presetArg);let a=this.getOptionValue(i);u!==null&&t.parseArg?u=this._callParseArg(t,u,a,s):u!==null&&t.variadic&&(u=t._concatValue(u,a)),u==null&&(t.negate?u=!1:t.isBoolean()||t.optional?u=!0:u=""),this.setOptionValueWithSource(i,u,o)};return this.on("option:"+n,u=>{let s=`error: option '${t.flags}' argument '${u}' is invalid.`;r(u,s,"cli")}),t.envVar&&this.on("optionEnv:"+n,u=>{let s=`error: option '${t.flags}' value '${u}' from env '${t.envVar}' is invalid.`;r(u,s,"env")}),this}_optionEx(t,n,i,r,u){if(typeof n=="object"&&n instanceof _t)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(n,i);if(s.makeOptionMandatory(!!t.mandatory),typeof r=="function")s.default(u).argParser(r);else if(r instanceof RegExp){let o=r;r=(a,D)=>{let l=o.exec(a);return l?l[0]:D},s.default(u).argParser(r)}else s.default(r);return this.addOption(s)}option(t,n,i,r){return this._optionEx({},t,n,i,r)}requiredOption(t,n,i,r){return this._optionEx({mandatory:!0},t,n,i,r)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,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(t=!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=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,n){return this.setOptionValueWithSource(t,n,void 0)}setOptionValueWithSource(t,n,i){return this._storeOptionsAsProperties?this[t]=n:this._optionValues[t]=n,this._optionValueSources[t]=i,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let n;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(t)!==void 0&&(n=i.getOptionValueSource(t))}),n}_prepareUserArgs(t,n){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(n=n||{},t===void 0&&n.from===void 0){C.versions?.electron&&(n.from="electron");let r=C.execArgv??[];(r.includes("-e")||r.includes("--eval")||r.includes("-p")||r.includes("--print"))&&(n.from="eval")}t===void 0&&(t=C.argv),this.rawArgs=t.slice();let i;switch(n.from){case void 0:case"node":this._scriptPath=t[1],i=t.slice(2);break;case"electron":C.defaultApp?(this._scriptPath=t[1],i=t.slice(2)):i=t.slice(1);break;case"user":i=t.slice(0);break;case"eval":i=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${n.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(t,n){let i=this._prepareUserArgs(t,n);return this._parseCommand([],i),this}async parseAsync(t,n){let i=this._prepareUserArgs(t,n);return await this._parseCommand([],i),this}_executeSubCommand(t,n){n=n.slice();let i=!1,r=[".js",".ts",".tsx",".mjs",".cjs"];function u(l,c){let p=I.resolve(l,c);if(Ie.existsSync(p))return p;if(r.includes(I.extname(c)))return;let A=r.find(h=>Ie.existsSync(`${p}${h}`));if(A)return`${p}${A}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=t._executableFile||`${this._name}-${t._name}`,o=this._executableDir||"";if(this._scriptPath){let l;try{l=Ie.realpathSync(this._scriptPath)}catch{l=this._scriptPath}o=I.resolve(I.dirname(l),o)}if(o){let l=u(o,s);if(!l&&!t._executableFile&&this._scriptPath){let c=I.basename(this._scriptPath,I.extname(this._scriptPath));c!==this._name&&(l=u(o,`${c}-${t._name}`))}s=l||s}i=r.includes(I.extname(s));let a;C.platform!=="win32"?i?(n.unshift(s),n=Bt(C.execArgv).concat(n),a=Ne.spawn(C.argv[0],n,{stdio:"inherit"})):a=Ne.spawn(s,n,{stdio:"inherit"}):(n.unshift(s),n=Bt(C.execArgv).concat(n),a=Ne.spawn(C.execPath,n,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{C.on(c,()=>{a.killed===!1&&a.exitCode===null&&a.kill(c)})});let D=this._exitCallback;a.on("close",l=>{l=l??1,D?D(new Pe(l,"commander.executeSubCommandAsync","(close)")):C.exit(l)}),a.on("error",l=>{if(l.code==="ENOENT"){let c=o?`searched for local subcommand relative to directory '${o}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",p=`'${s}' does not exist
15
+ - if '${t._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
16
16
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
17
- - ${h}`;throw new Error(f)}else if(u.code==="EACCES")throw new Error(`'${r}' not executable`);if(!c)p.exit(1);else{let h=new K(1,"commander.executeSubCommandAsync","(error)");h.nestedError=u,c(h)}}),this.runningCommand=a}_dispatchSubcommand(e,t,i){let n=this._findCommand(e);n||this.help({error:!0});let s;return s=this._chainOrCallSubCommandHook(s,n,"preSubcommand"),s=this._chainOrCall(s,()=>{if(n._executableHandler)this._executeSubCommand(n,t.concat(i));else return n._parseCommand(t,i)}),s}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==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(){let e=(i,n,s)=>{let r=n;if(n!==null&&i.parseArg){let l=`error: command-argument value '${n}' is invalid for argument '${i.name()}'.`;r=this._callParseArg(i,n,s,l)}return r};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((i,n)=>{let s=i.defaultValue;i.variadic?n<this.args.length?(s=this.args.slice(n),i.parseArg&&(s=s.reduce((r,l)=>e(i,l,r),i.defaultValue))):s===void 0&&(s=[]):n<this.args.length&&(s=this.args[n],i.parseArg&&(s=e(i,s,i.defaultValue))),t[n]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let i=e,n=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(r=>{n.push({hookedCommand:s,callback:r})})}),t==="postAction"&&n.reverse(),n.forEach(s=>{i=this._chainOrCall(i,()=>s.callback(s.hookedCommand,this))}),i}_chainOrCallSubCommandHook(e,t,i){let n=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(s=>{n=this._chainOrCall(n,()=>s(this,t))}),n}_parseCommand(e,t){let i=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),t=i.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let r;return r=this._chainOrCallHooks(r,"preAction"),r=this._chainOrCall(r,()=>this._actionHandler(this.processedArgs)),this.parent&&(r=this._chainOrCall(r,()=>{this.parent.emit(s,e,t)})),r=this._chainOrCallHooks(r,"postAction"),r}if(this.parent&&this.parent.listenerCount(s))n(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(i=>{let n=i.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{let n=e.find(s=>i.conflictsWith.includes(s.attributeName()));n&&this._conflictingOption(i,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],i=[],n=t,s=e.slice();function r(a){return a.length>1&&a[0]==="-"}let l=null;for(;s.length;){let a=s.shift();if(a==="--"){n===i&&n.push(a),n.push(...s);break}if(l&&!r(a)){this.emit(`option:${l.name()}`,a);continue}if(l=null,r(a)){let c=this._findOption(a);if(c){if(c.required){let u=s.shift();u===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,u)}else if(c.optional){let u=null;s.length>0&&!r(s[0])&&(u=s.shift()),this.emit(`option:${c.name()}`,u)}else this.emit(`option:${c.name()}`);l=c.variadic?c:null;continue}}if(a.length>2&&a[0]==="-"&&a[1]!=="-"){let c=this._findOption(`-${a[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,a.slice(2)):(this.emit(`option:${c.name()}`),s.unshift(`-${a.slice(2)}`));continue}}if(/^--[^=]+=/.test(a)){let c=a.indexOf("="),u=this._findOption(a.slice(0,c));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,a.slice(c+1));continue}}if(r(a)&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&i.length===0){if(this._findCommand(a)){t.push(a),s.length>0&&i.push(...s);break}else if(this._getHelpCommand()&&a===this._getHelpCommand().name()){t.push(a),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){i.push(a),s.length>0&&i.push(...s);break}}if(this._passThroughOptions){n.push(a),s.length>0&&n.push(...s);break}n.push(a)}return{operands:t,unknown:i}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let i=0;i<t;i++){let n=this.options[i].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
17
+ - ${c}`;throw new Error(p)}else if(l.code==="EACCES")throw new Error(`'${s}' not executable`);if(!D)C.exit(1);else{let c=new Pe(1,"commander.executeSubCommandAsync","(error)");c.nestedError=l,D(c)}}),this.runningCommand=a}_dispatchSubcommand(t,n,i){let r=this._findCommand(t);r||this.help({error:!0});let u;return u=this._chainOrCallSubCommandHook(u,r,"preSubcommand"),u=this._chainOrCall(u,()=>{if(r._executableHandler)this._executeSubCommand(r,n.concat(i));else return r._parseCommand(n,i)}),u}_dispatchHelpCommand(t){t||this.help();let n=this._findCommand(t);return n&&!n._executableHandler&&n.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,n)=>{t.required&&this.args[n]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(i,r,u)=>{let s=r;if(r!==null&&i.parseArg){let o=`error: command-argument value '${r}' is invalid for argument '${i.name()}'.`;s=this._callParseArg(i,r,u,o)}return s};this._checkNumberOfArguments();let n=[];this.registeredArguments.forEach((i,r)=>{let u=i.defaultValue;i.variadic?r<this.args.length?(u=this.args.slice(r),i.parseArg&&(u=u.reduce((s,o)=>t(i,o,s),i.defaultValue))):u===void 0&&(u=[]):r<this.args.length&&(u=this.args[r],i.parseArg&&(u=t(i,u,i.defaultValue))),n[r]=u}),this.processedArgs=n}_chainOrCall(t,n){return t&&t.then&&typeof t.then=="function"?t.then(()=>n()):n()}_chainOrCallHooks(t,n){let i=t,r=[];return this._getCommandAndAncestors().reverse().filter(u=>u._lifeCycleHooks[n]!==void 0).forEach(u=>{u._lifeCycleHooks[n].forEach(s=>{r.push({hookedCommand:u,callback:s})})}),n==="postAction"&&r.reverse(),r.forEach(u=>{i=this._chainOrCall(i,()=>u.callback(u.hookedCommand,this))}),i}_chainOrCallSubCommandHook(t,n,i){let r=t;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(u=>{r=this._chainOrCall(r,()=>u(this,n))}),r}_parseCommand(t,n){let i=this.parseOptions(n);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(i.operands),n=i.unknown,this.args=t.concat(n),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),n);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(n),this._dispatchSubcommand(this._defaultCommandName,t,n);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},u=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(u,t,n)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(u))r(),this._processArguments(),this.parent.emit(u,t,n);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,n);this.listenerCount("command:*")?this.emit("command:*",t,n):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(n=>n._name===t||n._aliases.includes(t))}_findOption(t){return this.options.find(n=>n.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(n=>{n.mandatory&&t.getOptionValue(n.attributeName())===void 0&&t.missingMandatoryOptionValue(n)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(i=>{let r=i.attributeName();return this.getOptionValue(r)===void 0?!1:this.getOptionValueSource(r)!=="default"});t.filter(i=>i.conflictsWith.length>0).forEach(i=>{let r=t.find(u=>i.conflictsWith.includes(u.attributeName()));r&&this._conflictingOption(i,r)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let n=[],i=[],r=n,u=t.slice();function s(a){return a.length>1&&a[0]==="-"}let o=null;for(;u.length;){let a=u.shift();if(a==="--"){r===i&&r.push(a),r.push(...u);break}if(o&&!s(a)){this.emit(`option:${o.name()}`,a);continue}if(o=null,s(a)){let D=this._findOption(a);if(D){if(D.required){let l=u.shift();l===void 0&&this.optionMissingArgument(D),this.emit(`option:${D.name()}`,l)}else if(D.optional){let l=null;u.length>0&&!s(u[0])&&(l=u.shift()),this.emit(`option:${D.name()}`,l)}else this.emit(`option:${D.name()}`);o=D.variadic?D:null;continue}}if(a.length>2&&a[0]==="-"&&a[1]!=="-"){let D=this._findOption(`-${a[1]}`);if(D){D.required||D.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${D.name()}`,a.slice(2)):(this.emit(`option:${D.name()}`),u.unshift(`-${a.slice(2)}`));continue}}if(/^--[^=]+=/.test(a)){let D=a.indexOf("="),l=this._findOption(a.slice(0,D));if(l&&(l.required||l.optional)){this.emit(`option:${l.name()}`,a.slice(D+1));continue}}if(s(a)&&(r=i),(this._enablePositionalOptions||this._passThroughOptions)&&n.length===0&&i.length===0){if(this._findCommand(a)){n.push(a),u.length>0&&i.push(...u);break}else if(this._getHelpCommand()&&a===this._getHelpCommand().name()){n.push(a),u.length>0&&n.push(...u);break}else if(this._defaultCommandName){i.push(a),u.length>0&&i.push(...u);break}}if(this._passThroughOptions){r.push(a),u.length>0&&r.push(...u);break}r.push(a)}return{operands:n,unknown:i}}opts(){if(this._storeOptionsAsProperties){let t={},n=this.options.length;for(let i=0;i<n;i++){let r=this.options[i].attributeName();t[r]=r===this._versionOptionName?this._version:this[r]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,n)=>Object.assign(t,n.opts()),{})}error(t,n){this._outputConfiguration.outputError(`${t}
18
18
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
19
19
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
20
- `),this.outputHelp({error:!0}));let i=t||{},n=i.exitCode||1,s=i.code||"commander.error";this._exit(n,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in p.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,p.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Xe(this.options),t=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&t(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(n=>!t(n)).forEach(n=>{this.setOptionValueWithSource(n,i.implied[n],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let i=r=>{let l=r.attributeName(),a=this.getOptionValue(l),c=this.options.find(h=>h.negate&&l===h.attributeName()),u=this.options.find(h=>!h.negate&&l===h.attributeName());return c&&(c.presetArg===void 0&&a===!1||c.presetArg!==void 0&&a===c.presetArg)?c:u||r},n=r=>{let l=i(r),a=l.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${l.envVar}'`:`option '${l.flags}'`},s=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{let r=s.createHelp().visibleOptions(s).filter(l=>l.long).map(l=>l.long);n=n.concat(r),s=s.parent}while(s&&!s._enablePositionalOptions);t=le(e,n)}let i=`error: unknown option '${e}'${t}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,i=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${i} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(s=>{n.push(s.name()),s.alias()&&n.push(s.alias())}),t=le(e,n)}let i=`error: unknown command '${e}'${t}`;this.error(i,{code:"commander.unknownCommand"})}version(e,t,i){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",i=i||"output the version number";let n=this.createOption(t,i);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
21
- `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(e);if(i){let n=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(i=>Ye(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=y.basename(e,y.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e=e||{};let t={error:!!e.error},i;return t.error?i=n=>this._outputConfiguration.writeErr(n):i=n=>this._outputConfiguration.writeOut(n),t.write=e.write||i,t.command=this,t}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let i=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let n=this.helpInformation(i);if(t&&(n=t(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",i))}helpOption(e,t){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=p.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
22
- Expecting one of '${i.join("', '")}'`);let n=`${e}Help`;return this.on(n,s=>{let r;typeof t=="function"?r=t({error:s.error,command:s.command}):r=t,r&&s.write(`${r}
23
- `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function ce(o){return o.map(e=>{if(!e.startsWith("--inspect"))return e;let t,i="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?n=s[3]:i=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],i=s[3],n=s[4]),t&&n!=="0"?`${t}=${i}:${parseInt(n)+1}`:e})}ue.Command=X});var fe=x(g=>{"use strict";var{Argument:pe}=j(),{Command:Q}=he(),{CommanderError:Qe,InvalidArgumentError:de}=V(),{Help:Ze}=J(),{Option:me}=z();g.program=new Q;g.createCommand=o=>new Q(o);g.createOption=(o,e)=>new me(o,e);g.createArgument=(o,e)=>new pe(o,e);g.Command=Q;g.Option=me;g.Argument=pe;g.Help=Ze;g.CommanderError=Qe;g.InvalidArgumentError=de;g.InvalidOptionArgumentError=de});var C=require("path"),Ve=require("fs");var ge=v(fe(),1),{program:ct,createCommand:ut,createArgument:ht,createOption:pt,CommanderError:dt,InvalidArgumentError:mt,InvalidOptionArgumentError:ft,Command:_e,Argument:gt,Option:be,Help:_t}=ge.default;var b=v(require("picocolors"),1),He=v(require("figlet"),1),Ne=v(require("prompts"),1);var Oe={name:"create-vitnode-app",version:"0.0.7-canary.39",description:"Create a new VitNode app in seconds.",author:"VitNode Team",license:"MIT",homepage:"https://VitNode.com",repository:{type:"git",url:"git+https://github.com/aXenDeveloper/VitNode.git",directory:"packages/create-vitnode-app"},type:"module",bin:{"create-vitnode-app":"dist/index.cjs"},scripts:{lint:"eslint .","lint:fix":"eslint . --fix","build:scripts":"tsup index.ts","dev:script":"tsup index.ts --watch","start:script":"node dist/index.cjs"},dependencies:{figlet:"^1.7.0",picocolors:"^1.0.1",prompts:"^2.4.2","validate-npm-package-name":"^5.0.1"},devDependencies:{"@types/figlet":"^1.5.8","@types/node":"^20.14.11","@types/prompts":"^2.4.9","@types/validate-npm-package-name":"^4.0.2",commander:"^12.1.0",tsup:"^8.1.0",typescript:"^5.5.3","eslint-config-typescript-vitnode":"workspace:*"}};var Ce=v(require("validate-npm-package-name"),1),Z=({name:o})=>{let e=(0,Ce.default)(o);return e.validForNewPackages?{valid:!0}:{valid:!1,problems:[...e.errors||[],...e.warnings||[]]}};var D=require("fs"),ve=require("path"),ee=v(require("picocolors"),1);function F(o,e){let t=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"],i=(0,D.readdirSync)(o).filter(n=>!t.includes(n)&&!n.endsWith(".iml"));if(i.length>0){console.log(`The directory ${ee.default.green(e)} contains files that could conflict:
24
- `);for(let n of i)try{(0,D.lstatSync)((0,ve.join)(o,n)).isDirectory()?console.log(`${ee.default.blue(n)}/`):console.log(`${n}`)}catch{console.log(`${n}`)}return console.log(`
20
+ `),this.outputHelp({error:!0}));let i=n||{},r=i.exitCode||1,u=i.code||"commander.error";this._exit(r,u,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in C.env){let n=t.attributeName();(this.getOptionValue(n)===void 0||["default","config","env"].includes(this.getOptionValueSource(n)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,C.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new Vi(this.options),n=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&n(i.attributeName())&&t.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(r=>!n(r)).forEach(r=>{this.setOptionValueWithSource(r,i.implied[r],"implied")})})}missingArgument(t){let n=`error: missing required argument '${t}'`;this.error(n,{code:"commander.missingArgument"})}optionMissingArgument(t){let n=`error: option '${t.flags}' argument missing`;this.error(n,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let n=`error: required option '${t.flags}' not specified`;this.error(n,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,n){let i=s=>{let o=s.attributeName(),a=this.getOptionValue(o),D=this.options.find(c=>c.negate&&o===c.attributeName()),l=this.options.find(c=>!c.negate&&o===c.attributeName());return D&&(D.presetArg===void 0&&a===!1||D.presetArg!==void 0&&a===D.presetArg)?D:l||s},r=s=>{let o=i(s),a=o.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${o.envVar}'`:`option '${o.flags}'`},u=`error: ${r(t)} cannot be used with ${r(n)}`;this.error(u,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let n="";if(t.startsWith("--")&&this._showSuggestionAfterError){let r=[],u=this;do{let s=u.createHelp().visibleOptions(u).filter(o=>o.long).map(o=>o.long);r=r.concat(s),u=u.parent}while(u&&!u._enablePositionalOptions);n=At(t,r)}let i=`error: unknown option '${t}'${n}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let n=this.registeredArguments.length,i=n===1?"":"s",u=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${n} argument${i} but got ${t.length}.`;this.error(u,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],n="";if(this._showSuggestionAfterError){let r=[];this.createHelp().visibleCommands(this).forEach(u=>{r.push(u.name()),u.alias()&&r.push(u.alias())}),n=At(t,r)}let i=`error: unknown command '${t}'${n}`;this.error(i,{code:"commander.unknownCommand"})}version(t,n,i){if(t===void 0)return this._version;this._version=t,n=n||"-V, --version",i=i||"output the version number";let r=this.createOption(n,i);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${t}
21
+ `),this._exit(0,"commander.version",t)}),this}description(t,n){return t===void 0&&n===void 0?this._description:(this._description=t,n&&(this._argsDescription=n),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),t===n._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(t);if(i){let r=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${r}'`)}return n._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(n=>this.alias(n)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(i=>Ri(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?n:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}nameFromFilename(t){return this._name=I.basename(t,I.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let n=this.createHelp();return n.helpWidth===void 0&&(n.helpWidth=t&&t.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),n.formatHelp(this,n)}_getHelpContext(t){t=t||{};let n={error:!!t.error},i;return n.error?i=r=>this._outputConfiguration.writeErr(r):i=r=>this._outputConfiguration.writeOut(r),n.write=t.write||i,n.command=this,n}outputHelp(t){let n;typeof t=="function"&&(n=t,t=void 0);let i=this._getHelpContext(t);this._getCommandAndAncestors().reverse().forEach(u=>u.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let r=this.helpInformation(i);if(n&&(r=n(r),typeof r!="string"&&!Buffer.isBuffer(r)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(r),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(u=>u.emit("afterAllHelp",i))}helpOption(t,n){return typeof t=="boolean"?(t?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(t=t??"-h, --help",n=n??"display help for command",this._helpOption=this.createOption(t,n),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this}help(t){this.outputHelp(t);let n=C.exitCode||0;n===0&&t&&typeof t!="function"&&t.error&&(n=1),this._exit(n,"commander.help","(outputHelp)")}addHelpText(t,n){let i=["beforeAll","before","after","afterAll"];if(!i.includes(t))throw new Error(`Unexpected value for position to addHelpText.
22
+ Expecting one of '${i.join("', '")}'`);let r=`${t}Help`;return this.on(r,u=>{let s;typeof n=="function"?s=n({error:u.error,command:u.command}):s=n,s&&u.write(`${s}
23
+ `)}),this}_outputHelpIfRequested(t){let n=this._getHelpOption();n&&t.find(r=>n.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Bt(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let n,i="127.0.0.1",r="9229",u;return(u=t.match(/^(--inspect(-brk)?)$/))!==null?n=u[1]:(u=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=u[1],/^\d+$/.test(u[3])?r=u[3]:i=u[3]):(u=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=u[1],i=u[3],r=u[4]),n&&r!=="0"?`${n}=${i}:${parseInt(r)+1}`:t})}vt.Command=Re});var wt=f(b=>{"use strict";var{Argument:xt}=ae(),{Command:Me}=bt(),{CommanderError:Hi,InvalidArgumentError:yt}=X(),{Help:ji}=we(),{Option:Ot}=$e();b.program=new Me;b.createCommand=e=>new Me(e);b.createOption=(e,t)=>new Ot(e,t);b.createArgument=(e,t)=>new xt(e,t);b.Command=Me;b.Option=Ot;b.Argument=xt;b.Help=ji;b.CommanderError=Hi;b.InvalidArgumentError=yt;b.InvalidOptionArgumentError=yt});var Xt=f((_u,Ge)=>{"use strict";var Kt=(e,t)=>{for(let n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};Ge.exports=Kt;Ge.exports.default=Kt});var Qt=f((Au,Fe)=>{"use strict";var ir=Xt(),pe=new WeakMap,Zt=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,i=0,r=e.displayName||e.name||"<anonymous>",u=function(...s){if(pe.set(u,++i),i===1)n=e.apply(this,s),e=null;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return n};return ir(u,e),pe.set(u,i),u};Fe.exports=Zt;Fe.exports.default=Zt;Fe.exports.callCount=e=>{if(!pe.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return pe.get(e)}});var en=f((Bu,me)=>{"use strict";me.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&me.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&me.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var sn=f((vu,W)=>{"use strict";var d=global.process,P=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};P(d)?(tn=require("assert"),j=en(),nn=/^win/i.test(d.platform),ee=require("events"),typeof ee!="function"&&(ee=ee.EventEmitter),d.__signal_exit_emitter__?E=d.__signal_exit_emitter__:(E=d.__signal_exit_emitter__=new ee,E.count=0,E.emitted={}),E.infinite||(E.setMaxListeners(1/0),E.infinite=!0),W.exports=function(e,t){if(!P(global.process))return function(){};tn.equal(typeof e,"function","a callback must be provided for exit handler"),q===!1&&Ue();var n="exit";t&&t.alwaysLast&&(n="afterexit");var i=function(){E.removeListener(n,e),E.listeners("exit").length===0&&E.listeners("afterexit").length===0&&de()};return E.on(n,e),i},de=function(){!q||!P(global.process)||(q=!1,j.forEach(function(t){try{d.removeListener(t,ge[t])}catch{}}),d.emit=Ce,d.reallyExit=Ye,E.count-=1)},W.exports.unload=de,R=function(t,n,i){E.emitted[t]||(E.emitted[t]=!0,E.emit(t,n,i))},ge={},j.forEach(function(e){ge[e]=function(){if(P(global.process)){var n=d.listeners(e);n.length===E.count&&(de(),R("exit",null,e),R("afterexit",null,e),nn&&e==="SIGHUP"&&(e="SIGINT"),d.kill(d.pid,e))}}}),W.exports.signals=function(){return j},q=!1,Ue=function(){q||!P(global.process)||(q=!0,E.count+=1,j=j.filter(function(t){try{return d.on(t,ge[t]),!0}catch{return!1}}),d.emit=un,d.reallyExit=rn)},W.exports.load=Ue,Ye=d.reallyExit,rn=function(t){P(global.process)&&(d.exitCode=t||0,R("exit",d.exitCode,null),R("afterexit",d.exitCode,null),Ye.call(d,d.exitCode))},Ce=d.emit,un=function(t,n){if(t==="exit"&&P(global.process)){n!==void 0&&(d.exitCode=n);var i=Ce.apply(this,arguments);return R("exit",d.exitCode,null),R("afterexit",d.exitCode,null),i}else return Ce.apply(this,arguments)}):W.exports=function(){return function(){}};var tn,j,nn,ee,E,de,R,ge,q,Ue,Ye,rn,Ce,un});var cn=f((Ou,ur)=>{ur.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var Ke=f((wu,fn)=>{"use strict";var _e=Object.assign({},cn()),hn=Object.keys(_e);Object.defineProperty(_e,"random",{get(){let e=Math.floor(Math.random()*hn.length),t=hn[e];return _e[t]}});fn.exports=_e});var vn=f((us,Bn)=>{"use strict";Bn.exports=An;An.sync=dr;var En=require("fs");function mr(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var i=0;i<n.length;i++){var r=n[i].toLowerCase();if(r&&e.substr(-r.length).toLowerCase()===r)return!0}return!1}function _n(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:mr(t,n)}function An(e,t,n){En.stat(e,function(i,r){n(i,i?!1:_n(r,e,t))})}function dr(e,t){return _n(En.statSync(e),e,t)}});var wn=f((ss,On)=>{"use strict";On.exports=xn;xn.sync=gr;var bn=require("fs");function xn(e,t,n){bn.stat(e,function(i,r){n(i,i?!1:yn(r,t))})}function gr(e,t){return yn(bn.statSync(e),t)}function yn(e,t){return e.isFile()&&Cr(e,t)}function Cr(e,t){var n=e.mode,i=e.uid,r=e.gid,u=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),o=parseInt("100",8),a=parseInt("010",8),D=parseInt("001",8),l=o|a,c=n&D||n&a&&r===s||n&o&&i===u||n&l&&u===0;return c}});var Tn=f((as,Sn)=>{"use strict";var os=require("fs"),Ae;process.platform==="win32"||global.TESTING_WINDOWS?Ae=vn():Ae=wn();Sn.exports=st;st.sync=Er;function st(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,r){st(e,t||{},function(u,s){u?r(u):i(s)})})}Ae(e,t||{},function(i,r){i&&(i.code==="EACCES"||t&&t.ignoreErrors)&&(i=null,r=!1),n(i,r)})}function Er(e,t){try{return Ae.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var Mn=f((Ds,Rn)=>{"use strict";var U=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",kn=require("path"),_r=U?";":":",$n=Tn(),Nn=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),In=(e,t)=>{let n=t.colon||_r,i=e.match(/\//)||U&&e.match(/\\/)?[""]:[...U?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],r=U?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",u=U?r.split(n):[""];return U&&e.indexOf(".")!==-1&&u[0]!==""&&u.unshift(""),{pathEnv:i,pathExt:u,pathExtExe:r}},Pn=(e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:i,pathExt:r,pathExtExe:u}=In(e,t),s=[],o=D=>new Promise((l,c)=>{if(D===i.length)return t.all&&s.length?l(s):c(Nn(e));let p=i[D],A=/^".*"$/.test(p)?p.slice(1,-1):p,h=kn.join(A,e),v=!A&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;l(a(v,D,0))}),a=(D,l,c)=>new Promise((p,A)=>{if(c===r.length)return p(o(l+1));let h=r[c];$n(D+h,{pathExt:u},(v,K)=>{if(!v&&K)if(t.all)s.push(D+h);else return p(D+h);return p(a(D,l,c+1))})});return n?o(0).then(D=>n(null,D),n):o(0)},Ar=(e,t)=>{t=t||{};let{pathEnv:n,pathExt:i,pathExtExe:r}=In(e,t),u=[];for(let s=0;s<n.length;s++){let o=n[s],a=/^".*"$/.test(o)?o.slice(1,-1):o,D=kn.join(a,e),l=!a&&/^\.[\\\/]/.test(e)?e.slice(0,2)+D:D;for(let c=0;c<i.length;c++){let p=l+i[c];try{if($n.sync(p,{pathExt:r}))if(t.all)u.push(p);else return p}catch{}}}if(t.all&&u.length)return u;if(t.nothrow)return null;throw Nn(e)};Rn.exports=Pn;Pn.sync=Ar});var Hn=f((ls,ot)=>{"use strict";var Vn=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};ot.exports=Vn;ot.exports.default=Vn});var Ln=f((cs,Wn)=>{"use strict";var jn=require("path"),Br=Mn(),vr=Hn();function qn(e,t){let n=e.options.env||process.env,i=process.cwd(),r=e.options.cwd!=null,u=r&&process.chdir!==void 0&&!process.chdir.disabled;if(u)try{process.chdir(e.options.cwd)}catch{}let s;try{s=Br.sync(e.command,{path:n[vr({env:n})],pathExt:t?jn.delimiter:void 0})}catch{}finally{u&&process.chdir(i)}return s&&(s=jn.resolve(r?e.options.cwd:"",s)),s}function br(e){return qn(e)||qn(e,!0)}Wn.exports=br});var Gn=f((hs,Dt)=>{"use strict";var at=/([()\][%!^"`<>&|;, *?])/g;function xr(e){return e=e.replace(at,"^$1"),e}function yr(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(at,"^$1"),t&&(e=e.replace(at,"^$1")),e}Dt.exports.command=xr;Dt.exports.argument=yr});var Yn=f((fs,Un)=>{"use strict";Un.exports=/^#!(.*)/});var Jn=f((ps,zn)=>{"use strict";var Or=Yn();zn.exports=(e="")=>{let t=e.match(Or);if(!t)return null;let[n,i]=t[0].replace(/#! ?/,"").split(" "),r=n.split("/").pop();return r==="env"?i:i?`${r} ${i}`:r}});var Xn=f((Fs,Kn)=>{"use strict";var lt=require("fs"),wr=Jn();function Sr(e){let n=Buffer.alloc(150),i;try{i=lt.openSync(e,"r"),lt.readSync(i,n,0,150,0),lt.closeSync(i)}catch{}return wr(n.toString())}Kn.exports=Sr});var ti=f((ms,ei)=>{"use strict";var Tr=require("path"),Zn=Ln(),Qn=Gn(),kr=Xn(),$r=process.platform==="win32",Nr=/\.(?:com|exe)$/i,Ir=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Pr(e){e.file=Zn(e);let t=e.file&&kr(e.file);return t?(e.args.unshift(e.file),e.command=t,Zn(e)):e.file}function Rr(e){if(!$r)return e;let t=Pr(e),n=!Nr.test(t);if(e.options.forceShell||n){let i=Ir.test(t);e.command=Tr.normalize(e.command),e.command=Qn.command(e.command),e.args=e.args.map(u=>Qn.argument(u,i));let r=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${r}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Mr(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let i={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?i:Rr(i)}ei.exports=Mr});var ri=f((ds,ii)=>{"use strict";var ct=process.platform==="win32";function ht(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Vr(e,t){if(!ct)return;let n=e.emit;e.emit=function(i,r){if(i==="exit"){let u=ni(r,t,"spawn");if(u)return n.call(e,"error",u)}return n.apply(e,arguments)}}function ni(e,t){return ct&&e===1&&!t.file?ht(t.original,"spawn"):null}function Hr(e,t){return ct&&e===1&&!t.file?ht(t.original,"spawnSync"):null}ii.exports={hookChildProcess:Vr,verifyENOENT:ni,verifyENOENTSync:Hr,notFoundError:ht}});var oi=f((gs,Y)=>{"use strict";var ui=require("child_process"),ft=ti(),pt=ri();function si(e,t,n){let i=ft(e,t,n),r=ui.spawn(i.command,i.args,i.options);return pt.hookChildProcess(r,i),r}function jr(e,t,n){let i=ft(e,t,n),r=ui.spawnSync(i.command,i.args,i.options);return r.error=r.error||pt.verifyENOENTSync(r.status,i),r}Y.exports=si;Y.exports.spawn=si;Y.exports.sync=jr;Y.exports._parse=ft;Y.exports._enoent=pt});var N=require("path"),gi=require("fs");var St=F(wt(),1),{program:Xr,createCommand:Zr,createArgument:Qr,createOption:eu,CommanderError:tu,InvalidArgumentError:nu,InvalidOptionArgumentError:iu,Command:Tt,Argument:ru,Option:kt,Help:uu}=St.default;var k=F(require("picocolors"),1),Ci=F(require("figlet"),1),Ei=F(require("prompts"),1);var $t={name:"create-vitnode-app",version:"0.0.7-canary.40",description:"Create a new VitNode app in seconds.",author:"VitNode Team",license:"MIT",homepage:"https://VitNode.com",repository:{type:"git",url:"git+https://github.com/aXenDeveloper/VitNode.git",directory:"packages/create-vitnode-app"},type:"module",bin:{"create-vitnode-app":"dist/index.cjs"},scripts:{lint:"eslint .","lint:fix":"eslint . --fix","build:scripts":"tsup index.ts","dev:script":"tsup index.ts --watch","start:script":"node dist/index.cjs"},dependencies:{figlet:"^1.7.0",picocolors:"^1.0.1",prompts:"^2.4.2","validate-npm-package-name":"^5.0.1"},devDependencies:{"@types/cross-spawn":"^6.0.6","@types/figlet":"^1.5.8","@types/node":"^20.14.11","@types/prompts":"^2.4.9","@types/validate-npm-package-name":"^4.0.2",commander:"^12.1.0","cross-spawn":"^7.0.3","eslint-config-typescript-vitnode":"workspace:*",ora:"^8.0.1",tsup:"^8.1.0",typescript:"^5.5.3"}};var Nt=F(require("validate-npm-package-name"),1),Ve=({name:e})=>{let t=(0,Nt.default)(e);return t.validForNewPackages?{valid:!0}:{valid:!1,problems:[...t.errors||[],...t.warnings||[]]}};var De=require("fs"),It=require("path"),He=F(require("picocolors"),1);function le(e,t){let n=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"],i=(0,De.readdirSync)(e).filter(r=>!n.includes(r)&&!r.endsWith(".iml"));if(i.length>0){console.log(`The directory ${He.default.green(t)} contains files that could conflict:
24
+ `);for(let r of i)try{(0,De.lstatSync)((0,It.join)(e,r)).isDirectory()?console.log(`${He.default.blue(r)}/`):console.log(`${r}`)}catch{console.log(`${r}`)}return console.log(`
25
25
  Either try using a new directory name, or remove the files listed above.
26
- `),!1}return!0}var ye=require("constants"),we=require("fs/promises");async function Ae(o){try{return await(0,we.access)(o,ye.W_OK),!0}catch{return!1}}var m=require("fs"),_=require("path"),te=v(require("picocolors"),1);var $=require("fs"),H=require("path"),xe=({appName:o,root:e,packageManager:t,docker:i})=>{let n=JSON.parse((0,$.readFileSync)((0,H.join)(__dirname,"..","package.json"),"utf-8")),s={name:o,version:"1.0.0",private:!0,scripts:{"config:init":"turbo config:init",dev:"turbo dev",build:"turbo build",lint:"turbo lint","lint:fix":"turbo lint:fix",...i?{"docker:dev":"docker compose -f ./docker-compose-dev.yml -p vitnode-development up -d"}:{}},overrides:t.startsWith("npm")?{react:"^19.0.0-rc.0","react-dom":"^19.0.0-rc.0"}:{},dependencies:{"drizzle-kit":"^0.22.8","drizzle-orm":"^0.31.4"},devDependencies:{"eslint-config-typescript-vitnode":`^${n.version}`,prettier:"^3.3.3","prettier-plugin-tailwindcss":"^0.6.5",turbo:"^2.0.7",typescript:"^5.4.5"},packageManager:t,workspaces:["apps/*"]};(0,$.writeFileSync)((0,H.join)(e,"package.json"),JSON.stringify(s,null,2));let r={name:"frontend",version:"1.0.0",private:!0,scripts:{"config:init":"vitnode-frontend init",dev:"vitnode-frontend init && next dev --turbo",build:"next build",start:"next start",lint:"eslint .","lint:fix":"eslint . --fix"},dependencies:{geist:"^1.3.1",next:"15.0.0-canary.72",react:"^19.0.0-rc.0","react-dom":"^19.0.0-rc.0","next-intl":"^3.17.1","vitnode-frontend":`^${n.version}`},devDependencies:{"@types/node":"^20.14.11","@types/react":"^18.3.3","@types/react-dom":"^18.3.0",autoprefixer:"^10.4.19",eslint:"^8.57.0","eslint-config-typescript-vitnode":`^${n.version}`,postcss:"^8.4.39",tailwindcss:"^3.4.4",typescript:"^5.5.3"}};(0,$.writeFileSync)((0,H.join)(e,"apps","frontend","package.json"),JSON.stringify(r,null,2));let l={name:"backend",version:"1.0.0",private:!0,scripts:{"config:init":"vitnode-backend init",dev:"vitnode-backend init && cross-env NODE_ENV=development nest start -w",build:"nest build",start:"node dist/main",lint:"eslint .","lint:fix":"eslint . --fix"},dependencies:{"@nestjs/common":"^10.3.10","@nestjs/core":"^10.3.10","@nestjs/graphql":"^12.2.0","@react-email/components":"^0.0.21",react:"^19.0.0-rc.0","react-dom":"^19.0.0-rc.0","reflect-metadata":"^0.2.2","vitnode-backend":`^${n.version}`},devDependencies:{"@nestjs/cli":"^10.4.2","@nestjs/platform-express":"^10.3.10","@nestjs/schematics":"^10.1.2","@types/express":"^4.17.21","@types/node":"^20.14.11","@types/pg":"^8.11.6","@types/react":"^18.3.3","cross-env":"^7.0.3","drizzle-kit":"^0.22.8","drizzle-orm":"^0.31.4",eslint:"^8.57.0","eslint-config-typescript-vitnode":`^${n.version}`,pg:"^8.12.0","source-map-support":"^0.5.21","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.5.3"}};(0,$.writeFileSync)((0,H.join)(e,"apps","backend","package.json"),JSON.stringify(l,null,2))};var ke=async({root:o,appName:e,packageManager:t,eslint:i,i18nRouting:n,docker:s})=>{let r=(0,_.join)(__dirname,"..","templates");if(console.log(`Creating a new VitNode app in ${te.default.green(o)}. Using ${te.default.green(t)}...
27
- `),(0,m.mkdirSync)(o,{recursive:!0}),F(o,e)||process.exit(1),process.chdir(o),(0,m.cpSync)((0,_.join)(r,"basic"),o,{recursive:!0}),xe({appName:e,root:o,packageManager:t,docker:s}),(0,m.renameSync)((0,_.join)(o,".gitignore_template"),(0,_.join)(o,".gitignore")),(0,m.renameSync)((0,_.join)(o,".npmrc_template"),(0,_.join)(o,".npmrc")),t.startsWith("pnpm")){let l=(0,_.join)(o,"apps","frontend","tailwind.config.ts"),c=(0,m.readFileSync)(l,"utf-8").replace("../../node_modules/vitnode-frontend/src/components/**/*.tsx","./node_modules/vitnode-frontend/src/components/**/*.tsx").replace("../../node_modules/vitnode-frontend/src/views/**/*.tsx","./node_modules/vitnode-frontend/src/views/**/*.tsx");(0,m.writeFileSync)(l,c)}t.startsWith("pnpm")&&(0,m.cpSync)((0,_.join)(r,"pnpm"),o,{recursive:!0}),i&&(0,m.cpSync)((0,_.join)(r,"eslint"),o,{recursive:!0}),(0,m.cpSync)(n?(0,_.join)(r,"i18n","with"):(0,_.join)(r,"i18n","without"),o,{recursive:!0})};var E=v(require("picocolors"),1),S=v(require("prompts"),1);var $e=require("child_process"),ie=async o=>new Promise(e=>{(0,$e.exec)(o,(t,i,n)=>{t&&e(void 0),e((i||n).replace(/\s+/g,""))})}),Ee=async()=>{let[o,e,t]=await Promise.all([ie("yarnpkg --version"),ie("npm --version"),ie("pnpm --version")]);return{yarn:o,pnpm:t,npm:e}};var k=o=>{o.aborted&&(process.stdout.write("\x1B[?25h"),process.stdout.write(`
28
- `),process.exit(1))},Se=async o=>{let e=o.opts(),t={packageManager:e.packageManager,eslint:e.eslint,i18nRouting:e.i18nRouting,install:!e.skipInstall,docker:e.docker};if(!e.packageManager){let i=await Ee(),n=E.default.blue("package manager"),{packageManager:s}=await(0,S.default)({onState:k,name:"packageManager",type:"select",message:`Which ${n} do you want to use?`,initial:e.packageManager,choices:[{title:`npm${i.npm?`@${i.npm}`:""}`,value:"npm",disabled:!i.npm},{title:`pnpm${i.pnpm?`@${i.pnpm}`:""}`,value:"pnpm",disabled:!i.pnpm},{title:`yarn${i.yarn?`@${i.yarn}`:""}`,value:"yarn",disabled:!i.yarn}]});t={...t,packageManager:`${s}@${i[s]}`}}if(e.eslint===void 0){let i=E.default.blue("ESLint"),{eslint:n}=await(0,S.default)({onState:k,type:"toggle",name:"eslint",message:`Would you like to use ${i}?`,initial:e.eslint?"Yes":"No",active:"Yes",inactive:"No"});t={...t,eslint:!!n}}if(e.i18nRouting===void 0){let i=E.default.blue("i18n routing"),{i18nRouting:n}=await(0,S.default)({onState:k,type:"toggle",name:"i18nRouting",message:`Would you like to use ${i}?`,initial:e.i18nRouting?"Yes":"No",active:"Yes",inactive:"No"});t={...t,i18nRouting:!!n}}if(e.docker===void 0){let i=E.default.blue("Dockerfile & Docker Compose"),{docker:n}=await(0,S.default)({onState:k,type:"toggle",name:"docker",message:`Would you like to create ${i}?`,initial:e.i18nRouting?"Yes":"No",active:"Yes",inactive:"No"});t={...t,docker:!!n}}if(e.skipInstall===void 0){let i=E.default.blue("Install dependencies"),{install:n}=await(0,S.default)({onState:k,type:"toggle",name:"install",message:`Would you like to ${i}?`,initial:e.eslint?"Yes":"No",active:"Yes",inactive:"No"});t={...t,install:!!n}}return console.log("program",t),t};var N="",O=new _e().version(Oe.version).argument("[project-directory]").usage(`${b.default.green("[project-directory]")} [options]`).action(o=>{N=o});O.addOption(new be("-pm, --package-manager <package-manager>","Specify the package manager to use").choices(["npm","pnpm","yarn"]));O.option("--eslint","Initialize with eslint config.");O.option("--docker","Initialize with Dockerfile & Docker Compose.");O.option("--no-eslint","Initialize without eslint config.");O.option("--i18n-routing","Initialize with i18n routing.");O.option("--skip-install","Skip installing packages after initializing the project.");O.parse(process.argv);(async()=>{if(console.log(b.default.blue(He.default.textSync("VitNode",{horizontalLayout:"full"}))),!N){let l=await(0,Ne.default)({onState:k,type:"text",name:"path",message:"What is your project named?",initial:"my-vitnode",validate:a=>{let c=Z({name:(0,C.basename)((0,C.resolve)(a))});return c.valid?!0:`Invalid project name: ${c.problems[0]}`}});typeof l.path=="string"&&(N=l.path.trim())}N||(console.log(`
26
+ `),!1}return!0}var Pt=require("constants"),Rt=require("fs/promises");async function Mt(e){try{return await(0,Rt.access)(e,Pt.W_OK),!0}catch{return!1}}var _=require("fs"),B=require("path");var ie=F(require("process"),1);var Vt=(e=0)=>t=>`\x1B[${t+e}m`,Ht=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,jt=(e=0)=>(t,n,i)=>`\x1B[${38+e};2;${t};${n};${i}m`,m={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},cu=Object.keys(m.modifier),Wi=Object.keys(m.color),Li=Object.keys(m.bgColor),hu=[...Wi,...Li];function Gi(){let e=new Map;for(let[t,n]of Object.entries(m)){for(let[i,r]of Object.entries(n))m[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=m[i],e.set(r[0],r[1]);Object.defineProperty(m,t,{value:n,enumerable:!1})}return Object.defineProperty(m,"codes",{value:e,enumerable:!1}),m.color.close="\x1B[39m",m.bgColor.close="\x1B[49m",m.color.ansi=Vt(),m.color.ansi256=Ht(),m.color.ansi16m=jt(),m.bgColor.ansi=Vt(10),m.bgColor.ansi256=Ht(10),m.bgColor.ansi16m=jt(10),Object.defineProperties(m,{rgbToAnsi256:{value(t,n,i){return t===n&&n===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[i]=n;i.length===3&&(i=[...i].map(u=>u+u).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>m.rgbToAnsi256(...m.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,i,r;if(t>=232)n=((t-232)*10+8)/255,i=n,r=n;else{t-=16;let o=t%36;n=Math.floor(t/36)/5,i=Math.floor(o/6)/5,r=o%6/5}let u=Math.max(n,i,r)*2;if(u===0)return 30;let s=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));return u===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,n,i)=>m.ansi256ToAnsi(m.rgbToAnsi256(t,n,i)),enumerable:!1},hexToAnsi:{value:t=>m.ansi256ToAnsi(m.hexToAnsi256(t)),enumerable:!1}}),m}var Ui=Gi(),O=Ui;var he=F(require("process"),1),Wt=F(require("os"),1),je=F(require("tty"),1);function x(e,t=globalThis.Deno?globalThis.Deno.args:he.default.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(n+e),r=t.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:g}=he.default,ce;x("no-color")||x("no-colors")||x("color=false")||x("color=never")?ce=0:(x("color")||x("colors")||x("color=true")||x("color=always"))&&(ce=1);function Yi(){if("FORCE_COLOR"in g)return g.FORCE_COLOR==="true"?1:g.FORCE_COLOR==="false"?0:g.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(g.FORCE_COLOR,10),3)}function zi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Ji(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let i=Yi();i!==void 0&&(ce=i);let r=n?ce:i;if(r===0)return 0;if(n){if(x("color=16m")||x("color=full")||x("color=truecolor"))return 3;if(x("color=256"))return 2}if("TF_BUILD"in g&&"AGENT_NAME"in g)return 1;if(e&&!t&&r===void 0)return 0;let u=r||0;if(g.TERM==="dumb")return u;if(he.default.platform==="win32"){let s=Wt.default.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in g)return"GITHUB_ACTIONS"in g||"GITEA_ACTIONS"in g?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in g)||g.CI_NAME==="codeship"?1:u;if("TEAMCITY_VERSION"in g)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(g.TEAMCITY_VERSION)?1:0;if(g.COLORTERM==="truecolor"||g.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in g){let s=Number.parseInt((g.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(g.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(g.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(g.TERM)||"COLORTERM"in g?1:u}function qt(e,t={}){let n=Ji(e,{streamIsTTY:e&&e.isTTY,...t});return zi(n)}var Ki={stdout:qt({isTTY:je.default.isatty(1)}),stderr:qt({isTTY:je.default.isatty(2)})},Lt=Ki;function Gt(e,t,n){let i=e.indexOf(t);if(i===-1)return e;let r=t.length,u=0,s="";do s+=e.slice(u,i)+t+n,u=i+r,i=e.indexOf(t,u);while(i!==-1);return s+=e.slice(u),s}function Ut(e,t,n,i){let r=0,u="";do{let s=e[i-1]==="\r";u+=e.slice(r,s?i-1:i)+t+(s?`\r
27
+ `:`
28
+ `)+n,r=i+1,i=e.indexOf(`
29
+ `,r)}while(i!==-1);return u+=e.slice(r),u}var{stdout:Yt,stderr:zt}=Lt,qe=Symbol("GENERATOR"),V=Symbol("STYLER"),Z=Symbol("IS_EMPTY"),Jt=["ansi","ansi","ansi256","ansi16m"],H=Object.create(null),Xi=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=Yt?Yt.level:0;e.level=t.level===void 0?n:t.level};var Zi=e=>{let t=(...n)=>n.join(" ");return Xi(t,e),Object.setPrototypeOf(t,Q.prototype),t};function Q(e){return Zi(e)}Object.setPrototypeOf(Q.prototype,Function.prototype);for(let[e,t]of Object.entries(O))H[e]={get(){let n=fe(this,Le(t.open,t.close,this[V]),this[Z]);return Object.defineProperty(this,e,{value:n}),n}};H.visible={get(){let e=fe(this,this[V],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var We=(e,t,n,...i)=>e==="rgb"?t==="ansi16m"?O[n].ansi16m(...i):t==="ansi256"?O[n].ansi256(O.rgbToAnsi256(...i)):O[n].ansi(O.rgbToAnsi(...i)):e==="hex"?We("rgb",t,n,...O.hexToRgb(...i)):O[n][e](...i),Qi=["rgb","hex","ansi256"];for(let e of Qi){H[e]={get(){let{level:n}=this;return function(...i){let r=Le(We(e,Jt[n],"color",...i),O.color.close,this[V]);return fe(this,r,this[Z])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);H[t]={get(){let{level:n}=this;return function(...i){let r=Le(We(e,Jt[n],"bgColor",...i),O.bgColor.close,this[V]);return fe(this,r,this[Z])}}}}var er=Object.defineProperties(()=>{},{...H,level:{enumerable:!0,get(){return this[qe].level},set(e){this[qe].level=e}}}),Le=(e,t,n)=>{let i,r;return n===void 0?(i=e,r=t):(i=n.openAll+e,r=t+n.closeAll),{open:e,close:t,openAll:i,closeAll:r,parent:n}},fe=(e,t,n)=>{let i=(...r)=>tr(i,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(i,er),i[qe]=e,i[V]=t,i[Z]=n,i},tr=(e,t)=>{if(e.level<=0||!t)return e[Z]?"":t;let n=e[V];if(n===void 0)return t;let{openAll:i,closeAll:r}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=Gt(t,n.close,n.open),n=n.parent;let u=t.indexOf(`
30
+ `);return u!==-1&&(t=Ut(t,r,i,u)),i+t+r};Object.defineProperties(Q.prototype,H);var nr=Q(),Cu=Q({level:zt?zt.level:0});var w=nr;var ze=F(require("process"),1);var on=F(require("process"),1),an=F(Qt(),1),Dn=F(sn(),1),rr=(0,an.default)(()=>{(0,Dn.default)(()=>{on.default.stderr.write("\x1B[?25h")},{alwaysLast:!0})}),ln=rr;var Ee=!1,L={};L.show=(e=ze.default.stderr)=>{e.isTTY&&(Ee=!1,e.write("\x1B[?25h"))};L.hide=(e=ze.default.stderr)=>{e.isTTY&&(ln(),Ee=!0,e.write("\x1B[?25l"))};L.toggle=(e,t)=>{e!==void 0&&(Ee=e),Ee?L.show(t):L.hide(t)};var Je=L;var re=F(Ke(),1);var y=F(require("process"),1);function Xe(){return y.default.platform!=="win32"?y.default.env.TERM!=="linux":!!y.default.env.CI||!!y.default.env.WT_SESSION||!!y.default.env.TERMINUS_SUBLIME||y.default.env.ConEmuTask==="{cmd::Cmder}"||y.default.env.TERM_PROGRAM==="Terminus-Sublime"||y.default.env.TERM_PROGRAM==="vscode"||y.default.env.TERM==="xterm-256color"||y.default.env.TERM==="alacritty"||y.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var sr={info:w.blue("\u2139"),success:w.green("\u2714"),warning:w.yellow("\u26A0"),error:w.red("\u2716")},or={info:w.blue("i"),success:w.green("\u221A"),warning:w.yellow("\u203C"),error:w.red("\xD7")},ar=Xe()?sr:or,te=ar;function Ze({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var Dr=Ze();function ne(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Dr,"")}function pn(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Fn(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function mn(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function lr(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function dn(e,{ambiguousAsWide:t=!1}={}){return lr(e),Fn(e)||mn(e)||t&&pn(e)?2:1}var gn=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;var cr=new Intl.Segmenter,hr=/^\p{Default_Ignorable_Code_Point}$/u;function Qe(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:i=!1}=t;if(i||(e=ne(e)),e.length===0)return 0;let r=0,u={ambiguousAsWide:!n};for(let{segment:s}of cr.segment(e)){let o=s.codePointAt(0);if(!(o<=31||o>=127&&o<=159)&&!(o>=8203&&o<=8207||o===65279)&&!(o>=768&&o<=879||o>=6832&&o<=6911||o>=7616&&o<=7679||o>=8400&&o<=8447||o>=65056&&o<=65071)&&!(o>=55296&&o<=57343)&&!(o>=65024&&o<=65039)&&!hr.test(s)){if(gn().test(s)){r+=2;continue}r+=dn(o,u)}}return r}function et({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var S=F(require("process"),1);function tt(){return S.default.platform!=="win32"?S.default.env.TERM!=="linux":!!S.default.env.WT_SESSION||!!S.default.env.TERMINUS_SUBLIME||S.default.env.ConEmuTask==="{cmd::Cmder}"||S.default.env.TERM_PROGRAM==="Terminus-Sublime"||S.default.env.TERM_PROGRAM==="vscode"||S.default.env.TERM==="xterm-256color"||S.default.env.TERM==="alacritty"||S.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var T=F(require("process"),1),fr=3,nt=class{#n=0;start(){this.#n++,this.#n===1&&this.#c()}stop(){if(this.#n<=0)throw new Error("`stop` called more times than `start`");this.#n--,this.#n===0&&this.#l()}#c(){T.default.platform==="win32"||!T.default.stdin.isTTY||(T.default.stdin.setRawMode(!0),T.default.stdin.on("data",this.#i),T.default.stdin.resume())}#l(){T.default.stdin.isTTY&&(T.default.stdin.off("data",this.#i),T.default.stdin.pause(),T.default.stdin.setRawMode(!1))}#i(t){t[0]===fr&&T.default.emit("SIGINT")}},pr=new nt,it=pr;var Fr=F(Ke(),1),rt=class{#n=0;#c=!1;#l=0;#i=0;#e;#s;#t;#h;#p;#o;#a;#D;#F;#r;#u;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#e={color:"cyan",stream:ie.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#e.color,this.spinner=this.#e.spinner,this.#p=this.#e.interval,this.#t=this.#e.stream,this.#o=typeof this.#e.isEnabled=="boolean"?this.#e.isEnabled:et({stream:this.#t}),this.#a=typeof this.#e.isSilent=="boolean"?this.#e.isSilent:!1,this.text=this.#e.text,this.prefixText=this.#e.prefixText,this.suffixText=this.#e.suffixText,this.indent=this.#e.indent,ie.default.env.NODE_ENV==="test"&&(this._stream=this.#t,this._isEnabled=this.#o,Object.defineProperty(this,"_linesToClear",{get(){return this.#n},set(n){this.#n=n}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#i}}),Object.defineProperty(this,"_lineCount",{get(){return this.#l}}))}get indent(){return this.#D}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#D=t,this.#f()}get interval(){return this.#p??this.#s.interval??100}get spinner(){return this.#s}set spinner(t){if(this.#i=0,this.#p=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#s=t}else if(!tt())this.#s=re.default.line;else if(t===void 0)this.#s=re.default.dots;else if(t!=="default"&&re.default[t])this.#s=re.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#F}set text(t=""){this.#F=t,this.#f()}get prefixText(){return this.#r}set prefixText(t=""){this.#r=t,this.#f()}get suffixText(){return this.#u}set suffixText(t=""){this.#u=t,this.#f()}get isSpinning(){return this.#h!==void 0}#m(t=this.#r,n=" "){return typeof t=="string"&&t!==""?t+n:typeof t=="function"?t()+n:""}#d(t=this.#u,n=" "){return typeof t=="string"&&t!==""?n+t:typeof t=="function"?n+t():""}#f(){let t=this.#t.columns??80,n=this.#m(this.#r,"-"),i=this.#d(this.#u,"-"),r=" ".repeat(this.#D)+n+"--"+this.#F+"--"+i;this.#l=0;for(let u of ne(r).split(`
31
+ `))this.#l+=Math.max(1,Math.ceil(Qe(u,{countAnsiEscapeCodes:!0})/t))}get isEnabled(){return this.#o&&!this.#a}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#o=t}get isSilent(){return this.#a}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#a=t}frame(){let{frames:t}=this.#s,n=t[this.#i];this.color&&(n=w[this.color](n)),this.#i=++this.#i%t.length;let i=typeof this.#r=="string"&&this.#r!==""?this.#r+" ":"",r=typeof this.text=="string"?" "+this.text:"",u=typeof this.#u=="string"&&this.#u!==""?" "+this.#u:"";return i+n+r+u}clear(){if(!this.#o||!this.#t.isTTY)return this;this.#t.cursorTo(0);for(let t=0;t<this.#n;t++)t>0&&this.#t.moveCursor(0,-1),this.#t.clearLine(1);return(this.#D||this.lastIndent!==this.#D)&&this.#t.cursorTo(this.#D),this.lastIndent=this.#D,this.#n=0,this}render(){return this.#a?this:(this.clear(),this.#t.write(this.frame()),this.#n=this.#l,this)}start(t){return t&&(this.text=t),this.#a?this:this.#o?this.isSpinning?this:(this.#e.hideCursor&&Je.hide(this.#t),this.#e.discardStdin&&ie.default.stdin.isTTY&&(this.#c=!0,it.start()),this.render(),this.#h=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#t.write(`- ${this.text}
32
+ `),this)}stop(){return this.#o?(clearInterval(this.#h),this.#h=void 0,this.#i=0,this.clear(),this.#e.hideCursor&&Je.show(this.#t),this.#e.discardStdin&&ie.default.stdin.isTTY&&this.#c&&(it.stop(),this.#c=!1),this):this}succeed(t){return this.stopAndPersist({symbol:te.success,text:t})}fail(t){return this.stopAndPersist({symbol:te.error,text:t})}warn(t){return this.stopAndPersist({symbol:te.warning,text:t})}info(t){return this.stopAndPersist({symbol:te.info,text:t})}stopAndPersist(t={}){if(this.#a)return this;let n=t.prefixText??this.#r,i=this.#m(n," "),r=t.symbol??" ",u=t.text??this.text,s=typeof u=="string"?" "+u:"",o=t.suffixText??this.#u,a=this.#d(o," "),D=i+r+s+a+`
33
+ `;return this.stop(),this.#t.write(D),this}};function ut(e){return new rt(e)}var Be=F(require("picocolors"),1);var G=require("fs"),ue=require("path"),Cn=({appName:e,root:t,packageManager:n,docker:i,eslint:r})=>{let u=JSON.parse((0,G.readFileSync)((0,ue.join)(__dirname,"..","package.json"),"utf-8")),s={name:e,version:"1.0.0",private:!0,scripts:{"config:init":"turbo config:init",dev:"turbo dev",build:"turbo build",...r?{lint:"turbo lint","lint:fix":"turbo lint:fix"}:{},...i?{"docker:dev":`docker compose -f ./docker-compose-dev.yml -p vitnode-dev-${e} up -d`}:{}},overrides:n.startsWith("npm")?{react:"^19.0.0-rc.0","react-dom":"^19.0.0-rc.0"}:{},dependencies:{"drizzle-kit":"^0.22.8","drizzle-orm":"^0.31.4"},devDependencies:{...r?{prettier:"^3.3.3","prettier-plugin-tailwindcss":"^0.6.5"}:{},"eslint-config-typescript-vitnode":`^${u.version}`,turbo:"^2.0.7",typescript:"^5.4.5"},packageManager:n,workspaces:["apps/*"]};(0,G.writeFileSync)((0,ue.join)(t,"package.json"),JSON.stringify(s,null,2));let o={name:"frontend",version:"1.0.0",private:!0,scripts:{"config:init":"vitnode-frontend init",dev:"vitnode-frontend init && next dev --turbo",build:"next build",start:"next start",lint:"eslint .","lint:fix":"eslint . --fix"},dependencies:{geist:"^1.3.1",next:"15.0.0-canary.72",react:"^19.0.0-rc.0","react-dom":"^19.0.0-rc.0","next-intl":"^3.17.1","vitnode-frontend":`^${u.version}`},devDependencies:{"@types/node":"^20.14.11","@types/react":"^18.3.3","@types/react-dom":"^18.3.0",autoprefixer:"^10.4.19",...r?{eslint:"^8.57.0"}:{},"eslint-config-typescript-vitnode":`^${u.version}`,postcss:"^8.4.39",tailwindcss:"^3.4.4",typescript:"^5.5.3"}};(0,G.writeFileSync)((0,ue.join)(t,"apps","frontend","package.json"),JSON.stringify(o,null,2));let a={name:"backend",version:"1.0.0",private:!0,scripts:{"config:init":"vitnode-backend init",dev:"vitnode-backend init && cross-env NODE_ENV=development nest start -w",build:"nest build",start:"node dist/main",lint:"eslint .","lint:fix":"eslint . --fix"},dependencies:{"@nestjs/common":"^10.3.10","@nestjs/core":"^10.3.10","@nestjs/graphql":"^12.2.0","@react-email/components":"^0.0.21",react:"^19.0.0-rc.0","react-dom":"^19.0.0-rc.0","reflect-metadata":"^0.2.2","vitnode-backend":`^${u.version}`},devDependencies:{"@nestjs/cli":"^10.4.2","@nestjs/platform-express":"^10.3.10","@nestjs/schematics":"^10.1.2","@types/express":"^4.17.21","@types/node":"^20.14.11","@types/pg":"^8.11.6","@types/react":"^18.3.3","cross-env":"^7.0.3","drizzle-kit":"^0.22.8","drizzle-orm":"^0.31.4",...r?{eslint:"^8.57.0"}:{},"eslint-config-typescript-vitnode":`^${u.version}`,pg:"^8.12.0","source-map-support":"^0.5.21","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.5.3"}};(0,G.writeFileSync)((0,ue.join)(t,"apps","backend","package.json"),JSON.stringify(a,null,2))};var ci=F(require("picocolors"),1),hi=F(oi(),1);var ai=require("child_process"),Ft=require("dns/promises"),Di=F(require("url"),1);function qr(){if(process.env.https_proxy)return process.env.https_proxy;try{let e=(0,ai.execSync)("npm config get https-proxy").toString().trim();return e!=="null"?e:void 0}catch{return}}async function li(){try{return await(0,Ft.lookup)("registry.yarnpkg.com"),!0}catch{let e=qr();if(!e)return!1;let{hostname:t}=Di.default.parse(e);if(!t)return!1;try{return await(0,Ft.lookup)(t),!0}catch{return!1}}}var fi=async({packageManager:e})=>{let t=await li(),n=["install"];return console.log("Installing packages...",e),t||(console.log(ci.default.yellow(`You appear to be offline.
34
+ Falling back to the local cache.`)),n.push("--offline")),new Promise((i,r)=>{(0,hi.default)(e,n,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}}).on("close",s=>{if(s!==0){r({command:`${e} ${n.join(" ")}`});return}i()})})};var pi=async({root:e,appName:t,packageManager:n,eslint:i,i18nRouting:r,docker:u,install:s})=>{let o=(0,B.join)(__dirname,"..","templates"),a=ut(`Creating a new VitNode app in ${Be.default.green(e)}. Using ${Be.default.green(n)}...`).start();if((0,_.mkdirSync)(e,{recursive:!0}),le(e,t)||process.exit(1),process.chdir(e),a.text="Copying files...",(0,_.cpSync)((0,B.join)(o,"basic"),e,{recursive:!0}),a.text="Creating package.json...",Cn({appName:t,root:e,packageManager:n,docker:u,eslint:i}),a.text="Renaming files...",(0,_.renameSync)((0,B.join)(e,".gitignore_template"),(0,B.join)(e,".gitignore")),(0,_.renameSync)((0,B.join)(e,".npmrc_template"),(0,B.join)(e,".npmrc")),a.text="Changing tailwind.config.ts...",n.startsWith("pnpm")){let D=(0,B.join)(e,"apps","frontend","tailwind.config.ts"),c=(0,_.readFileSync)(D,"utf-8").replace("../../node_modules/vitnode-frontend/src/components/**/*.tsx","./node_modules/vitnode-frontend/src/components/**/*.tsx").replace("../../node_modules/vitnode-frontend/src/views/**/*.tsx","./node_modules/vitnode-frontend/src/views/**/*.tsx");(0,_.writeFileSync)(D,c)}n.startsWith("pnpm")&&(a.text="Copying pnpm template...",(0,_.cpSync)((0,B.join)(o,"pnpm"),e,{recursive:!0})),i&&(a.text="Copying eslint template...",(0,_.cpSync)((0,B.join)(o,"eslint"),e,{recursive:!0})),u&&(a.text="Copying docker template...",(0,_.cpSync)((0,B.join)(o,"docker"),e,{recursive:!0})),a.text="Copying i18n template...",(0,_.cpSync)(r?(0,B.join)(o,"i18n","with"):(0,B.join)(o,"i18n","without"),e,{recursive:!0}),s&&(a.text="Installing dependencies...",await fi({packageManager:n})),a.succeed(Be.default.green("Done!"))};var z=F(require("picocolors"),1),J=F(require("prompts"),1);var Fi=require("child_process"),mt=async e=>new Promise(t=>{(0,Fi.exec)(e,(n,i,r)=>{n&&t(void 0),t((i||r).replace(/\s+/g,""))})}),mi=async()=>{let[e,t,n]=await Promise.all([mt("yarnpkg --version"),mt("npm --version"),mt("pnpm --version")]);return{yarn:e,pnpm:n,npm:t}};var M=e=>{e.aborted&&(process.stdout.write("\x1B[?25h"),process.stdout.write(`
35
+ `),process.exit(1))},di=async e=>{let t=e.opts(),n={packageManager:t.packageManager,eslint:t.eslint,i18nRouting:t.i18nRouting,install:!t.skipInstall,docker:t.docker};if(!t.packageManager){let i=await mi(),r=z.default.blue("package manager"),{packageManager:u}=await(0,J.default)({onState:M,name:"packageManager",type:"select",message:`Which ${r} do you want to use?`,initial:t.packageManager,choices:[{title:`npm${i.npm?`@${i.npm}`:""}`,value:"npm",disabled:!i.npm},{title:`pnpm${i.pnpm?`@${i.pnpm}`:""}`,value:"pnpm",disabled:!i.pnpm},{title:`yarn${i.yarn?`@${i.yarn}`:""}`,value:"yarn",disabled:!i.yarn}]});n={...n,packageManager:`${u}@${i[u]}`}}if(t.eslint===void 0){let i=z.default.blue("ESLint"),{eslint:r}=await(0,J.default)({onState:M,type:"toggle",name:"eslint",message:`Would you like to use ${i}?`,initial:t.eslint?"Yes":"No",active:"Yes",inactive:"No"});n={...n,eslint:!!r}}if(t.i18nRouting===void 0){let i=z.default.blue("i18n routing"),{i18nRouting:r}=await(0,J.default)({onState:M,type:"toggle",name:"i18nRouting",message:`Would you like to use ${i}?`,initial:t.i18nRouting?"Yes":"No",active:"Yes",inactive:"No"});n={...n,i18nRouting:!!r}}if(t.docker===void 0){let i=z.default.blue("Dockerfile & Docker Compose"),{docker:r}=await(0,J.default)({onState:M,type:"toggle",name:"docker",message:`Would you like to create ${i}?`,initial:t.i18nRouting?"Yes":"No",active:"Yes",inactive:"No"});n={...n,docker:!!r}}if(t.skipInstall===void 0){let i=z.default.blue("Install dependencies"),{install:r}=await(0,J.default)({onState:M,type:"toggle",name:"install",message:`Would you like to ${i}?`,initial:t.eslint?"Yes":"No",active:"Yes",inactive:"No"});n={...n,install:!!r}}return n};var se="",$=new Tt().version($t.version).argument("[project-directory]").usage(`${k.default.green("[project-directory]")} [options]`).action(e=>{se=e});$.addOption(new kt("-pm, --package-manager <package-manager>","Specify the package manager to use").choices(["npm","pnpm","yarn"]));$.option("--eslint","Initialize with eslint config.");$.option("--docker","Initialize with Dockerfile & Docker Compose.");$.option("--no-eslint","Initialize without eslint config.");$.option("--i18n-routing","Initialize with i18n routing.");$.option("--skip-install","Skip installing packages after initializing the project.");$.parse(process.argv);(async()=>{if(console.log(k.default.blue(Ci.default.textSync("VitNode",{horizontalLayout:"full"}))),!se){let o=await(0,Ei.default)({onState:M,type:"text",name:"path",message:"What is your project named?",initial:"my-vitnode",validate:a=>{let D=Ve({name:(0,N.basename)((0,N.resolve)(a))});return D.valid?!0:`Invalid project name: ${D.problems[0]}`}});typeof o.path=="string"&&(se=o.path.trim())}se||(console.log(`
29
36
  Please specify the project directory:
30
- ${b.default.cyan(O.name())} ${b.default.green("<project-directory>")}
37
+ ${k.default.cyan($.name())} ${k.default.green("<project-directory>")}
31
38
  For example:
32
- ${b.default.cyan(O.name())} ${b.default.green("my-vitnode-app")}
39
+ ${k.default.cyan($.name())} ${k.default.green("my-vitnode-app")}
33
40
 
34
- Run ${b.default.cyan(`${O.name()} --help`)} to see all options.`),process.exit(1));let o=(0,C.resolve)(N),e=(0,C.basename)(o),t=Z({name:e});t.valid||(console.error(`Could not create a project called ${b.default.red(`"${e}"`)} because of npm naming restrictions:`),t.problems.forEach(l=>console.error(`${b.default.red(b.default.bold("*"))} ${l}`)),process.exit(1));let i=(0,C.resolve)(o),n=(0,C.basename)(i);(0,Ve.existsSync)(i)&&!F(i,n)&&(console.error("The specified directory is not empty."),process.exit(1)),await Ae((0,C.dirname)(i))||(console.error("The application path is not writable, please check folder permissions and try again."),console.error("It is likely you do not have write permissions for this folder."),process.exit(1));let r=await Se(O);await ke({root:i,appName:n,...r})})();
41
+ Run ${k.default.cyan(`${$.name()} --help`)} to see all options.`),process.exit(1));let e=(0,N.resolve)(se),t=(0,N.basename)(e),n=Ve({name:t});n.valid||(console.error(`Could not create a project called ${k.default.red(`"${t}"`)} because of npm naming restrictions:`),n.problems.forEach(o=>console.error(`${k.default.red(k.default.bold("*"))} ${o}`)),process.exit(1));let i=(0,N.resolve)(e),r=(0,N.basename)(i);(0,gi.existsSync)(i)&&!le(i,r)&&(console.error("The specified directory is not empty."),process.exit(1)),await Mt((0,N.dirname)(i))||(console.error("The application path is not writable, please check folder permissions and try again."),console.error("It is likely you do not have write permissions for this folder."),process.exit(1));let s=await di($);await pi({root:i,appName:r,...s})})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vitnode-app",
3
- "version": "0.0.7-canary.40",
3
+ "version": "0.0.7-canary.41",
4
4
  "description": "Create a new VitNode app in seconds.",
5
5
  "author": "VitNode Team",
6
6
  "license": "MIT",
@@ -21,14 +21,17 @@
21
21
  "validate-npm-package-name": "^5.0.1"
22
22
  },
23
23
  "devDependencies": {
24
+ "@types/cross-spawn": "^6.0.6",
24
25
  "@types/figlet": "^1.5.8",
25
26
  "@types/node": "^20.14.11",
26
27
  "@types/prompts": "^2.4.9",
27
28
  "@types/validate-npm-package-name": "^4.0.2",
28
29
  "commander": "^12.1.0",
30
+ "cross-spawn": "^7.0.3",
31
+ "ora": "^8.0.1",
29
32
  "tsup": "^8.1.0",
30
33
  "typescript": "^5.5.3",
31
- "eslint-config-typescript-vitnode": "0.0.7-canary.40"
34
+ "eslint-config-typescript-vitnode": "0.0.7-canary.41"
32
35
  },
33
36
  "scripts": {
34
37
  "lint": "eslint .",
@@ -0,0 +1,52 @@
1
+ import color from 'picocolors';
2
+ import spawn from 'cross-spawn';
3
+
4
+ import { CreateCliReturn } from '../cli';
5
+ import { getOnline } from '../helpers/is-online';
6
+
7
+ export const installDependencies = async ({
8
+ packageManager,
9
+ }: Pick<CreateCliReturn, 'packageManager'>) => {
10
+ const isOnline = await getOnline();
11
+ const args: string[] = ['install'];
12
+ console.log('Installing packages...', packageManager);
13
+
14
+ if (!isOnline) {
15
+ console.log(
16
+ color.yellow(
17
+ 'You appear to be offline.\nFalling back to the local cache.',
18
+ ),
19
+ );
20
+ args.push('--offline');
21
+ }
22
+
23
+ /**
24
+ * Return a Promise that resolves once the installation is finished.
25
+ */
26
+ return new Promise<void>((resolve, reject) => {
27
+ /**
28
+ * Spawn the installation process.
29
+ */
30
+ const child = spawn(packageManager, args, {
31
+ stdio: 'inherit',
32
+ env: {
33
+ ...process.env,
34
+ ADBLOCK: '1',
35
+ // we set NODE_ENV to development as pnpm skips dev
36
+ // dependencies when production
37
+ NODE_ENV: 'development',
38
+ DISABLE_OPENCOLLECTIVE: '1',
39
+ },
40
+ });
41
+ child.on('close', code => {
42
+ if (code !== 0) {
43
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
44
+ reject({ command: `${packageManager} ${args.join(' ')}` });
45
+
46
+ return;
47
+ }
48
+
49
+ resolve();
50
+ });
51
+ });
52
+ };
@@ -1,160 +0,0 @@
1
- import { readFileSync, writeFileSync } from 'fs';
2
- import { join } from 'path';
3
-
4
- interface PackageJSON {
5
- name: string;
6
- private: boolean;
7
- version: string;
8
- dependencies?: Record<string, string>;
9
- devDependencies?: Record<string, string>;
10
- overrides?: Record<string, string>;
11
- packageManager?: string;
12
- scripts?: Record<string, string>;
13
- workspaces?: string[];
14
- }
15
-
16
- export const createPackagesJSON = ({
17
- appName,
18
- root,
19
- packageManager,
20
- docker,
21
- }: {
22
- appName: string;
23
- docker: boolean;
24
- packageManager: string;
25
- root: string;
26
- }) => {
27
- const pkg: PackageJSON = JSON.parse(
28
- readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'),
29
- );
30
-
31
- const basePackageJSON: PackageJSON = {
32
- name: appName,
33
- version: '1.0.0',
34
- private: true,
35
- scripts: {
36
- 'config:init': 'turbo config:init',
37
- dev: 'turbo dev',
38
- build: 'turbo build',
39
- lint: 'turbo lint',
40
- 'lint:fix': 'turbo lint:fix',
41
- ...(docker
42
- ? {
43
- 'docker:dev':
44
- 'docker compose -f ./docker-compose-dev.yml -p vitnode-development up -d',
45
- }
46
- : {}),
47
- },
48
- overrides: packageManager.startsWith('npm')
49
- ? {
50
- react: '^19.0.0-rc.0',
51
- 'react-dom': '^19.0.0-rc.0',
52
- }
53
- : {},
54
- dependencies: {
55
- 'drizzle-kit': '^0.22.8',
56
- 'drizzle-orm': '^0.31.4',
57
- },
58
- devDependencies: {
59
- 'eslint-config-typescript-vitnode': `^${pkg.version}`,
60
- prettier: '^3.3.3',
61
- 'prettier-plugin-tailwindcss': '^0.6.5',
62
- turbo: '^2.0.7',
63
- typescript: '^5.4.5',
64
- },
65
- packageManager,
66
- workspaces: ['apps/*'],
67
- };
68
-
69
- writeFileSync(
70
- join(root, 'package.json'),
71
- JSON.stringify(basePackageJSON, null, 2),
72
- );
73
-
74
- const frontendPackagesJSON: PackageJSON = {
75
- name: 'frontend',
76
- version: '1.0.0',
77
- private: true,
78
- scripts: {
79
- 'config:init': 'vitnode-frontend init',
80
- dev: 'vitnode-frontend init && next dev --turbo',
81
- build: 'next build',
82
- start: 'next start',
83
- lint: 'eslint .',
84
- 'lint:fix': 'eslint . --fix',
85
- },
86
- dependencies: {
87
- geist: '^1.3.1',
88
- next: '15.0.0-canary.72',
89
- react: '^19.0.0-rc.0',
90
- 'react-dom': '^19.0.0-rc.0',
91
- 'next-intl': '^3.17.1',
92
- 'vitnode-frontend': `^${pkg.version}`,
93
- },
94
- devDependencies: {
95
- '@types/node': '^20.14.11',
96
- '@types/react': '^18.3.3',
97
- '@types/react-dom': '^18.3.0',
98
- autoprefixer: '^10.4.19',
99
- eslint: '^8.57.0',
100
- 'eslint-config-typescript-vitnode': `^${pkg.version}`,
101
- postcss: '^8.4.39',
102
- tailwindcss: '^3.4.4',
103
- typescript: '^5.5.3',
104
- },
105
- };
106
-
107
- writeFileSync(
108
- join(root, 'apps', 'frontend', 'package.json'),
109
- JSON.stringify(frontendPackagesJSON, null, 2),
110
- );
111
-
112
- const backendPackagesJSON: PackageJSON = {
113
- name: 'backend',
114
- version: '1.0.0',
115
- private: true,
116
- scripts: {
117
- 'config:init': 'vitnode-backend init',
118
- dev: 'vitnode-backend init && cross-env NODE_ENV=development nest start -w',
119
- build: 'nest build',
120
- start: 'node dist/main',
121
- lint: 'eslint .',
122
- 'lint:fix': 'eslint . --fix',
123
- },
124
- dependencies: {
125
- '@nestjs/common': '^10.3.10',
126
- '@nestjs/core': '^10.3.10',
127
- '@nestjs/graphql': '^12.2.0',
128
- '@react-email/components': '^0.0.21',
129
- react: '^19.0.0-rc.0',
130
- 'react-dom': '^19.0.0-rc.0',
131
- 'reflect-metadata': '^0.2.2',
132
- 'vitnode-backend': `^${pkg.version}`,
133
- },
134
- devDependencies: {
135
- '@nestjs/cli': '^10.4.2',
136
- '@nestjs/platform-express': '^10.3.10',
137
- '@nestjs/schematics': '^10.1.2',
138
- '@types/express': '^4.17.21',
139
- '@types/node': '^20.14.11',
140
- '@types/pg': '^8.11.6',
141
- '@types/react': '^18.3.3',
142
- 'cross-env': '^7.0.3',
143
- 'drizzle-kit': '^0.22.8',
144
- 'drizzle-orm': '^0.31.4',
145
- eslint: '^8.57.0',
146
- 'eslint-config-typescript-vitnode': `^${pkg.version}`,
147
- pg: '^8.12.0',
148
- 'source-map-support': '^0.5.21',
149
- 'ts-loader': '^9.5.1',
150
- 'ts-node': '^10.9.2',
151
- 'tsconfig-paths': '^4.2.0',
152
- typescript: '^5.5.3',
153
- },
154
- };
155
-
156
- writeFileSync(
157
- join(root, 'apps', 'backend', 'package.json'),
158
- JSON.stringify(backendPackagesJSON, null, 2),
159
- );
160
- };