xevol 0.0.1 → 0.2.1

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/README.md CHANGED
@@ -1,23 +1,345 @@
1
1
  # xevol
2
2
 
3
- CLI for [XEVol](https://xevol.com) — transcribe, analyze, and explore YouTube content from your terminal.
3
+ **Transcribe, analyze, and explore YouTube content from your terminal.**
4
4
 
5
- ## Install
5
+ [![npm version](https://img.shields.io/npm/v/xevol)](https://www.npmjs.com/package/xevol)
6
+ [![License](https://img.shields.io/badge/license-proprietary-blue)](https://xevol.com)
7
+ [![Node](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)
8
+
9
+ Paste a YouTube URL, get AI-powered transcription and analysis — no API keys, no local GPU, no tool chaining.
10
+
11
+ ## Quick Demo
12
+
13
+ ```bash
14
+ $ xevol add https://youtube.com/watch?v=oOylEw3tPQ8 --analyze facts
15
+
16
+ ⠋ Processing... (12s)
17
+ ✔ "Cursor CEO: Going Beyond Code" (37:29)
18
+
19
+ ─── facts ───
20
+ • Cursor reached $100M ARR in 20 months
21
+ • 40-50% of code in Cursor is AI-generated
22
+ • Team hired first 10 employees over 6 months deliberately
23
+ • Pivoted from AI-CAD to AI coding tools
24
+
25
+ ✔ Done
26
+ ```
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ npm install -g xevol
32
+ ```
33
+
34
+ Or run without installing:
35
+
36
+ ```bash
37
+ npx xevol
38
+ ```
39
+
40
+ Requires Node.js 18+.
41
+
42
+ ## Quick Start
6
43
 
7
44
  ```bash
8
- npm i -g xevol
45
+ # 1. Authenticate
46
+ xevol login
47
+
48
+ # 2. Add a YouTube video (waits for completion by default)
49
+ xevol add "https://youtube.com/watch?v=abc123"
50
+
51
+ # 3. Analyze it
52
+ xevol analyze <id> --prompt facts
53
+
54
+ # 4. View the transcript
55
+ xevol view <id>
9
56
  ```
10
57
 
11
- ## Usage
58
+ ## Commands
59
+
60
+ | Command | Description |
61
+ |---------|-------------|
62
+ | `login` | Authenticate via device flow (opens browser) |
63
+ | `logout` | Clear stored credentials |
64
+ | `whoami` | Show current user, plan, and usage |
65
+ | `add` | Add a YouTube URL for transcription |
66
+ | `list` | List your transcriptions |
67
+ | `view` | View a transcription summary or full transcript |
68
+ | `analyze` | Generate AI analysis using a prompt |
69
+ | `prompts` | List available analysis prompts |
70
+ | `stream` | Stream analysis output via SSE |
71
+ | `resume` | Resume a previous streaming session |
72
+ | `config` | View or edit CLI configuration |
73
+
74
+ All commands support `--json` for machine-readable output.
75
+
76
+ ## Command Details
77
+
78
+ ### `xevol login`
79
+
80
+ Authenticate using the device code flow — opens your browser, you confirm, done.
12
81
 
13
82
  ```bash
14
- xevol login # Authenticate via browser
15
- xevol list # List your transcriptions
16
- xevol add <url> # Transcribe a YouTube video
17
- xevol view <id> # View transcript
18
- xevol spikes <id> # View AI-generated insights
83
+ # Interactive device flow
84
+ xevol login
85
+
86
+ # Token-based (CI / headless)
87
+ xevol login --token <token>
88
+
89
+ # Or set via environment variable
90
+ export XEVOL_TOKEN=<token>
19
91
  ```
20
92
 
93
+ ### `xevol add`
94
+
95
+ Add a YouTube video for transcription.
96
+
97
+ ```bash
98
+ # Add and wait for transcription (default)
99
+ xevol add "https://youtube.com/watch?v=abc123"
100
+
101
+ # Fire-and-forget (returns ID immediately)
102
+ xevol add "https://youtube.com/watch?v=abc123" --no-wait
103
+
104
+ # Specify language
105
+ xevol add "https://youtube.com/watch?v=abc123" --lang de
106
+
107
+ # Transcribe and analyze in one step
108
+ xevol add "https://youtube.com/watch?v=abc123" --analyze facts
109
+
110
+ # Analyze with multiple prompts
111
+ xevol add "https://youtube.com/watch?v=abc123" --analyze facts,advice
112
+
113
+ # Stream analysis output in real time
114
+ xevol add "https://youtube.com/watch?v=abc123" --analyze facts --stream
115
+ ```
116
+
117
+ | Flag | Description |
118
+ |------|-------------|
119
+ | `--no-wait` | Return immediately without waiting |
120
+ | `--lang <code>` | Language code (e.g. `en`, `de`, `ja`) |
121
+ | `--analyze <prompts>` | Comma-separated prompt IDs to run after transcription |
122
+ | `--stream` | Stream analysis output via SSE |
123
+ | `--json` | JSON output |
124
+
125
+ ### `xevol list`
126
+
127
+ List your transcriptions.
128
+
129
+ ```bash
130
+ # Default table view
131
+ xevol list
132
+
133
+ # Pagination
134
+ xevol list --page 2 --limit 50
135
+
136
+ # Filter by status
137
+ xevol list --status completed
138
+
139
+ # Machine-readable formats
140
+ xevol list --json
141
+ xevol list --csv
142
+ ```
143
+
144
+ | Flag | Description |
145
+ |------|-------------|
146
+ | `--page <n>` | Page number |
147
+ | `--limit <n>` | Results per page |
148
+ | `--status <s>` | Filter by status |
149
+ | `--json` | JSON output |
150
+ | `--csv` | CSV output |
151
+
152
+ ### `xevol view`
153
+
154
+ View a transcription's summary or full transcript.
155
+
156
+ ```bash
157
+ # Summary view
158
+ xevol view abc123def45
159
+
160
+ # Full transcript (pipe-friendly)
161
+ xevol view abc123def45 --raw
162
+
163
+ # Clean transcript (processed content)
164
+ xevol view abc123def45 --clean
165
+
166
+ # JSON output
167
+ xevol view abc123def45 --json
168
+ ```
169
+
170
+ | Flag | Description |
171
+ |------|-------------|
172
+ | `--raw` | Print the full transcript text |
173
+ | `--clean` | Use cleaned/processed content |
174
+ | `--json` | JSON output |
175
+
176
+ ### `xevol analyze`
177
+
178
+ Generate AI-powered analysis of a transcription.
179
+
180
+ ```bash
181
+ # Analyze with a specific prompt
182
+ xevol analyze abc123def45 --prompt facts
183
+
184
+ # Use a different language for output
185
+ xevol analyze abc123def45 --prompt facts --lang de
186
+
187
+ # JSON output
188
+ xevol analyze abc123def45 --prompt facts --json
189
+ ```
190
+
191
+ | Flag | Description |
192
+ |------|-------------|
193
+ | `--prompt <id>` | Prompt to use (default: `review`) |
194
+ | `--lang <code>` | Output language |
195
+ | `--json` | JSON output |
196
+
197
+ Use `xevol prompts` to see all available prompts.
198
+
199
+ ### `xevol prompts`
200
+
201
+ List available analysis prompts.
202
+
203
+ ```bash
204
+ xevol prompts
205
+ xevol prompts --json
206
+ xevol prompts --csv
207
+ ```
208
+
209
+ ### `xevol stream`
210
+
211
+ Stream analysis output in real time via SSE.
212
+
213
+ ```bash
214
+ xevol stream <spike-id>
215
+ xevol stream <spike-id> --last-event-id <id>
216
+ ```
217
+
218
+ ### `xevol resume`
219
+
220
+ Resume a previously interrupted streaming session.
221
+
222
+ ```bash
223
+ xevol resume <transcription-id>
224
+ ```
225
+
226
+ ### `xevol config`
227
+
228
+ View or edit CLI configuration.
229
+
230
+ ```bash
231
+ # Show all config
232
+ xevol config
233
+
234
+ # Get a value
235
+ xevol config get apiUrl
236
+
237
+ # Set a value
238
+ xevol config set default.lang de
239
+ xevol config set default.limit 50
240
+ ```
241
+
242
+ Available config keys:
243
+
244
+ | Key | Description |
245
+ |-----|-------------|
246
+ | `apiUrl` | Base API URL |
247
+ | `default.lang` | Default output language |
248
+ | `default.limit` | Default page size for `list` |
249
+ | `api.timeout` | API request timeout (ms) |
250
+
251
+ ## Output Formats
252
+
253
+ ### Table (default)
254
+
255
+ ```
256
+ ┌─────────────┬────────────────────────────────┬──────────┬──────────┐
257
+ │ ID │ Title │ Duration │ Status │
258
+ ├─────────────┼────────────────────────────────┼──────────┼──────────┤
259
+ │ abc123def45 │ Cursor CEO: Going Beyond Code │ 37:29 │ ✔ done │
260
+ │ xyz789ghi01 │ Naval on Happiness │ 12:03 │ ⠋ proc… │
261
+ └─────────────┴────────────────────────────────┴──────────┴──────────┘
262
+ ```
263
+
264
+ ### JSON (`--json`)
265
+
266
+ ```bash
267
+ xevol list --json | jq '.list[] | select(.channelTitle == "Y Combinator")'
268
+ xevol analyze abc123 --prompt facts --json | jq '.spikes[0].content'
269
+ ```
270
+
271
+ ### CSV (`--csv`)
272
+
273
+ ```bash
274
+ xevol list --csv > transcriptions.csv
275
+ xevol prompts --csv
276
+ ```
277
+
278
+ ## Streaming
279
+
280
+ Analysis output streams in real time via Server-Sent Events (SSE). Use `--stream` with `add` to watch analysis as it's generated:
281
+
282
+ ```bash
283
+ xevol add "https://youtube.com/watch?v=..." --analyze facts --stream
284
+ ```
285
+
286
+ If a stream is interrupted, resume it:
287
+
288
+ ```bash
289
+ xevol resume <transcription-id>
290
+ ```
291
+
292
+ ## Authentication
293
+
294
+ xevol uses a device authorization flow, similar to `gh auth login`:
295
+
296
+ 1. Run `xevol login`
297
+ 2. A code is displayed and your browser opens
298
+ 3. Enter the code to authorize
299
+ 4. The CLI stores your token locally at `~/.xevol/`
300
+
301
+ For CI/CD or headless environments, use token-based auth:
302
+
303
+ ```bash
304
+ xevol login --token <token>
305
+ # or
306
+ export XEVOL_TOKEN=<token>
307
+ ```
308
+
309
+ Check your auth status:
310
+
311
+ ```bash
312
+ xevol whoami
313
+ ```
314
+
315
+ ## Piping & Scripting
316
+
317
+ ```bash
318
+ # Pipe transcript to other tools
319
+ xevol view <id> --raw | wc -w
320
+
321
+ # JSON output for scripting
322
+ xevol list --json | jq '.list | length'
323
+
324
+ # Export to CSV
325
+ xevol list --csv > my-transcriptions.csv
326
+ ```
327
+
328
+ ## Global Options
329
+
330
+ | Flag | Description |
331
+ |------|-------------|
332
+ | `--token <token>` | Override auth token for a single command |
333
+ | `--no-color` | Disable colored output |
334
+ | `--json` | Machine-readable JSON output |
335
+ | `-V, --version` | Print version |
336
+ | `-h, --help` | Show help |
337
+
338
+ ## Links
339
+
340
+ - **Website**: [xevol.com](https://xevol.com)
341
+ - **Issues**: [github.com/xevol/xevol-cli/issues](https://github.com/xevol/xevol-cli/issues)
342
+
21
343
  ## License
22
344
 
23
- MIT
345
+ Proprietary — see [xevol.com](https://xevol.com) for terms.
package/dist/index.js CHANGED
@@ -1,5 +1,86 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
+ import{createRequire as I2}from"node:module";var j2=Object.create;var{getPrototypeOf:N2,defineProperty:iu,getOwnPropertyNames:L2}=Object;var T2=Object.prototype.hasOwnProperty;var CD=(D,u,F)=>{F=D!=null?j2(N2(D)):{};let E=u||!D||!D.__esModule?iu(F,"default",{value:D,enumerable:!0}):F;for(let C of L2(D))if(!T2.call(E,C))iu(E,C,{get:()=>D[C],enumerable:!0});return E};var j=(D,u)=>()=>(u||D((u={exports:{}}).exports,u),u.exports);var FD=I2(import.meta.url);var VD=j((P2)=>{class tD extends Error{constructor(D,u,F){super(F);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=u,this.exitCode=D,this.nestedError=void 0}}class nu extends tD{constructor(D){super(1,"commander.invalidArgument",D);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}P2.CommanderError=tD;P2.InvalidArgumentError=nu});var wD=j((f2)=>{var{InvalidArgumentError:S2}=VD();class su{constructor(D,u){switch(this.description=u||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,D[0]){case"<":this.required=!0,this._name=D.slice(1,-1);break;case"[":this.required=!1,this._name=D.slice(1,-1);break;default:this.required=!0,this._name=D;break}if(this._name.length>3&&this._name.slice(-3)==="...")this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_concatValue(D,u){if(u===this.defaultValue||!Array.isArray(u))return[D];return u.concat(D)}default(D,u){return this.defaultValue=D,this.defaultValueDescription=u,this}argParser(D){return this.parseArg=D,this}choices(D){return this.argChoices=D.slice(),this.parseArg=(u,F)=>{if(!this.argChoices.includes(u))throw new S2(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(u,F);return u},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function b2(D){let u=D.name()+(D.variadic===!0?"...":"");return D.required?"<"+u+">":"["+u+"]"}f2.Argument=su;f2.humanReadableArgName=b2});var eD=j((x2)=>{var{humanReadableArgName:k2}=wD();class ou{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(D){this.helpWidth=this.helpWidth??D.helpWidth??80}visibleCommands(D){let u=D.commands.filter((E)=>!E._hidden),F=D._getHelpCommand();if(F&&!F._hidden)u.push(F);if(this.sortSubcommands)u.sort((E,C)=>{return E.name().localeCompare(C.name())});return u}compareOptions(D,u){let F=(E)=>{return E.short?E.short.replace(/^-/,""):E.long.replace(/^--/,"")};return F(D).localeCompare(F(u))}visibleOptions(D){let u=D.options.filter((E)=>!E.hidden),F=D._getHelpOption();if(F&&!F.hidden){let E=F.short&&D._findOption(F.short),C=F.long&&D._findOption(F.long);if(!E&&!C)u.push(F);else if(F.long&&!C)u.push(D.createOption(F.long,F.description));else if(F.short&&!E)u.push(D.createOption(F.short,F.description))}if(this.sortOptions)u.sort(this.compareOptions);return u}visibleGlobalOptions(D){if(!this.showGlobalOptions)return[];let u=[];for(let F=D.parent;F;F=F.parent){let E=F.options.filter((C)=>!C.hidden);u.push(...E)}if(this.sortOptions)u.sort(this.compareOptions);return u}visibleArguments(D){if(D._argsDescription)D.registeredArguments.forEach((u)=>{u.description=u.description||D._argsDescription[u.name()]||""});if(D.registeredArguments.find((u)=>u.description))return D.registeredArguments;return[]}subcommandTerm(D){let u=D.registeredArguments.map((F)=>k2(F)).join(" ");return D._name+(D._aliases[0]?"|"+D._aliases[0]:"")+(D.options.length?" [options]":"")+(u?" "+u:"")}optionTerm(D){return D.flags}argumentTerm(D){return D.name()}longestSubcommandTermLength(D,u){return u.visibleCommands(D).reduce((F,E)=>{return Math.max(F,this.displayWidth(u.styleSubcommandTerm(u.subcommandTerm(E))))},0)}longestOptionTermLength(D,u){return u.visibleOptions(D).reduce((F,E)=>{return Math.max(F,this.displayWidth(u.styleOptionTerm(u.optionTerm(E))))},0)}longestGlobalOptionTermLength(D,u){return u.visibleGlobalOptions(D).reduce((F,E)=>{return Math.max(F,this.displayWidth(u.styleOptionTerm(u.optionTerm(E))))},0)}longestArgumentTermLength(D,u){return u.visibleArguments(D).reduce((F,E)=>{return Math.max(F,this.displayWidth(u.styleArgumentTerm(u.argumentTerm(E))))},0)}commandUsage(D){let u=D._name;if(D._aliases[0])u=u+"|"+D._aliases[0];let F="";for(let E=D.parent;E;E=E.parent)F=E.name()+" "+F;return F+u+" "+D.usage()}commandDescription(D){return D.description()}subcommandDescription(D){return D.summary()||D.description()}optionDescription(D){let u=[];if(D.argChoices)u.push(`choices: ${D.argChoices.map((F)=>JSON.stringify(F)).join(", ")}`);if(D.defaultValue!==void 0){if(D.required||D.optional||D.isBoolean()&&typeof D.defaultValue==="boolean")u.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`)}if(D.presetArg!==void 0&&D.optional)u.push(`preset: ${JSON.stringify(D.presetArg)}`);if(D.envVar!==void 0)u.push(`env: ${D.envVar}`);if(u.length>0)return`${D.description} (${u.join(", ")})`;return D.description}argumentDescription(D){let u=[];if(D.argChoices)u.push(`choices: ${D.argChoices.map((F)=>JSON.stringify(F)).join(", ")}`);if(D.defaultValue!==void 0)u.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`);if(u.length>0){let F=`(${u.join(", ")})`;if(D.description)return`${D.description} ${F}`;return F}return D.description}formatHelp(D,u){let F=u.padWidth(D,u),E=u.helpWidth??80;function C($,Q){return u.formatItem($,F,Q,u)}let B=[`${u.styleTitle("Usage:")} ${u.styleUsage(u.commandUsage(D))}`,""],A=u.commandDescription(D);if(A.length>0)B=B.concat([u.boxWrap(u.styleCommandDescription(A),E),""]);let _=u.visibleArguments(D).map(($)=>{return C(u.styleArgumentTerm(u.argumentTerm($)),u.styleArgumentDescription(u.argumentDescription($)))});if(_.length>0)B=B.concat([u.styleTitle("Arguments:"),..._,""]);let Z=u.visibleOptions(D).map(($)=>{return C(u.styleOptionTerm(u.optionTerm($)),u.styleOptionDescription(u.optionDescription($)))});if(Z.length>0)B=B.concat([u.styleTitle("Options:"),...Z,""]);if(u.showGlobalOptions){let $=u.visibleGlobalOptions(D).map((Q)=>{return C(u.styleOptionTerm(u.optionTerm(Q)),u.styleOptionDescription(u.optionDescription(Q)))});if($.length>0)B=B.concat([u.styleTitle("Global Options:"),...$,""])}let q=u.visibleCommands(D).map(($)=>{return C(u.styleSubcommandTerm(u.subcommandTerm($)),u.styleSubcommandDescription(u.subcommandDescription($)))});if(q.length>0)B=B.concat([u.styleTitle("Commands:"),...q,""]);return B.join(`
4
+ `)}displayWidth(D){return tu(D).length}styleTitle(D){return D}styleUsage(D){return D.split(" ").map((u)=>{if(u==="[options]")return this.styleOptionText(u);if(u==="[command]")return this.styleSubcommandText(u);if(u[0]==="["||u[0]==="<")return this.styleArgumentText(u);return this.styleCommandText(u)}).join(" ")}styleCommandDescription(D){return this.styleDescriptionText(D)}styleOptionDescription(D){return this.styleDescriptionText(D)}styleSubcommandDescription(D){return this.styleDescriptionText(D)}styleArgumentDescription(D){return this.styleDescriptionText(D)}styleDescriptionText(D){return D}styleOptionTerm(D){return this.styleOptionText(D)}styleSubcommandTerm(D){return D.split(" ").map((u)=>{if(u==="[options]")return this.styleOptionText(u);if(u[0]==="["||u[0]==="<")return this.styleArgumentText(u);return this.styleSubcommandText(u)}).join(" ")}styleArgumentTerm(D){return this.styleArgumentText(D)}styleOptionText(D){return D}styleArgumentText(D){return D}styleSubcommandText(D){return D}styleCommandText(D){return D}padWidth(D,u){return Math.max(u.longestOptionTermLength(D,u),u.longestGlobalOptionTermLength(D,u),u.longestSubcommandTermLength(D,u),u.longestArgumentTermLength(D,u))}preformatted(D){return/\n[^\S\r\n]/.test(D)}formatItem(D,u,F,E){let B=" ".repeat(2);if(!F)return B+D;let A=D.padEnd(u+D.length-E.displayWidth(D)),_=2,q=(this.helpWidth??80)-u-_-2,$;if(q<this.minWidthToWrap||E.preformatted(F))$=F;else $=E.boxWrap(F,q).replace(/\n/g,`
5
+ `+" ".repeat(u+_));return B+A+" ".repeat(_)+$.replace(/\n/g,`
6
+ ${B}`)}boxWrap(D,u){if(u<this.minWidthToWrap)return D;let F=D.split(/\r\n|\n/),E=/[\s]*[^\s]+/g,C=[];return F.forEach((B)=>{let A=B.match(E);if(A===null){C.push("");return}let _=[A.shift()],Z=this.displayWidth(_[0]);A.forEach((q)=>{let $=this.displayWidth(q);if(Z+$<=u){_.push(q),Z+=$;return}C.push(_.join(""));let Q=q.trimStart();_=[Q],Z=this.displayWidth(Q)}),C.push(_.join(""))}),C.join(`
7
+ `)}}function tu(D){let u=/\x1b\[\d*(;\d*)*m/g;return D.replace(u,"")}x2.Help=ou;x2.stripColor=tu});var Du=j((d2)=>{var{InvalidArgumentError:m2}=VD();class D0{constructor(D,u){this.flags=D,this.description=u||"",this.required=D.includes("<"),this.optional=D.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(D),this.mandatory=!1;let F=c2(D);if(this.short=F.shortFlag,this.long=F.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(D,u){return this.defaultValue=D,this.defaultValueDescription=u,this}preset(D){return this.presetArg=D,this}conflicts(D){return this.conflictsWith=this.conflictsWith.concat(D),this}implies(D){let u=D;if(typeof D==="string")u={[D]:!0};return this.implied=Object.assign(this.implied||{},u),this}env(D){return this.envVar=D,this}argParser(D){return this.parseArg=D,this}makeOptionMandatory(D=!0){return this.mandatory=!!D,this}hideHelp(D=!0){return this.hidden=!!D,this}_concatValue(D,u){if(u===this.defaultValue||!Array.isArray(u))return[D];return u.concat(D)}choices(D){return this.argChoices=D.slice(),this.parseArg=(u,F)=>{if(!this.argChoices.includes(u))throw new m2(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(u,F);return u},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return eu(this.name().replace(/^no-/,""));return eu(this.name())}is(D){return this.short===D||this.long===D}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class u0{constructor(D){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,D.forEach((u)=>{if(u.negate)this.negativeOptions.set(u.attributeName(),u);else this.positiveOptions.set(u.attributeName(),u)}),this.negativeOptions.forEach((u,F)=>{if(this.positiveOptions.has(F))this.dualOptions.add(F)})}valueFromOption(D,u){let F=u.attributeName();if(!this.dualOptions.has(F))return!0;let E=this.negativeOptions.get(F).presetArg,C=E!==void 0?E:!1;return u.negate===(C===D)}}function eu(D){return D.split("-").reduce((u,F)=>{return u+F[0].toUpperCase()+F.slice(1)})}function c2(D){let u,F,E=/^-[^-]$/,C=/^--[^-]/,B=D.split(/[ |,]+/).concat("guard");if(E.test(B[0]))u=B.shift();if(C.test(B[0]))F=B.shift();if(!u&&E.test(B[0]))u=B.shift();if(!u&&C.test(B[0]))u=F,F=B.shift();if(B[0].startsWith("-")){let A=B[0],_=`option creation failed due to '${A}' in option flags '${D}'`;if(/^-[^-][^-]/.test(A))throw Error(`${_}
8
+ - a short flag is a single dash and a single character
9
+ - either use a single dash and a single character (for a short flag)
10
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(E.test(A))throw Error(`${_}
11
+ - too many short flags`);if(C.test(A))throw Error(`${_}
12
+ - too many long flags`);throw Error(`${_}
13
+ - unrecognised flag format`)}if(u===void 0&&F===void 0)throw Error(`option creation failed due to no flags found in '${D}'.`);return{shortFlag:u,longFlag:F}}d2.Option=D0;d2.DualOptions=u0});var F0=j((i2)=>{function r2(D,u){if(Math.abs(D.length-u.length)>3)return Math.max(D.length,u.length);let F=[];for(let E=0;E<=D.length;E++)F[E]=[E];for(let E=0;E<=u.length;E++)F[0][E]=E;for(let E=1;E<=u.length;E++)for(let C=1;C<=D.length;C++){let B=1;if(D[C-1]===u[E-1])B=0;else B=1;if(F[C][E]=Math.min(F[C-1][E]+1,F[C][E-1]+1,F[C-1][E-1]+B),C>1&&E>1&&D[C-1]===u[E-2]&&D[C-2]===u[E-1])F[C][E]=Math.min(F[C][E],F[C-2][E-2]+1)}return F[D.length][u.length]}function a2(D,u){if(!u||u.length===0)return"";u=Array.from(new Set(u));let F=D.startsWith("--");if(F)D=D.slice(2),u=u.map((A)=>A.slice(2));let E=[],C=3,B=0.4;if(u.forEach((A)=>{if(A.length<=1)return;let _=r2(D,A),Z=Math.max(D.length,A.length);if((Z-_)/Z>B){if(_<C)C=_,E=[A];else if(_===C)E.push(A)}}),E.sort((A,_)=>A.localeCompare(_)),F)E=E.map((A)=>`--${A}`);if(E.length>1)return`
14
+ (Did you mean one of ${E.join(", ")}?)`;if(E.length===1)return`
15
+ (Did you mean ${E[0]}?)`;return""}i2.suggestSimilar=a2});var A0=j((F3)=>{var s2=FD("node:events").EventEmitter,uu=FD("node:child_process"),DD=FD("node:path"),OD=FD("node:fs"),N=FD("node:process"),{Argument:o2,humanReadableArgName:t2}=wD(),{CommanderError:Fu}=VD(),{Help:e2,stripColor:D3}=eD(),{Option:E0,DualOptions:u3}=Du(),{suggestSimilar:C0}=F0();class Cu extends s2{constructor(D){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=D||"",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._savedState=null,this._outputConfiguration={writeOut:(u)=>N.stdout.write(u),writeErr:(u)=>N.stderr.write(u),outputError:(u,F)=>F(u),getOutHelpWidth:()=>N.stdout.isTTY?N.stdout.columns:void 0,getErrHelpWidth:()=>N.stderr.isTTY?N.stderr.columns:void 0,getOutHasColors:()=>Eu()??(N.stdout.isTTY&&N.stdout.hasColors?.()),getErrHasColors:()=>Eu()??(N.stderr.isTTY&&N.stderr.hasColors?.()),stripColor:(u)=>D3(u)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(D){return this._outputConfiguration=D._outputConfiguration,this._helpOption=D._helpOption,this._helpCommand=D._helpCommand,this._helpConfiguration=D._helpConfiguration,this._exitCallback=D._exitCallback,this._storeOptionsAsProperties=D._storeOptionsAsProperties,this._combineFlagAndOptionalValue=D._combineFlagAndOptionalValue,this._allowExcessArguments=D._allowExcessArguments,this._enablePositionalOptions=D._enablePositionalOptions,this._showHelpAfterError=D._showHelpAfterError,this._showSuggestionAfterError=D._showSuggestionAfterError,this}_getCommandAndAncestors(){let D=[];for(let u=this;u;u=u.parent)D.push(u);return D}command(D,u,F){let E=u,C=F;if(typeof E==="object"&&E!==null)C=E,E=null;C=C||{};let[,B,A]=D.match(/([^ ]+) *(.*)/),_=this.createCommand(B);if(E)_.description(E),_._executableHandler=!0;if(C.isDefault)this._defaultCommandName=_._name;if(_._hidden=!!(C.noHelp||C.hidden),_._executableFile=C.executableFile||null,A)_.arguments(A);if(this._registerCommand(_),_.parent=this,_.copyInheritedSettings(this),E)return this;return _}createCommand(D){return new Cu(D)}createHelp(){return Object.assign(new e2,this.configureHelp())}configureHelp(D){if(D===void 0)return this._helpConfiguration;return this._helpConfiguration=D,this}configureOutput(D){if(D===void 0)return this._outputConfiguration;return Object.assign(this._outputConfiguration,D),this}showHelpAfterError(D=!0){if(typeof D!=="string")D=!!D;return this._showHelpAfterError=D,this}showSuggestionAfterError(D=!0){return this._showSuggestionAfterError=!!D,this}addCommand(D,u){if(!D._name)throw Error(`Command passed to .addCommand() must have a name
16
+ - specify the name in Command constructor or using .name()`);if(u=u||{},u.isDefault)this._defaultCommandName=D._name;if(u.noHelp||u.hidden)D._hidden=!0;return this._registerCommand(D),D.parent=this,D._checkForBrokenPassThrough(),this}createArgument(D,u){return new o2(D,u)}argument(D,u,F,E){let C=this.createArgument(D,u);if(typeof F==="function")C.default(E).argParser(F);else C.default(F);return this.addArgument(C),this}arguments(D){return D.trim().split(/ +/).forEach((u)=>{this.argument(u)}),this}addArgument(D){let u=this.registeredArguments.slice(-1)[0];if(u&&u.variadic)throw Error(`only the last argument can be variadic '${u.name()}'`);if(D.required&&D.defaultValue!==void 0&&D.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${D.name()}'`);return this.registeredArguments.push(D),this}helpCommand(D,u){if(typeof D==="boolean")return this._addImplicitHelpCommand=D,this;D=D??"help [command]";let[,F,E]=D.match(/([^ ]+) *(.*)/),C=u??"display help for command",B=this.createCommand(F);if(B.helpOption(!1),E)B.arguments(E);if(C)B.description(C);return this._addImplicitHelpCommand=!0,this._helpCommand=B,this}addHelpCommand(D,u){if(typeof D!=="object")return this.helpCommand(D,u),this;return this._addImplicitHelpCommand=!0,this._helpCommand=D,this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook(D,u){let F=["preSubcommand","preAction","postAction"];if(!F.includes(D))throw Error(`Unexpected value for event passed to hook : '${D}'.
17
+ Expecting one of '${F.join("', '")}'`);if(this._lifeCycleHooks[D])this._lifeCycleHooks[D].push(u);else this._lifeCycleHooks[D]=[u];return this}exitOverride(D){if(D)this._exitCallback=D;else this._exitCallback=(u)=>{if(u.code!=="commander.executeSubCommandAsync")throw u};return this}_exit(D,u,F){if(this._exitCallback)this._exitCallback(new Fu(D,u,F));N.exit(D)}action(D){let u=(F)=>{let E=this.registeredArguments.length,C=F.slice(0,E);if(this._storeOptionsAsProperties)C[E]=this;else C[E]=this.opts();return C.push(this),D.apply(this,C)};return this._actionHandler=u,this}createOption(D,u){return new E0(D,u)}_callParseArg(D,u,F,E){try{return D.parseArg(u,F)}catch(C){if(C.code==="commander.invalidArgument"){let B=`${E} ${C.message}`;this.error(B,{exitCode:C.exitCode,code:C.code})}throw C}}_registerOption(D){let u=D.short&&this._findOption(D.short)||D.long&&this._findOption(D.long);if(u){let F=D.long&&this._findOption(D.long)?D.long:D.short;throw Error(`Cannot add option '${D.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${F}'
18
+ - already used by option '${u.flags}'`)}this.options.push(D)}_registerCommand(D){let u=(E)=>{return[E.name()].concat(E.aliases())},F=u(D).find((E)=>this._findCommand(E));if(F){let E=u(this._findCommand(F)).join("|"),C=u(D).join("|");throw Error(`cannot add command '${C}' as already have command '${E}'`)}this.commands.push(D)}addOption(D){this._registerOption(D);let u=D.name(),F=D.attributeName();if(D.negate){let C=D.long.replace(/^--no-/,"--");if(!this._findOption(C))this.setOptionValueWithSource(F,D.defaultValue===void 0?!0:D.defaultValue,"default")}else if(D.defaultValue!==void 0)this.setOptionValueWithSource(F,D.defaultValue,"default");let E=(C,B,A)=>{if(C==null&&D.presetArg!==void 0)C=D.presetArg;let _=this.getOptionValue(F);if(C!==null&&D.parseArg)C=this._callParseArg(D,C,_,B);else if(C!==null&&D.variadic)C=D._concatValue(C,_);if(C==null)if(D.negate)C=!1;else if(D.isBoolean()||D.optional)C=!0;else C="";this.setOptionValueWithSource(F,C,A)};if(this.on("option:"+u,(C)=>{let B=`error: option '${D.flags}' argument '${C}' is invalid.`;E(C,B,"cli")}),D.envVar)this.on("optionEnv:"+u,(C)=>{let B=`error: option '${D.flags}' value '${C}' from env '${D.envVar}' is invalid.`;E(C,B,"env")});return this}_optionEx(D,u,F,E,C){if(typeof u==="object"&&u instanceof E0)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let B=this.createOption(u,F);if(B.makeOptionMandatory(!!D.mandatory),typeof E==="function")B.default(C).argParser(E);else if(E instanceof RegExp){let A=E;E=(_,Z)=>{let q=A.exec(_);return q?q[0]:Z},B.default(C).argParser(E)}else B.default(E);return this.addOption(B)}option(D,u,F,E){return this._optionEx({},D,u,F,E)}requiredOption(D,u,F,E){return this._optionEx({mandatory:!0},D,u,F,E)}combineFlagAndOptionalValue(D=!0){return this._combineFlagAndOptionalValue=!!D,this}allowUnknownOption(D=!0){return this._allowUnknownOption=!!D,this}allowExcessArguments(D=!0){return this._allowExcessArguments=!!D,this}enablePositionalOptions(D=!0){return this._enablePositionalOptions=!!D,this}passThroughOptions(D=!0){return this._passThroughOptions=!!D,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(D=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!D,this}getOptionValue(D){if(this._storeOptionsAsProperties)return this[D];return this._optionValues[D]}setOptionValue(D,u){return this.setOptionValueWithSource(D,u,void 0)}setOptionValueWithSource(D,u,F){if(this._storeOptionsAsProperties)this[D]=u;else this._optionValues[D]=u;return this._optionValueSources[D]=F,this}getOptionValueSource(D){return this._optionValueSources[D]}getOptionValueSourceWithGlobals(D){let u;return this._getCommandAndAncestors().forEach((F)=>{if(F.getOptionValueSource(D)!==void 0)u=F.getOptionValueSource(D)}),u}_prepareUserArgs(D,u){if(D!==void 0&&!Array.isArray(D))throw Error("first parameter to parse must be array or undefined");if(u=u||{},D===void 0&&u.from===void 0){if(N.versions?.electron)u.from="electron";let E=N.execArgv??[];if(E.includes("-e")||E.includes("--eval")||E.includes("-p")||E.includes("--print"))u.from="eval"}if(D===void 0)D=N.argv;this.rawArgs=D.slice();let F;switch(u.from){case void 0:case"node":this._scriptPath=D[1],F=D.slice(2);break;case"electron":if(N.defaultApp)this._scriptPath=D[1],F=D.slice(2);else F=D.slice(1);break;case"user":F=D.slice(0);break;case"eval":F=D.slice(1);break;default:throw Error(`unexpected parse option { from: '${u.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",F}parse(D,u){this._prepareForParse();let F=this._prepareUserArgs(D,u);return this._parseCommand([],F),this}async parseAsync(D,u){this._prepareForParse();let F=this._prepareUserArgs(D,u);return await this._parseCommand([],F),this}_prepareForParse(){if(this._savedState===null)this.saveStateBeforeParse();else this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
19
+ - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(D,u,F){if(OD.existsSync(D))return;let E=u?`searched for local subcommand relative to directory '${u}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",C=`'${D}' does not exist
20
+ - if '${F}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
21
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
22
+ - ${E}`;throw Error(C)}_executeSubCommand(D,u){u=u.slice();let F=!1,E=[".js",".ts",".tsx",".mjs",".cjs"];function C(q,$){let Q=DD.resolve(q,$);if(OD.existsSync(Q))return Q;if(E.includes(DD.extname($)))return;let X=E.find((H)=>OD.existsSync(`${Q}${H}`));if(X)return`${Q}${X}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let B=D._executableFile||`${this._name}-${D._name}`,A=this._executableDir||"";if(this._scriptPath){let q;try{q=OD.realpathSync(this._scriptPath)}catch{q=this._scriptPath}A=DD.resolve(DD.dirname(q),A)}if(A){let q=C(A,B);if(!q&&!D._executableFile&&this._scriptPath){let $=DD.basename(this._scriptPath,DD.extname(this._scriptPath));if($!==this._name)q=C(A,`${$}-${D._name}`)}B=q||B}F=E.includes(DD.extname(B));let _;if(N.platform!=="win32")if(F)u.unshift(B),u=B0(N.execArgv).concat(u),_=uu.spawn(N.argv[0],u,{stdio:"inherit"});else _=uu.spawn(B,u,{stdio:"inherit"});else this._checkForMissingExecutable(B,A,D._name),u.unshift(B),u=B0(N.execArgv).concat(u),_=uu.spawn(N.execPath,u,{stdio:"inherit"});if(!_.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(($)=>{N.on($,()=>{if(_.killed===!1&&_.exitCode===null)_.kill($)})});let Z=this._exitCallback;_.on("close",(q)=>{if(q=q??1,!Z)N.exit(q);else Z(new Fu(q,"commander.executeSubCommandAsync","(close)"))}),_.on("error",(q)=>{if(q.code==="ENOENT")this._checkForMissingExecutable(B,A,D._name);else if(q.code==="EACCES")throw Error(`'${B}' not executable`);if(!Z)N.exit(1);else{let $=new Fu(1,"commander.executeSubCommandAsync","(error)");$.nestedError=q,Z($)}}),this.runningCommand=_}_dispatchSubcommand(D,u,F){let E=this._findCommand(D);if(!E)this.help({error:!0});E._prepareForParse();let C;return C=this._chainOrCallSubCommandHook(C,E,"preSubcommand"),C=this._chainOrCall(C,()=>{if(E._executableHandler)this._executeSubCommand(E,u.concat(F));else return E._parseCommand(u,F)}),C}_dispatchHelpCommand(D){if(!D)this.help();let u=this._findCommand(D);if(u&&!u._executableHandler)u.help();return this._dispatchSubcommand(D,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach((D,u)=>{if(D.required&&this.args[u]==null)this.missingArgument(D.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let D=(F,E,C)=>{let B=E;if(E!==null&&F.parseArg){let A=`error: command-argument value '${E}' is invalid for argument '${F.name()}'.`;B=this._callParseArg(F,E,C,A)}return B};this._checkNumberOfArguments();let u=[];this.registeredArguments.forEach((F,E)=>{let C=F.defaultValue;if(F.variadic){if(E<this.args.length){if(C=this.args.slice(E),F.parseArg)C=C.reduce((B,A)=>{return D(F,A,B)},F.defaultValue)}else if(C===void 0)C=[]}else if(E<this.args.length){if(C=this.args[E],F.parseArg)C=D(F,C,F.defaultValue)}u[E]=C}),this.processedArgs=u}_chainOrCall(D,u){if(D&&D.then&&typeof D.then==="function")return D.then(()=>u());return u()}_chainOrCallHooks(D,u){let F=D,E=[];if(this._getCommandAndAncestors().reverse().filter((C)=>C._lifeCycleHooks[u]!==void 0).forEach((C)=>{C._lifeCycleHooks[u].forEach((B)=>{E.push({hookedCommand:C,callback:B})})}),u==="postAction")E.reverse();return E.forEach((C)=>{F=this._chainOrCall(F,()=>{return C.callback(C.hookedCommand,this)})}),F}_chainOrCallSubCommandHook(D,u,F){let E=D;if(this._lifeCycleHooks[F]!==void 0)this._lifeCycleHooks[F].forEach((C)=>{E=this._chainOrCall(E,()=>{return C(this,u)})});return E}_parseCommand(D,u){let F=this.parseOptions(u);if(this._parseOptionsEnv(),this._parseOptionsImplied(),D=D.concat(F.operands),u=F.unknown,this.args=D.concat(u),D&&this._findCommand(D[0]))return this._dispatchSubcommand(D[0],D.slice(1),u);if(this._getHelpCommand()&&D[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(D[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(u),this._dispatchSubcommand(this._defaultCommandName,D,u);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(F.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let E=()=>{if(F.unknown.length>0)this.unknownOption(F.unknown[0])},C=`command:${this.name()}`;if(this._actionHandler){E(),this._processArguments();let B;if(B=this._chainOrCallHooks(B,"preAction"),B=this._chainOrCall(B,()=>this._actionHandler(this.processedArgs)),this.parent)B=this._chainOrCall(B,()=>{this.parent.emit(C,D,u)});return B=this._chainOrCallHooks(B,"postAction"),B}if(this.parent&&this.parent.listenerCount(C))E(),this._processArguments(),this.parent.emit(C,D,u);else if(D.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",D,u);if(this.listenerCount("command:*"))this.emit("command:*",D,u);else if(this.commands.length)this.unknownCommand();else E(),this._processArguments()}else if(this.commands.length)E(),this.help({error:!0});else E(),this._processArguments()}_findCommand(D){if(!D)return;return this.commands.find((u)=>u._name===D||u._aliases.includes(D))}_findOption(D){return this.options.find((u)=>u.is(D))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((D)=>{D.options.forEach((u)=>{if(u.mandatory&&D.getOptionValue(u.attributeName())===void 0)D.missingMandatoryOptionValue(u)})})}_checkForConflictingLocalOptions(){let D=this.options.filter((F)=>{let E=F.attributeName();if(this.getOptionValue(E)===void 0)return!1;return this.getOptionValueSource(E)!=="default"});D.filter((F)=>F.conflictsWith.length>0).forEach((F)=>{let E=D.find((C)=>F.conflictsWith.includes(C.attributeName()));if(E)this._conflictingOption(F,E)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((D)=>{D._checkForConflictingLocalOptions()})}parseOptions(D){let u=[],F=[],E=u,C=D.slice();function B(_){return _.length>1&&_[0]==="-"}let A=null;while(C.length){let _=C.shift();if(_==="--"){if(E===F)E.push(_);E.push(...C);break}if(A&&!B(_)){this.emit(`option:${A.name()}`,_);continue}if(A=null,B(_)){let Z=this._findOption(_);if(Z){if(Z.required){let q=C.shift();if(q===void 0)this.optionMissingArgument(Z);this.emit(`option:${Z.name()}`,q)}else if(Z.optional){let q=null;if(C.length>0&&!B(C[0]))q=C.shift();this.emit(`option:${Z.name()}`,q)}else this.emit(`option:${Z.name()}`);A=Z.variadic?Z:null;continue}}if(_.length>2&&_[0]==="-"&&_[1]!=="-"){let Z=this._findOption(`-${_[1]}`);if(Z){if(Z.required||Z.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${Z.name()}`,_.slice(2));else this.emit(`option:${Z.name()}`),C.unshift(`-${_.slice(2)}`);continue}}if(/^--[^=]+=/.test(_)){let Z=_.indexOf("="),q=this._findOption(_.slice(0,Z));if(q&&(q.required||q.optional)){this.emit(`option:${q.name()}`,_.slice(Z+1));continue}}if(B(_))E=F;if((this._enablePositionalOptions||this._passThroughOptions)&&u.length===0&&F.length===0){if(this._findCommand(_)){if(u.push(_),C.length>0)F.push(...C);break}else if(this._getHelpCommand()&&_===this._getHelpCommand().name()){if(u.push(_),C.length>0)u.push(...C);break}else if(this._defaultCommandName){if(F.push(_),C.length>0)F.push(...C);break}}if(this._passThroughOptions){if(E.push(_),C.length>0)E.push(...C);break}E.push(_)}return{operands:u,unknown:F}}opts(){if(this._storeOptionsAsProperties){let D={},u=this.options.length;for(let F=0;F<u;F++){let E=this.options[F].attributeName();D[E]=E===this._versionOptionName?this._version:this[E]}return D}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((D,u)=>Object.assign(D,u.opts()),{})}error(D,u){if(this._outputConfiguration.outputError(`${D}
23
+ `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
24
+ `);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
25
+ `),this.outputHelp({error:!0});let F=u||{},E=F.exitCode||1,C=F.code||"commander.error";this._exit(E,C,D)}_parseOptionsEnv(){this.options.forEach((D)=>{if(D.envVar&&D.envVar in N.env){let u=D.attributeName();if(this.getOptionValue(u)===void 0||["default","config","env"].includes(this.getOptionValueSource(u)))if(D.required||D.optional)this.emit(`optionEnv:${D.name()}`,N.env[D.envVar]);else this.emit(`optionEnv:${D.name()}`)}})}_parseOptionsImplied(){let D=new u3(this.options),u=(F)=>{return this.getOptionValue(F)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(F))};this.options.filter((F)=>F.implied!==void 0&&u(F.attributeName())&&D.valueFromOption(this.getOptionValue(F.attributeName()),F)).forEach((F)=>{Object.keys(F.implied).filter((E)=>!u(E)).forEach((E)=>{this.setOptionValueWithSource(E,F.implied[E],"implied")})})}missingArgument(D){let u=`error: missing required argument '${D}'`;this.error(u,{code:"commander.missingArgument"})}optionMissingArgument(D){let u=`error: option '${D.flags}' argument missing`;this.error(u,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(D){let u=`error: required option '${D.flags}' not specified`;this.error(u,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(D,u){let F=(B)=>{let A=B.attributeName(),_=this.getOptionValue(A),Z=this.options.find(($)=>$.negate&&A===$.attributeName()),q=this.options.find(($)=>!$.negate&&A===$.attributeName());if(Z&&(Z.presetArg===void 0&&_===!1||Z.presetArg!==void 0&&_===Z.presetArg))return Z;return q||B},E=(B)=>{let A=F(B),_=A.attributeName();if(this.getOptionValueSource(_)==="env")return`environment variable '${A.envVar}'`;return`option '${A.flags}'`},C=`error: ${E(D)} cannot be used with ${E(u)}`;this.error(C,{code:"commander.conflictingOption"})}unknownOption(D){if(this._allowUnknownOption)return;let u="";if(D.startsWith("--")&&this._showSuggestionAfterError){let E=[],C=this;do{let B=C.createHelp().visibleOptions(C).filter((A)=>A.long).map((A)=>A.long);E=E.concat(B),C=C.parent}while(C&&!C._enablePositionalOptions);u=C0(D,E)}let F=`error: unknown option '${D}'${u}`;this.error(F,{code:"commander.unknownOption"})}_excessArguments(D){if(this._allowExcessArguments)return;let u=this.registeredArguments.length,F=u===1?"":"s",C=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${u} argument${F} but got ${D.length}.`;this.error(C,{code:"commander.excessArguments"})}unknownCommand(){let D=this.args[0],u="";if(this._showSuggestionAfterError){let E=[];this.createHelp().visibleCommands(this).forEach((C)=>{if(E.push(C.name()),C.alias())E.push(C.alias())}),u=C0(D,E)}let F=`error: unknown command '${D}'${u}`;this.error(F,{code:"commander.unknownCommand"})}version(D,u,F){if(D===void 0)return this._version;this._version=D,u=u||"-V, --version",F=F||"output the version number";let E=this.createOption(u,F);return this._versionOptionName=E.attributeName(),this._registerOption(E),this.on("option:"+E.name(),()=>{this._outputConfiguration.writeOut(`${D}
26
+ `),this._exit(0,"commander.version",D)}),this}description(D,u){if(D===void 0&&u===void 0)return this._description;if(this._description=D,u)this._argsDescription=u;return this}summary(D){if(D===void 0)return this._summary;return this._summary=D,this}alias(D){if(D===void 0)return this._aliases[0];let u=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)u=this.commands[this.commands.length-1];if(D===u._name)throw Error("Command alias can't be the same as its name");let F=this.parent?._findCommand(D);if(F){let E=[F.name()].concat(F.aliases()).join("|");throw Error(`cannot add alias '${D}' to command '${this.name()}' as already have command '${E}'`)}return u._aliases.push(D),this}aliases(D){if(D===void 0)return this._aliases;return D.forEach((u)=>this.alias(u)),this}usage(D){if(D===void 0){if(this._usage)return this._usage;let u=this.registeredArguments.map((F)=>{return t2(F)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?u:[]).join(" ")}return this._usage=D,this}name(D){if(D===void 0)return this._name;return this._name=D,this}nameFromFilename(D){return this._name=DD.basename(D,DD.extname(D)),this}executableDir(D){if(D===void 0)return this._executableDir;return this._executableDir=D,this}helpInformation(D){let u=this.createHelp(),F=this._getOutputContext(D);u.prepareContext({error:F.error,helpWidth:F.helpWidth,outputHasColors:F.hasColors});let E=u.formatHelp(this,u);if(F.hasColors)return E;return this._outputConfiguration.stripColor(E)}_getOutputContext(D){D=D||{};let u=!!D.error,F,E,C;if(u)F=(A)=>this._outputConfiguration.writeErr(A),E=this._outputConfiguration.getErrHasColors(),C=this._outputConfiguration.getErrHelpWidth();else F=(A)=>this._outputConfiguration.writeOut(A),E=this._outputConfiguration.getOutHasColors(),C=this._outputConfiguration.getOutHelpWidth();return{error:u,write:(A)=>{if(!E)A=this._outputConfiguration.stripColor(A);return F(A)},hasColors:E,helpWidth:C}}outputHelp(D){let u;if(typeof D==="function")u=D,D=void 0;let F=this._getOutputContext(D),E={error:F.error,write:F.write,command:this};this._getCommandAndAncestors().reverse().forEach((B)=>B.emit("beforeAllHelp",E)),this.emit("beforeHelp",E);let C=this.helpInformation({error:F.error});if(u){if(C=u(C),typeof C!=="string"&&!Buffer.isBuffer(C))throw Error("outputHelp callback must return a string or a Buffer")}if(F.write(C),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",E),this._getCommandAndAncestors().forEach((B)=>B.emit("afterAllHelp",E))}helpOption(D,u){if(typeof D==="boolean"){if(D)this._helpOption=this._helpOption??void 0;else this._helpOption=null;return this}return D=D??"-h, --help",u=u??"display help for command",this._helpOption=this.createOption(D,u),this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(D){return this._helpOption=D,this}help(D){this.outputHelp(D);let u=Number(N.exitCode??0);if(u===0&&D&&typeof D!=="function"&&D.error)u=1;this._exit(u,"commander.help","(outputHelp)")}addHelpText(D,u){let F=["beforeAll","before","after","afterAll"];if(!F.includes(D))throw Error(`Unexpected value for position to addHelpText.
27
+ Expecting one of '${F.join("', '")}'`);let E=`${D}Help`;return this.on(E,(C)=>{let B;if(typeof u==="function")B=u({error:C.error,command:C.command});else B=u;if(B)C.write(`${B}
28
+ `)}),this}_outputHelpIfRequested(D){let u=this._getHelpOption();if(u&&D.find((E)=>u.is(E)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function B0(D){return D.map((u)=>{if(!u.startsWith("--inspect"))return u;let F,E="127.0.0.1",C="9229",B;if((B=u.match(/^(--inspect(-brk)?)$/))!==null)F=B[1];else if((B=u.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(F=B[1],/^\d+$/.test(B[3]))C=B[3];else E=B[3];else if((B=u.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)F=B[1],E=B[3],C=B[4];if(F&&C!=="0")return`${F}=${E}:${parseInt(C)+1}`;return u})}function Eu(){if(N.env.NO_COLOR||N.env.FORCE_COLOR==="0"||N.env.FORCE_COLOR==="false")return!1;if(N.env.FORCE_COLOR||N.env.CLICOLOR_FORCE!==void 0)return!0;return}F3.Command=Cu;F3.useColor=Eu});var Au=j((_3)=>{var{Argument:_0}=wD(),{Command:Bu}=A0(),{CommanderError:B3,InvalidArgumentError:$0}=VD(),{Help:A3}=eD(),{Option:q0}=Du();_3.program=new Bu;_3.createCommand=(D)=>new Bu(D);_3.createOption=(D,u)=>new q0(D,u);_3.createArgument=(D,u)=>new _0(D,u);_3.Command=Bu;_3.Option=q0;_3.Argument=_0;_3.Help=A3;_3.CommanderError=B3;_3.InvalidArgumentError=$0;_3.InvalidOptionArgumentError=$0});var hD=j((Y6,w0)=>{var Ju=[],P0=0,g=(D,u)=>{if(P0>=u)Ju.push(D)};g.WARN=1;g.INFO=2;g.DEBUG=3;g.reset=()=>{Ju=[]};g.setDebugLevel=(D)=>{P0=D};g.warn=(D)=>g(D,g.WARN);g.info=(D)=>g(D,g.INFO);g.debug=(D)=>g(D,g.DEBUG);g.debugMessages=()=>Ju;w0.exports=g});var S0=j((K6,O0)=>{O0.exports=({onlyFirst:D=!1}={})=>{let u=["[\\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(u,D?void 0:"g")}});var f0=j((V6,b0)=>{var a3=S0();b0.exports=(D)=>typeof D==="string"?D.replace(a3(),""):D});var v0=j((M6,Yu)=>{var y0=(D)=>{if(Number.isNaN(D))return!1;if(D>=4352&&(D<=4447||D===9001||D===9002||11904<=D&&D<=12871&&D!==12351||12880<=D&&D<=19903||19968<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65131||65281<=D&&D<=65376||65504<=D&&D<=65510||110592<=D&&D<=110593||127488<=D&&D<=127569||131072<=D&&D<=262141))return!0;return!1};Yu.exports=y0;Yu.exports.default=y0});var x0=j((U6,k0)=>{k0.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var g0=j((R6,Ku)=>{var i3=f0(),n3=v0(),s3=x0(),h0=(D)=>{if(typeof D!=="string"||D.length===0)return 0;if(D=i3(D),D.length===0)return 0;D=D.replace(s3()," ");let u=0;for(let F=0;F<D.length;F++){let E=D.codePointAt(F);if(E<=31||E>=127&&E<=159)continue;if(E>=768&&E<=879)continue;if(E>65535)F++;u+=n3(E)?2:1}return u};Ku.exports=h0;Ku.exports.default=h0});var Vu=j((W6,p0)=>{var m0=g0();function gD(D){return D?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function s(D){let u=gD();return(""+D).replace(u,"").split(`
29
+ `).reduce(function(C,B){return m0(B)>C?m0(B):C},0)}function jD(D,u){return Array(u+1).join(D)}function o3(D,u,F,E){let C=s(D);if(u+1>=C){let B=u-C;switch(E){case"right":{D=jD(F,B)+D;break}case"center":{let A=Math.ceil(B/2),_=B-A;D=jD(F,_)+D+jD(F,A);break}default:{D=D+jD(F,B);break}}}return D}var GD={};function ND(D,u,F){u="\x1B["+u+"m",F="\x1B["+F+"m",GD[u]={set:D,to:!0},GD[F]={set:D,to:!1},GD[D]={on:u,off:F}}ND("bold",1,22);ND("italics",3,23);ND("underline",4,24);ND("inverse",7,27);ND("strikethrough",9,29);function c0(D,u){let F=u[1]?parseInt(u[1].split(";")[0]):0;if(F>=30&&F<=39||F>=90&&F<=97){D.lastForegroundAdded=u[0];return}if(F>=40&&F<=49||F>=100&&F<=107){D.lastBackgroundAdded=u[0];return}if(F===0){for(let C in D)if(Object.prototype.hasOwnProperty.call(D,C))delete D[C];return}let E=GD[u[0]];if(E)D[E.set]=E.to}function t3(D){let u=gD(!0),F=u.exec(D),E={};while(F!==null)c0(E,F),F=u.exec(D);return E}function d0(D,u){let{lastBackgroundAdded:F,lastForegroundAdded:E}=D;if(delete D.lastBackgroundAdded,delete D.lastForegroundAdded,Object.keys(D).forEach(function(C){if(D[C])u+=GD[C].off}),F&&F!="\x1B[49m")u+="\x1B[49m";if(E&&E!="\x1B[39m")u+="\x1B[39m";return u}function e3(D,u){let{lastBackgroundAdded:F,lastForegroundAdded:E}=D;if(delete D.lastBackgroundAdded,delete D.lastForegroundAdded,Object.keys(D).forEach(function(C){if(D[C])u=GD[C].on+u}),F&&F!="\x1B[49m")u=F+u;if(E&&E!="\x1B[39m")u=E+u;return u}function D8(D,u){if(D.length===s(D))return D.substr(0,u);while(s(D)>u)D=D.slice(0,-1);return D}function u8(D,u){let F=gD(!0),E=D.split(gD()),C=0,B=0,A="",_,Z={};while(B<u){_=F.exec(D);let q=E[C];if(C++,B+s(q)>u)q=D8(q,u-B);if(A+=q,B+=s(q),B<u){if(!_)break;A+=_[0],c0(Z,_)}}return d0(Z,A)}function F8(D,u,F){if(F=F||"…",s(D)<=u)return D;u-=s(F);let C=u8(D,u);C+=F;let B="\x1B]8;;\x07";if(D.includes(B)&&!C.includes(B))C+=B;return C}function E8(){return{chars:{top:"─","top-mid":"┬","top-left":"┌","top-right":"┐",bottom:"─","bottom-mid":"┴","bottom-left":"└","bottom-right":"┘",left:"│","left-mid":"├",mid:"─","mid-mid":"┼",right:"│","right-mid":"┤",middle:"│"},truncate:"…",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}}function C8(D,u){D=D||{},u=u||E8();let F=Object.assign({},u,D);return F.chars=Object.assign({},u.chars,D.chars),F.style=Object.assign({},u.style,D.style),F}function B8(D,u){let F=[],E=u.split(/(\s+)/g),C=[],B=0,A;for(let _=0;_<E.length;_+=2){let Z=E[_],q=B+s(Z);if(B>0&&A)q+=A.length;if(q>D){if(B!==0)F.push(C.join(""));C=[Z],B=s(Z)}else C.push(A||"",Z),B=q;A=E[_+1]}if(B)F.push(C.join(""));return F}function A8(D,u){let F=[],E="";function C(A,_){if(E.length&&_)E+=_;E+=A;while(E.length>D)F.push(E.slice(0,D)),E=E.slice(D)}let B=u.split(/(\s+)/g);for(let A=0;A<B.length;A+=2)C(B[A],A&&B[A-1]);if(E.length)F.push(E);return F}function _8(D,u,F=!0){let E=[];u=u.split(`
30
+ `);let C=F?B8:A8;for(let B=0;B<u.length;B++)E.push.apply(E,C(D,u[B]));return E}function $8(D){let u={},F=[];for(let E=0;E<D.length;E++){let C=e3(u,D[E]);u=t3(C);let B=Object.assign({},u);F.push(d0(B,C))}return F}function q8(D,u){return["\x1B]","8",";",";",D||u,"\x07",u,"\x1B]","8",";",";","\x07"].join("")}p0.exports={strlen:s,repeat:jD,pad:o3,truncate:F8,mergeOptions:C8,wordWrap:_8,colorizeLines:$8,hyperlink:q8}});var i0=j((j6,a0)=>{var r0={};a0.exports=r0;var l0={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(l0).forEach(function(D){var u=l0[D],F=r0[D]=[];F.open="\x1B["+u[0]+"m",F.close="\x1B["+u[1]+"m"})});var s0=j((N6,n0)=>{n0.exports=function(D,u){u=u||process.argv;var F=u.indexOf("--"),E=/^-{1,2}/.test(D)?"":"--",C=u.indexOf(E+D);return C!==-1&&(F===-1?!0:C<F)}});var t0=j((L6,o0)=>{var Z8=FD("os"),a=s0(),m=process.env,zD=void 0;if(a("no-color")||a("no-colors")||a("color=false"))zD=!1;else if(a("color")||a("colors")||a("color=true")||a("color=always"))zD=!0;if("FORCE_COLOR"in m)zD=m.FORCE_COLOR.length===0||parseInt(m.FORCE_COLOR,10)!==0;function X8(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function Q8(D){if(zD===!1)return 0;if(a("color=16m")||a("color=full")||a("color=truecolor"))return 3;if(a("color=256"))return 2;if(D&&!D.isTTY&&zD!==!0)return 0;var u=zD?1:0;if(process.platform==="win32"){var F=Z8.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(F[0])>=10&&Number(F[2])>=10586)return Number(F[2])>=14931?3:2;return 1}if("CI"in m){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(C){return C in m})||m.CI_NAME==="codeship")return 1;return u}if("TEAMCITY_VERSION"in m)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(m.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in m){var E=parseInt((m.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(m.TERM_PROGRAM){case"iTerm.app":return E>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(m.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(m.TERM))return 1;if("COLORTERM"in m)return 1;if(m.TERM==="dumb")return u;return u}function Mu(D){var u=Q8(D);return X8(u)}o0.exports={supportsColor:Mu,stdout:Mu(process.stdout),stderr:Mu(process.stderr)}});var DF=j((T6,e0)=>{e0.exports=function(u,F){var E="";u=u||"Run the trap, drop the bass",u=u.split("");var C={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return u.forEach(function(B){B=B.toLowerCase();var A=C[B]||[" "],_=Math.floor(Math.random()*A.length);if(typeof C[B]<"u")E+=C[B][_];else E+=B}),E}});var FF=j((I6,uF)=>{uF.exports=function(u,F){u=u||" he is here ";var E={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},C=[].concat(E.up,E.down,E.mid);function B(Z){var q=Math.floor(Math.random()*Z);return q}function A(Z){var q=!1;return C.filter(function($){q=$===Z}),q}function _(Z,q){var $="",Q,X;q=q||{},q.up=typeof q.up<"u"?q.up:!0,q.mid=typeof q.mid<"u"?q.mid:!0,q.down=typeof q.down<"u"?q.down:!0,q.size=typeof q.size<"u"?q.size:"maxi",Z=Z.split("");for(X in Z){if(A(X))continue;switch($=$+Z[X],Q={up:0,down:0,mid:0},q.size){case"mini":Q.up=B(8),Q.mid=B(2),Q.down=B(8);break;case"maxi":Q.up=B(16)+3,Q.mid=B(4)+1,Q.down=B(64)+3;break;default:Q.up=B(8)+1,Q.mid=B(6)/2,Q.down=B(8)+1;break}var H=["up","mid","down"];for(var G in H){var z=H[G];for(var Y=0;Y<=Q[z];Y++)if(q[z])$=$+E[z][B(E[z].length)]}}return $}return _(u,F)}});var CF=j((P6,EF)=>{EF.exports=function(D){return function(u,F,E){if(u===" ")return u;switch(F%3){case 0:return D.red(u);case 1:return D.white(u);case 2:return D.blue(u)}}}});var AF=j((w6,BF)=>{BF.exports=function(D){return function(u,F,E){return F%2===0?u:D.inverse(u)}}});var $F=j((O6,_F)=>{_F.exports=function(D){var u=["red","yellow","green","blue","magenta"];return function(F,E,C){if(F===" ")return F;else return D[u[E++%u.length]](F)}}});var ZF=j((S6,qF)=>{qF.exports=function(D){var u=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(F,E,C){return F===" "?F:D[u[Math.round(Math.random()*(u.length-2))]](F)}}});var zF=j((f6,GF)=>{var W={};GF.exports=W;W.themes={};var H8=FD("util"),BD=W.styles=i0(),XF=Object.defineProperties,G8=new RegExp(/[\r\n]+/g);W.supportsColor=t0().supportsColor;if(typeof W.enabled>"u")W.enabled=W.supportsColor()!==!1;W.enable=function(){W.enabled=!0};W.disable=function(){W.enabled=!1};W.stripColors=W.strip=function(D){return(""+D).replace(/\x1B\[\d+m/g,"")};var b6=W.stylize=function(u,F){if(!W.enabled)return u+"";var E=BD[F];if(!E&&F in W)return W[F](u);return E.open+u+E.close},z8=/[|\\{}()[\]^$+*?.]/g,J8=function(D){if(typeof D!=="string")throw TypeError("Expected a string");return D.replace(z8,"\\$&")};function QF(D){var u=function F(){return K8.apply(F,arguments)};return u._styles=D,u.__proto__=Y8,u}var HF=function(){var D={};return BD.grey=BD.gray,Object.keys(BD).forEach(function(u){BD[u].closeRe=new RegExp(J8(BD[u].close),"g"),D[u]={get:function(){return QF(this._styles.concat(u))}}}),D}(),Y8=XF(function(){},HF);function K8(){var D=Array.prototype.slice.call(arguments),u=D.map(function(A){if(A!=null&&A.constructor===String)return A;else return H8.inspect(A)}).join(" ");if(!W.enabled||!u)return u;var F=u.indexOf(`
31
+ `)!=-1,E=this._styles,C=E.length;while(C--){var B=BD[E[C]];if(u=B.open+u.replace(B.closeRe,B.open)+B.close,F)u=u.replace(G8,function(A){return B.close+A+B.open})}return u}W.setTheme=function(D){if(typeof D==="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var u in D)(function(F){W[F]=function(E){if(typeof D[F]==="object"){var C=E;for(var B in D[F])C=W[D[F][B]](C);return C}return W[D[F]](E)}})(u)};function V8(){var D={};return Object.keys(HF).forEach(function(u){D[u]={get:function(){return QF([u])}}}),D}var M8=function(u,F){var E=F.split("");return E=E.map(u),E.join("")};W.trap=DF();W.zalgo=FF();W.maps={};W.maps.america=CF()(W);W.maps.zebra=AF()(W);W.maps.rainbow=$F()(W);W.maps.random=ZF()(W);for(Uu in W.maps)(function(D){W[D]=function(u){return M8(W.maps[D],u)}})(Uu);var Uu;XF(W,V8())});var YF=j((y6,JF)=>{var U8=zF();JF.exports=U8});var UF=j((v6,dD)=>{var{info:R8,debug:MF}=hD(),c=Vu();class LD{constructor(D){this.setOptions(D),this.x=null,this.y=null}setOptions(D){if(["boolean","number","bigint","string"].indexOf(typeof D)!==-1)D={content:""+D};D=D||{},this.options=D;let u=D.content;if(["boolean","number","bigint","string"].indexOf(typeof u)!==-1)this.content=String(u);else if(!u)this.content=this.options.href||"";else throw Error("Content needs to be a primitive, got: "+typeof u);if(this.colSpan=D.colSpan||1,this.rowSpan=D.rowSpan||1,this.options.href)Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(D,u){this.cells=u;let F=this.options.chars||{},E=D.chars,C=this.chars={};j8.forEach(function(_){Ru(F,E,_,C)}),this.truncate=this.options.truncate||D.truncate;let B=this.options.style=this.options.style||{},A=D.style;Ru(B,A,"padding-left",this),Ru(B,A,"padding-right",this),this.head=B.head||A.head,this.border=B.border||A.border,this.fixedWidth=D.colWidths[this.x],this.lines=this.computeLines(D),this.desiredWidth=c.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(D){let u=D.wordWrap||D.textWrap,{wordWrap:F=u}=this.options;if(this.fixedWidth&&F){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let B=1;while(B<this.colSpan)this.fixedWidth+=D.colWidths[this.x+B],B++}let{wrapOnWordBoundary:E=!0}=D,{wrapOnWordBoundary:C=E}=this.options;return this.wrapLines(c.wordWrap(this.fixedWidth,this.content,C))}return this.wrapLines(this.content.split(`
32
+ `))}wrapLines(D){let u=c.colorizeLines(D);if(this.href)return u.map((F)=>c.hyperlink(this.href,F));return u}init(D){let u=this.x,F=this.y;this.widths=D.colWidths.slice(u,u+this.colSpan),this.heights=D.rowHeights.slice(F,F+this.rowSpan),this.width=this.widths.reduce(VF,-1),this.height=this.heights.reduce(VF,-1),this.hAlign=this.options.hAlign||D.colAligns[u],this.vAlign=this.options.vAlign||D.rowAligns[F],this.drawRight=u+this.colSpan==D.colWidths.length}draw(D,u){if(D=="top")return this.drawTop(this.drawRight);if(D=="bottom")return this.drawBottom(this.drawRight);let F=c.truncate(this.content,10,this.truncate);if(!D)R8(`${this.y}-${this.x}: ${this.rowSpan-D}x${this.colSpan} Cell ${F}`);let E=Math.max(this.height-this.lines.length,0),C;switch(this.vAlign){case"center":C=Math.ceil(E/2);break;case"bottom":C=E;break;default:C=0}if(D<C||D>=C+this.lines.length)return this.drawEmpty(this.drawRight,u);let B=this.lines.length>this.height&&D+1>=this.height;return this.drawLine(D-C,this.drawRight,B,u)}drawTop(D){let u=[];if(this.cells)this.widths.forEach(function(F,E){u.push(this._topLeftChar(E)),u.push(c.repeat(this.chars[this.y==0?"top":"mid"],F))},this);else u.push(this._topLeftChar(0)),u.push(c.repeat(this.chars[this.y==0?"top":"mid"],this.width));if(D)u.push(this.chars[this.y==0?"topRight":"rightMid"]);return this.wrapWithStyleColors("border",u.join(""))}_topLeftChar(D){let u=this.x+D,F;if(this.y==0)F=u==0?"topLeft":D==0?"topMid":"top";else if(u==0)F="leftMid";else if(F=D==0?"midMid":"bottomMid",this.cells){if(this.cells[this.y-1][u]instanceof LD.ColSpanCell)F=D==0?"topMid":"mid";if(D==0){let C=1;while(this.cells[this.y][u-C]instanceof LD.ColSpanCell)C++;if(this.cells[this.y][u-C]instanceof LD.RowSpanCell)F="leftMid"}}return this.chars[F]}wrapWithStyleColors(D,u){if(this[D]&&this[D].length)try{let F=YF();for(let E=this[D].length-1;E>=0;E--)F=F[this[D][E]];return F(u)}catch(F){return u}else return u}drawLine(D,u,F,E){let C=this.chars[this.x==0?"left":"middle"];if(this.x&&E&&this.cells){let Q=this.cells[this.y+E][this.x-1];while(Q instanceof mD)Q=this.cells[Q.y][Q.x-1];if(!(Q instanceof cD))C=this.chars.rightMid}let B=c.repeat(" ",this.paddingLeft),A=u?this.chars.right:"",_=c.repeat(" ",this.paddingRight),Z=this.lines[D],q=this.width-(this.paddingLeft+this.paddingRight);if(F)Z+=this.truncate||"…";let $=c.truncate(Z,q,this.truncate);return $=c.pad($,q," ",this.hAlign),$=B+$+_,this.stylizeLine(C,$,A)}stylizeLine(D,u,F){if(D=this.wrapWithStyleColors("border",D),F=this.wrapWithStyleColors("border",F),this.y===0)u=this.wrapWithStyleColors("head",u);return D+u+F}drawBottom(D){let u=this.chars[this.x==0?"bottomLeft":"bottomMid"],F=c.repeat(this.chars.bottom,this.width),E=D?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",u+F+E)}drawEmpty(D,u){let F=this.chars[this.x==0?"left":"middle"];if(this.x&&u&&this.cells){let B=this.cells[this.y+u][this.x-1];while(B instanceof mD)B=this.cells[B.y][B.x-1];if(!(B instanceof cD))F=this.chars.rightMid}let E=D?this.chars.right:"",C=c.repeat(" ",this.width);return this.stylizeLine(F,C,E)}}class mD{constructor(){}draw(D){if(typeof D==="number")MF(`${this.y}-${this.x}: 1x1 ColSpanCell`);return""}init(){}mergeTableOptions(){}}class cD{constructor(D){this.originalCell=D}init(D){let u=this.y,F=this.originalCell.y;this.cellOffset=u-F,this.offset=W8(D.rowHeights,F,this.cellOffset)}draw(D){if(D=="top")return this.originalCell.draw(this.offset,this.cellOffset);if(D=="bottom")return this.originalCell.draw("bottom");return MF(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+D)}mergeTableOptions(){}}function KF(...D){return D.filter((u)=>u!==void 0&&u!==null).shift()}function Ru(D,u,F,E){let C=F.split("-");if(C.length>1)C[1]=C[1].charAt(0).toUpperCase()+C[1].substr(1),C=C.join(""),E[C]=KF(D[C],D[F],u[C],u[F]);else E[F]=KF(D[F],u[F])}function W8(D,u,F){let E=D[u];for(let C=1;C<F;C++)E+=1+D[u+C];return E}function VF(D,u){return D+u+1}var j8=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];dD.exports=LD;dD.exports.ColSpanCell=mD;dD.exports.RowSpanCell=cD});var jF=j((k6,WF)=>{var{warn:N8,debug:L8}=hD(),Wu=UF(),{ColSpanCell:T8,RowSpanCell:I8}=Wu;(function(){function D(H,G){if(H[G]>0)return D(H,G+1);return G}function u(H){let G={};H.forEach(function(z,Y){let V=0;z.forEach(function(K){K.y=Y,K.x=Y?D(G,V):V;let M=K.rowSpan||1,U=K.colSpan||1;if(M>1)for(let R=0;R<U;R++)G[K.x+R]=M;V=K.x+U}),Object.keys(G).forEach((K)=>{if(G[K]--,G[K]<1)delete G[K]})})}function F(H){let G=0;return H.forEach(function(z){z.forEach(function(Y){G=Math.max(G,Y.x+(Y.colSpan||1))})}),G}function E(H){return H.length}function C(H,G){let z=H.y,Y=H.y-1+(H.rowSpan||1),V=G.y,K=G.y-1+(G.rowSpan||1),M=!(z>K||V>Y),U=H.x,R=H.x-1+(H.colSpan||1),h=G.x,I=G.x-1+(G.colSpan||1),y=!(U>I||h>R);return M&&y}function B(H,G,z){let Y=Math.min(H.length-1,z),V={x:G,y:z};for(let K=0;K<=Y;K++){let M=H[K];for(let U=0;U<M.length;U++)if(C(V,M[U]))return!0}return!1}function A(H,G,z,Y){for(let V=z;V<Y;V++)if(B(H,V,G))return!1;return!0}function _(H){H.forEach(function(G,z){G.forEach(function(Y){for(let V=1;V<Y.rowSpan;V++){let K=new I8(Y);K.x=Y.x,K.y=Y.y+V,K.colSpan=Y.colSpan,q(K,H[z+V])}})})}function Z(H){for(let G=H.length-1;G>=0;G--){let z=H[G];for(let Y=0;Y<z.length;Y++){let V=z[Y];for(let K=1;K<V.colSpan;K++){let M=new T8;M.x=V.x+K,M.y=V.y,z.splice(Y+1,0,M)}}}}function q(H,G){let z=0;while(z<G.length&&G[z].x<H.x)z++;G.splice(z,0,H)}function $(H){let G=E(H),z=F(H);L8(`Max rows: ${G}; Max cols: ${z}`);for(let Y=0;Y<G;Y++)for(let V=0;V<z;V++)if(!B(H,V,Y)){let K={x:V,y:Y,colSpan:1,rowSpan:1};V++;while(V<z&&!B(H,V,Y))K.colSpan++,V++;let M=Y+1;while(M<G&&A(H,M,K.x,K.x+K.colSpan))K.rowSpan++,M++;let U=new Wu(K);U.x=K.x,U.y=K.y,N8(`Missing cell at ${U.y}-${U.x}.`),q(U,H[Y])}}function Q(H){return H.map(function(G){if(!Array.isArray(G)){let z=Object.keys(G)[0];if(G=G[z],Array.isArray(G))G=G.slice(),G.unshift(z);else G=[z,G]}return G.map(function(z){return new Wu(z)})})}function X(H){let G=Q(H);return u(G),$(G),_(G),Z(G),G}WF.exports={makeTableLayout:X,layoutTable:u,addRowSpanCells:_,maxWidth:F,fillInTable:$,computeWidths:RF("colSpan","desiredWidth","x",1),computeHeights:RF("rowSpan","desiredHeight","y",1)}})();function RF(D,u,F,E){return function(C,B){let A=[],_=[],Z={};B.forEach(function(q){q.forEach(function($){if(($[D]||1)>1)_.push($);else A[$[F]]=Math.max(A[$[F]]||0,$[u]||0,E)})}),C.forEach(function(q,$){if(typeof q==="number")A[$]=q});for(let q=_.length-1;q>=0;q--){let $=_[q],Q=$[D],X=$[F],H=A[X],G=typeof C[X]==="number"?0:1;if(typeof H==="number"){for(let z=1;z<Q;z++)if(H+=1+A[X+z],typeof C[X+z]!=="number")G++}else if(H=u==="desiredWidth"?$.desiredWidth-1:1,!Z[X]||Z[X]<H)Z[X]=H;if($[u]>H){let z=0;while(G>0&&$[u]>H){if(typeof C[X+z]!=="number"){let Y=Math.round(($[u]-H)/G);H+=Y,A[X+z]+=Y,G--}z++}}}Object.assign(C,A,Z);for(let q=0;q<C.length;q++)C[q]=Math.max(E,C[q]||0)}}});var LF=j((x6,NF)=>{var uD=hD(),P8=Vu(),ju=jF();class Lu extends Array{constructor(D){super();let u=P8.mergeOptions(D);if(Object.defineProperty(this,"options",{value:u,enumerable:u.debug}),u.debug){switch(typeof u.debug){case"boolean":uD.setDebugLevel(uD.WARN);break;case"number":uD.setDebugLevel(u.debug);break;case"string":uD.setDebugLevel(parseInt(u.debug,10));break;default:uD.setDebugLevel(uD.WARN),uD.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof u.debug}`)}Object.defineProperty(this,"messages",{get(){return uD.debugMessages()}})}}toString(){let D=this,u=this.options.head&&this.options.head.length;if(u){if(D=[this.options.head],this.length)D.push.apply(D,this)}else this.options.style.head=[];let F=ju.makeTableLayout(D);F.forEach(function(C){C.forEach(function(B){B.mergeTableOptions(this.options,F)},this)},this),ju.computeWidths(this.options.colWidths,F),ju.computeHeights(this.options.rowHeights,F),F.forEach(function(C){C.forEach(function(B){B.init(this.options)},this)},this);let E=[];for(let C=0;C<F.length;C++){let B=F[C],A=this.options.rowHeights[C];if(C===0||!this.options.style.compact||C==1&&u)Nu(B,"top",E);for(let _=0;_<A;_++)Nu(B,_,E);if(C+1==F.length)Nu(B,"bottom",E)}return E.join(`
33
+ `)}get width(){return this.toString().split(`
34
+ `)[0].length}}Lu.reset=()=>uD.reset();function Nu(D,u,F){let E=[];D.forEach(function(B){E.push(B.draw(u))});let C=E.join("");if(C.length)F.push(C)}NF.exports=Lu});var vF=j((DC,g8)=>{g8.exports={dots:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},dots2:{interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},dots3:{interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},dots4:{interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},dots5:{interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},dots6:{interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},dots7:{interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},dots8:{interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},dots9:{interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},dots10:{interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},dots11:{interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},dots12:{interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},dots13:{interval:80,frames:["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},dots8Bit:{interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},sand:{interval:80,frames:["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["⠂","-","–","—","–","-"]},pipe:{interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["✶","✸","✹","✺","✹","✷"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},hamburger:{interval:100,frames:["☱","☲","☴"]},growVertical:{interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},growHorizontal:{interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","°","O","o","."]},noise:{interval:100,frames:["▓","▒","░"]},bounce:{interval:120,frames:["⠁","⠂","⠄","⠂"]},boxBounce:{interval:120,frames:["▖","▘","▝","▗"]},boxBounce2:{interval:100,frames:["▌","▀","▐","▄"]},triangle:{interval:50,frames:["◢","◣","◤","◥"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["◜","◠","◝","◞","◡","◟"]},circle:{interval:120,frames:["◡","⊙","◠"]},squareCorners:{interval:180,frames:["◰","◳","◲","◱"]},circleQuarters:{interval:120,frames:["◴","◷","◶","◵"]},circleHalves:{interval:50,frames:["◐","◓","◑","◒"]},squish:{interval:100,frames:["╫","╪"]},toggle:{interval:250,frames:["⊶","⊷"]},toggle2:{interval:80,frames:["▫","▪"]},toggle3:{interval:120,frames:["□","■"]},toggle4:{interval:100,frames:["■","□","▪","▫"]},toggle5:{interval:100,frames:["▮","▯"]},toggle6:{interval:300,frames:["ဝ","၀"]},toggle7:{interval:80,frames:["⦾","⦿"]},toggle8:{interval:100,frames:["◍","◌"]},toggle9:{interval:100,frames:["◉","◎"]},toggle10:{interval:100,frames:["㊂","㊀","㊁"]},toggle11:{interval:50,frames:["⧇","⧆"]},toggle12:{interval:120,frames:["☗","☖"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},arrow2:{interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},arrow3:{interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},smiley:{interval:200,frames:["😄 ","😝 "]},monkey:{interval:300,frames:["🙈 ","🙈 ","🙉 ","🙊 "]},hearts:{interval:100,frames:["💛 ","💙 ","💜 ","💚 ","❤️ "]},clock:{interval:100,frames:["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},earth:{interval:180,frames:["🌍 ","🌎 ","🌏 "]},material:{interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},moon:{interval:80,frames:["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},runner:{interval:140,frames:["🚶 ","🏃 "]},pong:{interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},shark:{interval:120,frames:["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},christmas:{interval:400,frames:["🌲","🎄"]},grenade:{interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},point:{interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},layer:{interval:150,frames:["-","=","≡"]},betaWave:{interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},fingerDance:{interval:160,frames:["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},fistBump:{interval:80,frames:["🤜    🤛 ","🤜    🤛 ","🤜    🤛 "," 🤜  🤛  ","  🤜🤛   "," 🤜✨🤛   ","🤜 ✨ 🤛  "]},soccerHeader:{interval:80,frames:[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},mindblown:{interval:160,frames:["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ ","  ","  ","  "]},speaker:{interval:160,frames:["🔈 ","🔉 ","🔊 ","🔉 "]},orangePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},bluePulse:{interval:100,frames:["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},orangeBluePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},timeTravel:{interval:100,frames:["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},aesthetic:{interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},dwarfFortress:{interval:80,frames:[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]}}});var bu=j((uC,xF)=>{var iD=Object.assign({},vF()),kF=Object.keys(iD);Object.defineProperty(iD,"random",{get(){let D=Math.floor(Math.random()*kF.length),u=kF[D];return iD[u]}});xF.exports=iD});var pF=j((GC,dF)=>{dF.exports=()=>{return/[#*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](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\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(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\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](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\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-\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-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\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-\uDED8\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\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\uDD3C-\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-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\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\uDE70]|\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\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 Z0=CD(Au(),1),{program:NE,createCommand:LE,createArgument:TE,createOption:IE,CommanderError:PE,InvalidArgumentError:wE,InvalidOptionArgumentError:OE,Command:X0,Argument:SE,Option:bE,Help:fE}=Z0.default;var Q0=(D=0)=>(u)=>`\x1B[${u+D}m`,H0=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,G0=(D=0)=>(u,F,E)=>`\x1B[${38+D};2;${u};${F};${E}m`,P={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},vE=Object.keys(P.modifier),V3=Object.keys(P.color),M3=Object.keys(P.bgColor),kE=[...V3,...M3];function U3(){let D=new Map;for(let[u,F]of Object.entries(P)){for(let[E,C]of Object.entries(F))P[E]={open:`\x1B[${C[0]}m`,close:`\x1B[${C[1]}m`},F[E]=P[E],D.set(C[0],C[1]);Object.defineProperty(P,u,{value:F,enumerable:!1})}return Object.defineProperty(P,"codes",{value:D,enumerable:!1}),P.color.close="\x1B[39m",P.bgColor.close="\x1B[49m",P.color.ansi=Q0(),P.color.ansi256=H0(),P.color.ansi16m=G0(),P.bgColor.ansi=Q0(10),P.bgColor.ansi256=H0(10),P.bgColor.ansi16m=G0(10),Object.defineProperties(P,{rgbToAnsi256:{value(u,F,E){if(u===F&&F===E){if(u<8)return 16;if(u>248)return 231;return Math.round((u-8)/247*24)+232}return 16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(E/255*5)},enumerable:!1},hexToRgb:{value(u){let F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[E]=F;if(E.length===3)E=[...E].map((B)=>B+B).join("");let C=Number.parseInt(E,16);return[C>>16&255,C>>8&255,C&255]},enumerable:!1},hexToAnsi256:{value:(u)=>P.rgbToAnsi256(...P.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,E,C;if(u>=232)F=((u-232)*10+8)/255,E=F,C=F;else{u-=16;let _=u%36;F=Math.floor(u/36)/5,E=Math.floor(_/6)/5,C=_%6/5}let B=Math.max(F,E,C)*2;if(B===0)return 30;let A=30+(Math.round(C)<<2|Math.round(E)<<1|Math.round(F));if(B===2)A+=60;return A},enumerable:!1},rgbToAnsi:{value:(u,F,E)=>P.ansi256ToAnsi(P.rgbToAnsi256(u,F,E)),enumerable:!1},hexToAnsi:{value:(u)=>P.ansi256ToAnsi(P.hexToAnsi256(u)),enumerable:!1}}),P}var R3=U3(),O=R3;import _u from"node:process";import W3 from"node:os";import z0 from"node:tty";function p(D,u=globalThis.Deno?globalThis.Deno.args:_u.argv){let F=D.startsWith("-")?"":D.length===1?"-":"--",E=u.indexOf(F+D),C=u.indexOf("--");return E!==-1&&(C===-1||E<C)}var{env:w}=_u,SD;if(p("no-color")||p("no-colors")||p("color=false")||p("color=never"))SD=0;else if(p("color")||p("colors")||p("color=true")||p("color=always"))SD=1;function j3(){if("FORCE_COLOR"in w){if(w.FORCE_COLOR==="true")return 1;if(w.FORCE_COLOR==="false")return 0;return w.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(w.FORCE_COLOR,10),3)}}function N3(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function L3(D,{streamIsTTY:u,sniffFlags:F=!0}={}){let E=j3();if(E!==void 0)SD=E;let C=F?SD:E;if(C===0)return 0;if(F){if(p("color=16m")||p("color=full")||p("color=truecolor"))return 3;if(p("color=256"))return 2}if("TF_BUILD"in w&&"AGENT_NAME"in w)return 1;if(D&&!u&&C===void 0)return 0;let B=C||0;if(w.TERM==="dumb")return B;if(_u.platform==="win32"){let A=W3.release().split(".");if(Number(A[0])>=10&&Number(A[2])>=10586)return Number(A[2])>=14931?3:2;return 1}if("CI"in w){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((A)=>(A in w)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((A)=>(A in w))||w.CI_NAME==="codeship")return 1;return B}if("TEAMCITY_VERSION"in w)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(w.TEAMCITY_VERSION)?1:0;if(w.COLORTERM==="truecolor")return 3;if(w.TERM==="xterm-kitty")return 3;if(w.TERM==="xterm-ghostty")return 3;if(w.TERM==="wezterm")return 3;if("TERM_PROGRAM"in w){let A=Number.parseInt((w.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(w.TERM_PROGRAM){case"iTerm.app":return A>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(w.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(w.TERM))return 1;if("COLORTERM"in w)return 1;return B}function J0(D,u={}){let F=L3(D,{streamIsTTY:D&&D.isTTY,...u});return N3(F)}var T3={stdout:J0({isTTY:z0.isatty(1)}),stderr:J0({isTTY:z0.isatty(2)})},bD=T3;function fD(D,u,F){let E=D.indexOf(u);if(E===-1)return D;let C=u.length,B=0,A="";do A+=D.slice(B,E)+u+F,B=E+C,E=D.indexOf(u,B);while(E!==-1);return A+=D.slice(B),A}function yD(D,u,F,E){let C=0,B="";do{let A=D[E-1]==="\r";B+=D.slice(C,A?E-1:E)+u+(A?`\r
35
+ `:`
36
+ `)+F,C=E+1,E=D.indexOf(`
37
+ `,C)}while(E!==-1);return B+=D.slice(C),B}var{stdout:Y0,stderr:K0}=bD,$u=Symbol("GENERATOR"),ZD=Symbol("STYLER"),MD=Symbol("IS_EMPTY"),V0=["ansi","ansi","ansi256","ansi16m"],XD=Object.create(null),I3=(D,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let F=Y0?Y0.level:0;D.level=u.level===void 0?F:u.level};var P3=(D)=>{let u=(...F)=>F.join(" ");return I3(u,D),Object.setPrototypeOf(u,UD.prototype),u};function UD(D){return P3(D)}Object.setPrototypeOf(UD.prototype,Function.prototype);for(let[D,u]of Object.entries(O))XD[D]={get(){let F=vD(this,Zu(u.open,u.close,this[ZD]),this[MD]);return Object.defineProperty(this,D,{value:F}),F}};XD.visible={get(){let D=vD(this,this[ZD],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var qu=(D,u,F,...E)=>{if(D==="rgb"){if(u==="ansi16m")return O[F].ansi16m(...E);if(u==="ansi256")return O[F].ansi256(O.rgbToAnsi256(...E));return O[F].ansi(O.rgbToAnsi(...E))}if(D==="hex")return qu("rgb",u,F,...O.hexToRgb(...E));return O[F][D](...E)},w3=["rgb","hex","ansi256"];for(let D of w3){XD[D]={get(){let{level:F}=this;return function(...E){let C=Zu(qu(D,V0[F],"color",...E),O.color.close,this[ZD]);return vD(this,C,this[MD])}}};let u="bg"+D[0].toUpperCase()+D.slice(1);XD[u]={get(){let{level:F}=this;return function(...E){let C=Zu(qu(D,V0[F],"bgColor",...E),O.bgColor.close,this[ZD]);return vD(this,C,this[MD])}}}}var O3=Object.defineProperties(()=>{},{...XD,level:{enumerable:!0,get(){return this[$u].level},set(D){this[$u].level=D}}}),Zu=(D,u,F)=>{let E,C;if(F===void 0)E=D,C=u;else E=F.openAll+D,C=u+F.closeAll;return{open:D,close:u,openAll:E,closeAll:C,parent:F}},vD=(D,u,F)=>{let E=(...C)=>S3(E,C.length===1?""+C[0]:C.join(" "));return Object.setPrototypeOf(E,O3),E[$u]=D,E[ZD]=u,E[MD]=F,E},S3=(D,u)=>{if(D.level<=0||!u)return D[MD]?"":u;let F=D[ZD];if(F===void 0)return u;let{openAll:E,closeAll:C}=F;if(u.includes("\x1B"))while(F!==void 0)u=fD(u,F.close,F.open),F=F.parent;let B=u.indexOf(`
38
+ `);if(B!==-1)u=yD(u,C,E,B);return E+u+C};Object.defineProperties(UD.prototype,XD);var b3=UD(),aE=UD({level:K0?K0.level:0});var M0=b3;import{createRequire as HE}from"module";var U0=CD(Au(),1),{program:nE,createCommand:sE,createArgument:oE,createOption:tE,CommanderError:eE,InvalidArgumentError:D6,InvalidOptionArgumentError:u6,Command:F6,Argument:E6,Option:R0,Help:C6}=U0.default;var{stdout:W0,stderr:j0}=bD,Xu=Symbol("GENERATOR"),QD=Symbol("STYLER"),RD=Symbol("IS_EMPTY"),N0=["ansi","ansi","ansi256","ansi16m"],HD=Object.create(null),f3=(D,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let F=W0?W0.level:0;D.level=u.level===void 0?F:u.level};var y3=(D)=>{let u=(...F)=>F.join(" ");return f3(u,D),Object.setPrototypeOf(u,WD.prototype),u};function WD(D){return y3(D)}Object.setPrototypeOf(WD.prototype,Function.prototype);for(let[D,u]of Object.entries(O))HD[D]={get(){let F=kD(this,Hu(u.open,u.close,this[QD]),this[RD]);return Object.defineProperty(this,D,{value:F}),F}};HD.visible={get(){let D=kD(this,this[QD],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var Qu=(D,u,F,...E)=>{if(D==="rgb"){if(u==="ansi16m")return O[F].ansi16m(...E);if(u==="ansi256")return O[F].ansi256(O.rgbToAnsi256(...E));return O[F].ansi(O.rgbToAnsi(...E))}if(D==="hex")return Qu("rgb",u,F,...O.hexToRgb(...E));return O[F][D](...E)},v3=["rgb","hex","ansi256"];for(let D of v3){HD[D]={get(){let{level:F}=this;return function(...E){let C=Hu(Qu(D,N0[F],"color",...E),O.color.close,this[QD]);return kD(this,C,this[RD])}}};let u="bg"+D[0].toUpperCase()+D.slice(1);HD[u]={get(){let{level:F}=this;return function(...E){let C=Hu(Qu(D,N0[F],"bgColor",...E),O.bgColor.close,this[QD]);return kD(this,C,this[RD])}}}}var k3=Object.defineProperties(()=>{},{...HD,level:{enumerable:!0,get(){return this[Xu].level},set(D){this[Xu].level=D}}}),Hu=(D,u,F)=>{let E,C;if(F===void 0)E=D,C=u;else E=F.openAll+D,C=u+F.closeAll;return{open:D,close:u,openAll:E,closeAll:C,parent:F}},kD=(D,u,F)=>{let E=(...C)=>x3(E,C.length===1?""+C[0]:C.join(" "));return Object.setPrototypeOf(E,k3),E[Xu]=D,E[QD]=u,E[RD]=F,E},x3=(D,u)=>{if(D.level<=0||!u)return D[RD]?"":u;let F=D[QD];if(F===void 0)return u;let{openAll:E,closeAll:C}=F;if(u.includes("\x1B"))while(F!==void 0)u=fD(u,F.close,F.open),F=F.parent;let B=u.indexOf(`
39
+ `);if(B!==-1)u=yD(u,C,E,B);return E+u+C};Object.defineProperties(WD.prototype,HD);var h3=WD(),q6=WD({level:j0?j0.level:0});var J=h3;import{promises as xD}from"fs";import g3 from"os";import L0 from"path";var m3="https://api.xevol.com",T0=L0.join(g3.homedir(),".xevol"),Gu=L0.join(T0,"config.json");async function c3(){await xD.mkdir(T0,{recursive:!0})}async function f(){try{let D=await xD.readFile(Gu,"utf8");return JSON.parse(D)}catch(D){if(D.code==="ENOENT")return null;if(D instanceof SyntaxError)return console.error("Warning: config.json is corrupt. Run `xevol login` to fix it."),null;throw D}}async function d3(D){await c3();let u=JSON.stringify(D,null,2)+`
40
+ `;await xD.writeFile(Gu,u,{encoding:"utf8",mode:384})}async function zu(D){let F={...await f()??{},...D};return await d3(F),F}async function I0(){try{await xD.unlink(Gu)}catch(D){if(D.code!=="ENOENT")throw D}}function S(D){return process.env.XEVOL_API_URL??D?.apiUrl??m3}function v(D,u){let F=u??process.env.XEVOL_TOKEN??D?.token;if(F&&!u&&!process.env.XEVOL_TOKEN&&D?.expiresAt){let E=new Date(D.expiresAt).getTime();if(Number.isFinite(E)&&Date.now()>=E)return{token:void 0,expired:!0}}return{token:F,expired:!1}}function k(D,u){if(D.token)return D.token;return(typeof u.optsWithGlobals==="function"?u.optsWithGlobals():u.parent?.opts()??{}).token}function p3(D,u,F){let E=F??S(),C=new URL(D,E);if(u)for(let[B,A]of Object.entries(u)){if(A===void 0||A===null)continue;C.searchParams.set(B,String(A))}return C}function l3(D,u){let F=u?.trim();if(!F)return D;let E=new Headers(D);return E.set("Authorization",`Bearer ${F}`),E}async function r3(D){let u=D.headers.get("content-type")??"";try{if(u.includes("application/json")){let F=await D.json();return F.message??F.error??JSON.stringify(F)}return await D.text()}catch{return null}}async function b(D,{method:u,query:F,body:E,headers:C,token:B,apiUrl:A}={}){let _=p3(D,F,A),Z=l3(C??{},B);if(E!==void 0&&!(E instanceof FormData))Z.set("Content-Type","application/json");let q;try{q=await fetch(_,{method:u??(E===void 0?"GET":"POST"),headers:Z,body:E===void 0?void 0:E instanceof FormData?E:JSON.stringify(E),signal:AbortSignal.timeout(30000)})}catch(Q){if(Q.name==="TimeoutError")throw Error(`Request timed out after 30s. Is the API at ${_.origin} reachable?`);throw Error(`Network error: could not reach ${_.origin}. Check your connection or API status.`)}if(!q.ok){let Q=await r3(q),X=Q?`API ${q.status}: ${Q}`:`API ${q.status} ${q.statusText}`;throw Error(X)}if((q.headers.get("content-type")??"").includes("application/json"))return await q.json();return await q.text()}var sF=CD(LF(),1);import nD from"node:process";import yF from"node:process";import rD from"node:process";var w8=(D,u,F,E)=>{if(F==="length"||F==="prototype")return;if(F==="arguments"||F==="caller")return;let C=Object.getOwnPropertyDescriptor(D,F),B=Object.getOwnPropertyDescriptor(u,F);if(!O8(C,B)&&E)return;Object.defineProperty(D,F,B)},O8=function(D,u){return D===void 0||D.configurable||D.writable===u.writable&&D.enumerable===u.enumerable&&D.configurable===u.configurable&&(D.writable||D.value===u.value)},S8=(D,u)=>{let F=Object.getPrototypeOf(u);if(F===Object.getPrototypeOf(D))return;Object.setPrototypeOf(D,F)},b8=(D,u)=>`/* Wrapped ${D}*/
41
+ ${u}`,f8=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),y8=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),v8=(D,u,F)=>{let E=F===""?"":`with ${F.trim()}() `,C=b8.bind(null,E,u.toString());Object.defineProperty(C,"name",y8);let{writable:B,enumerable:A,configurable:_}=f8;Object.defineProperty(D,"toString",{value:C,writable:B,enumerable:A,configurable:_})};function Tu(D,u,{ignoreNonConfigurable:F=!1}={}){let{name:E}=D;for(let C of Reflect.ownKeys(u))w8(D,u,C,F);return S8(D,u),v8(D,u,E),D}var pD=new WeakMap,TF=(D,u={})=>{if(typeof D!=="function")throw TypeError("Expected a function");let F,E=0,C=D.displayName||D.name||"<anonymous>",B=function(...A){if(pD.set(B,++E),E===1)F=D.apply(this,A),D=void 0;else if(u.throw===!0)throw Error(`Function \`${C}\` can only be called once`);return F};return Tu(B,D),pD.set(B,E),B};TF.callCount=(D)=>{if(!pD.has(D))throw Error(`The given function \`${D.name}\` is not wrapped by the \`onetime\` package`);return pD.get(D)};var IF=TF;var AD=[];AD.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")AD.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")AD.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var lD=(D)=>!!D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function",Iu=Symbol.for("signal-exit emitter"),Pu=globalThis,k8=Object.defineProperty.bind(Object);class PF{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Pu[Iu])return Pu[Iu];k8(Pu,Iu,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(D,u){this.listeners[D].push(u)}removeListener(D,u){let F=this.listeners[D],E=F.indexOf(u);if(E===-1)return;if(E===0&&F.length===1)F.length=0;else F.splice(E,1)}emit(D,u,F){if(this.emitted[D])return!1;this.emitted[D]=!0;let E=!1;for(let C of this.listeners[D])E=C(u,F)===!0||E;if(D==="exit")E=this.emit("afterExit",u,F)||E;return E}}class Ou{}var x8=(D)=>{return{onExit(u,F){return D.onExit(u,F)},load(){return D.load()},unload(){return D.unload()}}};class wF extends Ou{onExit(){return()=>{}}load(){}unload(){}}class OF extends Ou{#A=wu.platform==="win32"?"SIGINT":"SIGHUP";#F=new PF;#D;#C;#Q;#u={};#B=!1;constructor(D){super();this.#D=D,this.#u={};for(let u of AD)this.#u[u]=()=>{let F=this.#D.listeners(u),{count:E}=this.#F,C=D;if(typeof C.__signal_exit_emitter__==="object"&&typeof C.__signal_exit_emitter__.count==="number")E+=C.__signal_exit_emitter__.count;if(F.length===E){this.unload();let B=this.#F.emit("exit",null,u),A=u==="SIGHUP"?this.#A:u;if(!B)D.kill(D.pid,A)}};this.#Q=D.reallyExit,this.#C=D.emit}onExit(D,u){if(!lD(this.#D))return()=>{};if(this.#B===!1)this.load();let F=u?.alwaysLast?"afterExit":"exit";return this.#F.on(F,D),()=>{if(this.#F.removeListener(F,D),this.#F.listeners.exit.length===0&&this.#F.listeners.afterExit.length===0)this.unload()}}load(){if(this.#B)return;this.#B=!0,this.#F.count+=1;for(let D of AD)try{let u=this.#u[D];if(u)this.#D.on(D,u)}catch(u){}this.#D.emit=(D,...u)=>{return this.#H(D,...u)},this.#D.reallyExit=(D)=>{return this.#E(D)}}unload(){if(!this.#B)return;this.#B=!1,AD.forEach((D)=>{let u=this.#u[D];if(!u)throw Error("Listener not defined for signal: "+D);try{this.#D.removeListener(D,u)}catch(F){}}),this.#D.emit=this.#C,this.#D.reallyExit=this.#Q,this.#F.count-=1}#E(D){if(!lD(this.#D))return 0;return this.#D.exitCode=D||0,this.#F.emit("exit",this.#D.exitCode,null),this.#Q.call(this.#D,this.#D.exitCode)}#H(D,...u){let F=this.#C;if(D==="exit"&&lD(this.#D)){if(typeof u[0]==="number")this.#D.exitCode=u[0];let E=F.call(this.#D,D,...u);return this.#F.emit("exit",this.#D.exitCode,null),E}else return F.call(this.#D,D,...u)}}var wu=globalThis.process,{onExit:SF,load:p6,unload:l6}=x8(lD(wu)?new OF(wu):new wF);var bF=rD.stderr.isTTY?rD.stderr:rD.stdout.isTTY?rD.stdout:void 0,h8=bF?IF(()=>{SF(()=>{bF.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},fF=h8;var aD=!1,JD={};JD.show=(D=yF.stderr)=>{if(!D.isTTY)return;aD=!1,D.write("\x1B[?25h")};JD.hide=(D=yF.stderr)=>{if(!D.isTTY)return;fF(),aD=!0,D.write("\x1B[?25l")};JD.toggle=(D,u)=>{if(D!==void 0)aD=D;if(aD)JD.show(u);else JD.hide(u)};var Su=JD;var PD=CD(bu(),1);import i from"node:process";function fu(){if(i.platform!=="win32")return i.env.TERM!=="linux";return Boolean(i.env.CI)||Boolean(i.env.WT_SESSION)||Boolean(i.env.TERMINUS_SUBLIME)||i.env.ConEmuTask==="{cmd::Cmder}"||i.env.TERM_PROGRAM==="Terminus-Sublime"||i.env.TERM_PROGRAM==="vscode"||i.env.TERM==="xterm-256color"||i.env.TERM==="alacritty"||i.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var m8={info:J.blue("ℹ"),success:J.green("✔"),warning:J.yellow("⚠"),error:J.red("✖")},c8={info:J.blue("i"),success:J.green("√"),warning:J.yellow("‼"),error:J.red("×")},d8=fu()?m8:c8,TD=d8;function yu({onlyFirst:D=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",D?void 0:"g")}var p8=yu();function ID(D){if(typeof D!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(p8,"")}function hF(D){return D===161||D===164||D===167||D===168||D===170||D===173||D===174||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||D===198||D===208||D===215||D===216||D>=222&&D<=225||D===230||D>=232&&D<=234||D===236||D===237||D===240||D===242||D===243||D>=247&&D<=250||D===252||D===254||D===257||D===273||D===275||D===283||D===294||D===295||D===299||D>=305&&D<=307||D===312||D>=319&&D<=322||D===324||D>=328&&D<=331||D===333||D===338||D===339||D===358||D===359||D===363||D===462||D===464||D===466||D===468||D===470||D===472||D===474||D===476||D===593||D===609||D===708||D===711||D>=713&&D<=715||D===717||D===720||D>=728&&D<=731||D===733||D===735||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||D===1025||D>=1040&&D<=1103||D===1105||D===8208||D>=8211&&D<=8214||D===8216||D===8217||D===8220||D===8221||D>=8224&&D<=8226||D>=8228&&D<=8231||D===8240||D===8242||D===8243||D===8245||D===8251||D===8254||D===8308||D===8319||D>=8321&&D<=8324||D===8364||D===8451||D===8453||D===8457||D===8467||D===8470||D===8481||D===8482||D===8486||D===8491||D===8531||D===8532||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||D===8585||D>=8592&&D<=8601||D===8632||D===8633||D===8658||D===8660||D===8679||D===8704||D===8706||D===8707||D===8711||D===8712||D===8715||D===8719||D===8721||D===8725||D===8730||D>=8733&&D<=8736||D===8739||D===8741||D>=8743&&D<=8748||D===8750||D>=8756&&D<=8759||D===8764||D===8765||D===8776||D===8780||D===8786||D===8800||D===8801||D>=8804&&D<=8807||D===8810||D===8811||D===8814||D===8815||D===8834||D===8835||D===8838||D===8839||D===8853||D===8857||D===8869||D===8895||D===8978||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||D===9632||D===9633||D>=9635&&D<=9641||D===9650||D===9651||D===9654||D===9655||D===9660||D===9661||D===9664||D===9665||D>=9670&&D<=9672||D===9675||D>=9678&&D<=9681||D>=9698&&D<=9701||D===9711||D===9733||D===9734||D===9737||D===9742||D===9743||D===9756||D===9758||D===9792||D===9794||D===9824||D===9825||D>=9827&&D<=9829||D>=9831&&D<=9834||D===9836||D===9837||D===9839||D===9886||D===9887||D===9919||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||D===9955||D===9960||D===9961||D>=9963&&D<=9969||D===9972||D>=9974&&D<=9977||D===9979||D===9980||D===9982||D===9983||D===10045||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||D===65533||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||D===127375||D===127376||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109}function gF(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function mF(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9776&&D<=9783||D>=9800&&D<=9811||D===9855||D>=9866&&D<=9871||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12773||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D>=94192&&D<=94198||D>=94208&&D<=101589||D>=101631&&D<=101662||D>=101760&&D<=101874||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D>=119552&&D<=119638||D>=119648&&D<=119670||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128728||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129674||D>=129678&&D<=129734||D===129736||D>=129741&&D<=129756||D>=129759&&D<=129770||D>=129775&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}function l8(D){if(!Number.isSafeInteger(D))throw TypeError(`Expected a code point, got \`${typeof D}\`.`)}function cF(D,{ambiguousAsWide:u=!1}={}){if(l8(D),gF(D)||mF(D)||u&&hF(D))return 2;return 1}var lF=CD(pF(),1),r8=new Intl.Segmenter,a8=/^\p{Default_Ignorable_Code_Point}$/u;function vu(D,u={}){if(typeof D!=="string"||D.length===0)return 0;let{ambiguousIsNarrow:F=!0,countAnsiEscapeCodes:E=!1}=u;if(!E)D=ID(D);if(D.length===0)return 0;let C=0,B={ambiguousAsWide:!F};for(let{segment:A}of r8.segment(D)){let _=A.codePointAt(0);if(_<=31||_>=127&&_<=159)continue;if(_>=8203&&_<=8207||_===65279)continue;if(_>=768&&_<=879||_>=6832&&_<=6911||_>=7616&&_<=7679||_>=8400&&_<=8447||_>=65056&&_<=65071)continue;if(_>=55296&&_<=57343)continue;if(_>=65024&&_<=65039)continue;if(a8.test(A))continue;if(lF.default().test(A)){C+=2;continue}C+=cF(_,B)}return C}function ku({stream:D=process.stdout}={}){return Boolean(D&&D.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import rF from"node:process";function xu(){let{env:D}=rF,{TERM:u,TERM_PROGRAM:F}=D;if(rF.platform!=="win32")return u!=="linux";return Boolean(D.WT_SESSION)||Boolean(D.TERMINUS_SUBLIME)||D.ConEmuTask==="{cmd::Cmder}"||F==="Terminus-Sublime"||F==="vscode"||u==="xterm-256color"||u==="alacritty"||u==="rxvt-unicode"||u==="rxvt-unicode-256color"||D.TERMINAL_EMULATOR==="JetBrains-JediTerm"}import o from"node:process";var i8=3;class aF{#A=0;start(){if(this.#A++,this.#A===1)this.#F()}stop(){if(this.#A<=0)throw Error("`stop` called more times than `start`");if(this.#A--,this.#A===0)this.#D()}#F(){if(o.platform==="win32"||!o.stdin.isTTY)return;o.stdin.setRawMode(!0),o.stdin.on("data",this.#C),o.stdin.resume()}#D(){if(!o.stdin.isTTY)return;o.stdin.off("data",this.#C),o.stdin.pause(),o.stdin.setRawMode(!1)}#C(D){if(D[0]===i8)o.emit("SIGINT")}}var n8=new aF,hu=n8;var s8=CD(bu(),1);class iF{#A=0;#F=!1;#D=0;#C=-1;#Q=0;#u;#B;#E;#H;#z;#q;#Z;#X;#J;#_;#$;color;constructor(D){if(typeof D==="string")D={text:D};if(this.#u={color:"cyan",stream:nD.stderr,discardStdin:!0,hideCursor:!0,...D},this.color=this.#u.color,this.spinner=this.#u.spinner,this.#z=this.#u.interval,this.#E=this.#u.stream,this.#q=typeof this.#u.isEnabled==="boolean"?this.#u.isEnabled:ku({stream:this.#E}),this.#Z=typeof this.#u.isSilent==="boolean"?this.#u.isSilent:!1,this.text=this.#u.text,this.prefixText=this.#u.prefixText,this.suffixText=this.#u.suffixText,this.indent=this.#u.indent,nD.env.NODE_ENV==="test")this._stream=this.#E,this._isEnabled=this.#q,Object.defineProperty(this,"_linesToClear",{get(){return this.#A},set(u){this.#A=u}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#C}}),Object.defineProperty(this,"_lineCount",{get(){return this.#D}})}get indent(){return this.#X}set indent(D=0){if(!(D>=0&&Number.isInteger(D)))throw Error("The `indent` option must be an integer from 0 and up");this.#X=D,this.#G()}get interval(){return this.#z??this.#B.interval??100}get spinner(){return this.#B}set spinner(D){if(this.#C=-1,this.#z=void 0,typeof D==="object"){if(D.frames===void 0)throw Error("The given spinner must have a `frames` property");this.#B=D}else if(!xu())this.#B=PD.default.line;else if(D===void 0)this.#B=PD.default.dots;else if(D!=="default"&&PD.default[D])this.#B=PD.default[D];else throw Error(`There is no built-in spinner named '${D}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#J}set text(D=""){this.#J=D,this.#G()}get prefixText(){return this.#_}set prefixText(D=""){this.#_=D,this.#G()}get suffixText(){return this.#$}set suffixText(D=""){this.#$=D,this.#G()}get isSpinning(){return this.#H!==void 0}#Y(D=this.#_,u=" "){if(typeof D==="string"&&D!=="")return D+u;if(typeof D==="function")return D()+u;return""}#K(D=this.#$,u=" "){if(typeof D==="string"&&D!=="")return u+D;if(typeof D==="function")return u+D();return""}#G(){let D=this.#E.columns??80,u=this.#Y(this.#_,"-"),F=this.#K(this.#$,"-"),E=" ".repeat(this.#X)+u+"--"+this.#J+"--"+F;this.#D=0;for(let C of ID(E).split(`
42
+ `))this.#D+=Math.max(1,Math.ceil(vu(C,{countAnsiEscapeCodes:!0})/D))}get isEnabled(){return this.#q&&!this.#Z}set isEnabled(D){if(typeof D!=="boolean")throw TypeError("The `isEnabled` option must be a boolean");this.#q=D}get isSilent(){return this.#Z}set isSilent(D){if(typeof D!=="boolean")throw TypeError("The `isSilent` option must be a boolean");this.#Z=D}frame(){let D=Date.now();if(this.#C===-1||D-this.#Q>=this.interval)this.#C=++this.#C%this.#B.frames.length,this.#Q=D;let{frames:u}=this.#B,F=u[this.#C];if(this.color)F=J[this.color](F);let E=typeof this.#_==="string"&&this.#_!==""?this.#_+" ":"",C=typeof this.text==="string"?" "+this.text:"",B=typeof this.#$==="string"&&this.#$!==""?" "+this.#$:"";return E+F+C+B}clear(){if(!this.#q||!this.#E.isTTY)return this;this.#E.cursorTo(0);for(let D=0;D<this.#A;D++){if(D>0)this.#E.moveCursor(0,-1);this.#E.clearLine(1)}if(this.#X||this.lastIndent!==this.#X)this.#E.cursorTo(this.#X);return this.lastIndent=this.#X,this.#A=0,this}render(){if(this.#Z)return this;return this.clear(),this.#E.write(this.frame()),this.#A=this.#D,this}start(D){if(D)this.text=D;if(this.#Z)return this;if(!this.#q){if(this.text)this.#E.write(`- ${this.text}
43
+ `);return this}if(this.isSpinning)return this;if(this.#u.hideCursor)Su.hide(this.#E);if(this.#u.discardStdin&&nD.stdin.isTTY)this.#F=!0,hu.start();return this.render(),this.#H=setInterval(this.render.bind(this),this.interval),this}stop(){if(!this.#q)return this;if(clearInterval(this.#H),this.#H=void 0,this.#C=0,this.clear(),this.#u.hideCursor)Su.show(this.#E);if(this.#u.discardStdin&&nD.stdin.isTTY&&this.#F)hu.stop(),this.#F=!1;return this}succeed(D){return this.stopAndPersist({symbol:TD.success,text:D})}fail(D){return this.stopAndPersist({symbol:TD.error,text:D})}warn(D){return this.stopAndPersist({symbol:TD.warning,text:D})}info(D){return this.stopAndPersist({symbol:TD.info,text:D})}stopAndPersist(D={}){if(this.#Z)return this;let u=D.prefixText??this.#_,F=this.#Y(u," "),E=D.symbol??" ",C=D.text??this.text,A=typeof C==="string"?(E?" ":"")+C:"",_=D.suffixText??this.#$,Z=this.#K(_," "),q=F+E+A+Z+`
44
+ `;return this.stop(),this.#E.write(q),this}}function gu(D){return new iF(D)}function T(D){console.log(JSON.stringify(D,null,2))}function YD(D){if(D===null||D===void 0||D==="")return"—";if(typeof D==="string")return D;if(!Number.isFinite(D))return"—";let u=Math.max(0,Math.floor(D)),F=Math.floor(u/3600),E=Math.floor(u%3600/60),C=u%60,B=F>0?String(E).padStart(2,"0"):String(E),A=String(C).padStart(2,"0");return F>0?`${F}:${B}:${A}`:`${B}:${A}`}function oF(D){if(D===null||D===void 0||D==="")return"—";if(typeof D==="string"){let A=D.replace(/^00:/,"");return A=A.replace(/^0(\d)/,"$1"),A}if(!Number.isFinite(D))return"—";let u=Math.max(0,Math.floor(D)),F=Math.floor(u/3600),E=Math.floor(u%3600/60),C=u%60,B=String(C).padStart(2,"0");if(F>0)return`${F}:${String(E).padStart(2,"0")}:${B}`;return`${E}:${B}`}function nF(D){return D.replace(/\x1B\[[0-9;]*[a-zA-Z]/g,"")}function tF(D,u){let F=process.stdout.columns||80,E=[],C=String(u.startIndex+D.length).length,B=2,A=2;for(let _=0;_<D.length;_++){let Z=D[_],q=String(u.startIndex+_).padStart(C," "),$=" ".repeat(2),Q=" ".repeat(2+C+2),X=Z.created,H=X.length,G=F-2-C-2-2-H,z=Z.title;if(z.length>G)z=z.slice(0,Math.max(0,G-1))+"…";let Y=z.length<G?z+" ".repeat(G-z.length):z,V=`${$}${J.dim(q)} ${J.bold.white(Y)} ${J.dim(X)}`,K=[];if(Z.channel&&Z.channel!=="—")K.push(Z.channel);if(Z.duration&&Z.duration!=="—")K.push(Z.duration);let M=Z.status.toLowerCase();if(M&&M!=="complete"&&M!=="completed")if(M.includes("pending")||M.includes("processing"))K.push(J.yellow(Z.status));else if(M.includes("error")||M.includes("failed"))K.push(J.red(Z.status));else K.push(Z.status);let U=J.dim(K.filter(Boolean).join(" · ")),R=J.dim(Z.id),h=nF(U).length,I=nF(R).length,y=Q.length,L=Math.max(1,F-y-h-I),x=`${Q}${U}${" ".repeat(L)}${R}`;if(E.push(V),E.push(x),_<D.length-1)E.push("")}return E.join(`
45
+ `)}function eF(D,u){let F=new sF.default({head:D,style:{head:["cyan"],border:["gray"]},wordWrap:!0});for(let E of u)F.push(E);return F.toString()}function KD(D){let F=Math.min(D??process.stdout.columns??40,100),E=Math.max(20,F);return"─".repeat(E)}function t(D){return gu({text:D,spinner:"dots"}).start()}function n(D,u){for(let F of u){let E=D[F];if(typeof E==="string"&&E.length>0)return E}return}function e(D,u){for(let F of u){let E=D[F];if(typeof E==="string"&&E.length>0)return E;if(typeof E==="number")return String(E)}return"—"}function l(D,u){let F=D[u];if(typeof F==="string")return F;let E=D.user?.[u];if(typeof E==="string")return E;let C=D.session?.[u];if(typeof C==="string")return C;return}function mu(D,u){let F=D[u];if(typeof F==="number"&&Number.isFinite(F))return F;if(typeof F==="string"){let E=Number(F);if(Number.isFinite(E))return E}return}function D2(D){return n(D,["id","transcriptionId"])??D.transcription?.id?.toString()??D.data?.id?.toString()}function sD(D){return n(D,["status","state"])}import{promises as cu}from"fs";import o8 from"os";import u2 from"path";var F2=u2.join(o8.homedir(),".xevol","jobs");async function t8(){await cu.mkdir(F2,{recursive:!0})}function E2(D){return u2.join(F2,`${D}.json`)}async function d(D){await t8(),D.updatedAt=new Date().toISOString();let u=JSON.stringify(D,null,2)+`
46
+ `;await cu.writeFile(E2(D.transcriptionId),u,{encoding:"utf8",mode:384})}async function C2(D){try{let u=await cu.readFile(E2(D),"utf8");return JSON.parse(u)}catch(u){if(u.code==="ENOENT")return null;throw u}}async function*oD(D,u){let F=new URL(D,u.apiUrl),E={Accept:"text/event-stream",Authorization:`Bearer ${u.token.trim()}`};if(u.lastEventId)E["Last-Event-ID"]=u.lastEventId;let C=await fetch(F,{method:"GET",headers:E,signal:u.signal});if(!C.ok){let X=await C.text().catch(()=>"");throw Error(`SSE ${C.status}: ${X||C.statusText}`)}if((C.headers.get("content-type")??"").includes("application/json")){yield{event:"complete",data:await C.text()};return}if(!C.body)throw Error("SSE: no response body (streaming not supported)");let A=C.body.getReader(),_=new TextDecoder,Z="",q,$,Q=[];try{while(!0){let{done:X,value:H}=await A.read();if(X){if(Q.length>0)yield{id:q,event:$,data:Q.join(`
47
+ `)};break}Z+=_.decode(H,{stream:!0});let G=Z.split(`
48
+ `);Z=G.pop()??"";for(let z of G){if(z===""){if(Q.length>0)yield{id:q,event:$,data:Q.join(`
49
+ `)};q=void 0,$=void 0,Q=[];continue}if(z.startsWith(":"))continue;let Y=z.indexOf(":"),V,K;if(Y===-1)V=z,K="";else if(V=z.slice(0,Y),K=z.slice(Y+1),K.startsWith(" "))K=K.slice(1);switch(V){case"id":q=K;break;case"event":$=K;break;case"data":Q.push(K);break}}}}finally{A.releaseLock()}}var B2=30000;async function _D(D,u,F,E={}){if(E.header)console.log(J.bold.cyan(`
50
+ ─── ${E.header} ───`));let C=E.lastEventId,B="",A=new AbortController,_=setTimeout(()=>A.abort(),B2),Z=()=>{clearTimeout(_),_=setTimeout(()=>A.abort(),B2)},q=oD(`/spikes/stream/${D}`,{token:u,apiUrl:F,lastEventId:E.lastEventId,signal:A.signal});try{for await(let $ of q){if(Z(),$.id)C=$.id;if(E.json){T($);continue}if($.event==="complete"){try{let Q=JSON.parse($.data),X=Q.data??Q.content??Q.markdown??"";B+=X,process.stdout.write(X)}catch{B+=$.data,process.stdout.write($.data)}continue}if($.event==="chunk"||$.event==="delta"||!$.event){try{let Q=JSON.parse($.data),X=Q.text??Q.content??Q.chunk??Q.delta??$.data;B+=X,process.stdout.write(X)}catch{B+=$.data,process.stdout.write($.data)}continue}if($.event==="done"||$.event==="end"){if($.data&&$.data!=="[DONE]")try{let Q=JSON.parse($.data),X=Q.content??Q.text;if(X&&!B)B=X,process.stdout.write(X)}catch{}continue}if($.event==="error"){console.error(J.red(`
51
+ Stream error: ${$.data}`));continue}}if(B&&!B.endsWith(`
52
+ `))process.stdout.write(`
53
+ `)}finally{clearTimeout(_)}return{lastEventId:C,content:B}}var e8=/^https?:\/\/(?:www\.|m\.|music\.)?(?:youtube\.com\/(?:watch|shorts|live|embed)|youtu\.be\/)/i;async function DE(D,u,F){let E=t("Processing..."),C=Date.now(),B=120;try{for(let A=0;A<120;A+=1){let _=await b(`/v1/status/${D}`,{token:u,apiUrl:F}),Z=sD(_)?.toLowerCase()??"pending",q=Math.floor((Date.now()-C)/1000);if(E.text=`Processing... (${q}s)`,Z.includes("complete")){let $=n(_,["title","videoTitle","name"]),Q=YD(_.duration??_.durationSec??_.durationSeconds);return E.succeed(`Completed: ${$?`"${$}"`:D} (${Q})`),_}if(Z.includes("error")||Z.includes("failed"))return E.fail(`Failed: ${D}`),_;await new Promise(($)=>setTimeout($,5000))}return E.fail("Timed out waiting for transcription to complete."),null}catch(A){return E.fail(A.message),null}}function A2(D){D.command("add").description("Submit a YouTube URL for transcription").argument("<youtubeUrl>","YouTube URL").option("--lang <code>","Output language","en").option("--no-wait","Don't wait for completion (fire-and-forget)").option("--analyze <prompts>","Comma-separated prompt IDs to generate analysis after transcription").addOption(new R0("--spikes <prompts>").hideHelp()).option("--stream","Stream analysis content in real-time via SSE (use with --analyze)").option("--json","Raw JSON output").addHelpText("after",`
54
+ Examples:
55
+ $ xevol add "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
56
+ $ xevol add "https://youtu.be/dQw4w9WgXcQ" --lang kk
57
+ $ xevol add "https://www.youtube.com/watch?v=..." --analyze review,summary --stream
58
+ $ xevol add "https://www.youtube.com/watch?v=..." --no-wait`).action(async(u,F,E)=>{try{if(!e8.test(u)){console.error(J.red("Error:")+" Not a valid YouTube URL. Expected youtube.com/watch?v=... or youtu.be/..."),process.exitCode=1;return}let C=await f()??{},B=k(F,E),{token:A,expired:_}=v(C,B);if(!A){console.error(_?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}let Z=S(C),q=await b("/v1/add",{query:{url:u,outputLang:F.lang},token:A,apiUrl:Z}),$=D2(q),Q=sD(q)??"pending";if(!$){if(F.json)T(q);else console.error("Transcription created, but the response did not include an ID.");process.exitCode=1;return}if(!F.json)console.log(`${J.green("✔")} Transcription created: ${$}`),console.log(`Status: ${Q}`);let X=F.analyze??F.spikes;if(F.wait!==!1){let H=X?X.split(",").map((Y)=>Y.trim()).filter(Boolean):[],G=1+H.length;if(!F.json)console.log(J.dim(`[1/${G}] Transcribing...`));let z=await DE($,A,Z);if(F.json&&!X)T(z??q);if(X&&z)if(!(sD(z)?.toLowerCase()??"").includes("complete"))console.error(J.red("Error:")+" Transcription did not complete — skipping analysis generation.");else if(F.stream){let V=F.lang??"en",K=[],M={transcriptionId:$,url:u,lang:V,outputLang:V,spikes:[],createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};for(let U=0;U<H.length;U++){let R=H[U],h=U+2;if(!F.json)console.log(J.dim(`[${h}/${G}] Generating analysis: ${R}...`));let I=t(`Creating analysis: ${R}...`);try{let y=await b(`/spikes/${$}`,{method:"POST",body:{promptId:R,outputLang:V},token:A,apiUrl:Z}),L=y.spikeId,x={spikeId:L??R,promptId:R,status:"pending"};M.spikes.push(x);let ED=y.content??y.markdown;if(ED){if(I.succeed(`Analysis ready: ${R} (cached)`),!F.json)console.log(J.bold.cyan(`
59
+ ─── ${R} ───`)),console.log(ED);x.status="complete",await d(M),K.push(y);continue}if(!L){I.fail(`No analysis ID returned for ${R}`),x.status="error",await d(M);continue}I.succeed(`Analysis created: ${R}`),x.status="streaming",await d(M);let qD=await _D(L,A,Z,{json:F.json,header:R});if(x.status="complete",x.lastEventId=qD.lastEventId,await d(M),!F.json)console.log(J.green(`✔ Analysis complete: ${R}`));K.push({spikeId:L,promptId:R,content:qD.content})}catch(y){I.fail(`Analysis failed: ${R} — ${y.message}`);let L=M.spikes.find((x)=>x.promptId===R);if(L)L.status="error",await d(M)}}if(!F.json)console.log(J.green(`
60
+ ✔ All done. Resume anytime: xevol resume ${$}`));else T({transcription:z,spikes:K})}else{let V=F.lang??"en",K=[];for(let M=0;M<H.length;M++){let U=H[M],R=M+2;if(!F.json)console.log(J.dim(`[${R}/${G}] Generating analysis: ${U}...`));let h=t(`Generating analysis: ${U}...`),I=Date.now(),y=120;try{let L=await b(`/spikes/${$}`,{method:"POST",body:{promptId:U,outputLang:V},token:A,apiUrl:Z}),x=L.spikes??L.data??L.items;if((!x||Array.isArray(x)&&x.length===0)&&L.spikeId)for(let ED=0;ED<y;ED+=1){await new Promise((W2)=>setTimeout(W2,5000));let qD=Math.floor((Date.now()-I)/1000);h.text=`Generating analysis: ${U}... (${qD}s)`,L=await b(`/spikes/${$}`,{method:"POST",body:{promptId:U,outputLang:V},token:A,apiUrl:Z});let R2=L.content??L.markdown??L.text,au=L.spikes??L.data;if(R2||Array.isArray(au)&&au.length>0)break}h.succeed(`Analysis ready: ${U}`),K.push(L)}catch(L){h.fail(`Analysis failed: ${U} — ${L.message}`)}}if(F.json)T({transcription:z,spikes:K})}return}if(F.json)T(q)}catch(C){console.error(C.message),process.exitCode=1}})}function uE(D){let u=l(D,"email")??"Unknown",F=D.plan?.name??D.subscription?.plan??D.plan,E=D.usage?.transcriptionsThisMonth??D.monthly?.transcriptions??D.transcriptionsThisMonth,C=[];if(C.push(`${J.dim("Email:")} ${J.bold(u)}`),F)C.push(`${J.dim("Plan:")} ${F}`);if(E!==void 0)C.push(`${J.dim("Usage:")} ${E} transcriptions this month`);return C.join(`
61
+ `)}function FE(D){if(!Number.isFinite(D)||D<=0)return"soon";if(D<90)return`${Math.ceil(D)} sec`;return`${Math.ceil(D/60)} min`}async function EE(D){try{let{execFile:u}=await import("child_process"),F=process.platform==="darwin"?"open":"xdg-open";u(F,[D],(E)=>{})}catch{}}async function du(D){let u=D.headers.get("content-type")??"";try{if(u.includes("application/json")){let E=await D.json();return E.message??E.error??JSON.stringify(E)}let F=await D.text();return F.trim()?F:null}catch{return null}}async function CE(D){await new Promise((u)=>setTimeout(u,D))}function _2(D){D.command("login").description("Authenticate with the browser-based device flow").option("--token <token>","CLI token (overrides XEVOL_TOKEN)").option("--json","Raw JSON output").action(async(u,F)=>{try{let E=await f()??{},C=k(u,F),B=S(E);if(C){let{token:M,expired:U}=v(E,C);if(!M){console.error(U?"Token expired. Run `xevol login` to re-authenticate.":"Token required. Use --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}let R=await b("/auth/session",{token:M,apiUrl:B}),h=l(R,"accountId"),I=l(R,"email"),y=l(R,"expiresAt");if(await zu({apiUrl:B,token:M,accountId:h??E.accountId,email:I??E.email,expiresAt:y??E.expiresAt}),u.json){T(R);return}let L=I?`Logged in as ${J.bold(I)}`:"Logged in";console.log(`${J.green("✓")} ${L}`);return}let A=new URL("/auth/cli/device-code",B),_=await fetch(A,{method:"POST"});if(!_.ok){let M=await du(_),U=M?`API ${_.status}: ${M}`:`API ${_.status} ${_.statusText}`;throw Error(U)}let Z=await _.json(),q=l(Z,"deviceCode"),$=l(Z,"userCode"),Q=l(Z,"verificationUrl"),X=mu(Z,"expiresIn"),H=mu(Z,"interval");if(!q||!$||!Q||!X||!H)throw Error("Invalid device authorization response.");let G=new URL(Q);G.searchParams.set("code",$),await EE(G.toString()),console.log("Open this URL to authenticate:"),console.log(` ${G.toString()}`),console.log(""),console.log(`Waiting for approval... (expires in ${FE(X)})`);let z=t("Waiting for approval..."),Y=Date.now()+X*1000,V=Math.max(1,H)*1000,K=new URL("/auth/cli/device-token",B);try{while(Date.now()<Y){let U=await fetch(K,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:q})});if(U.status===202){await CE(V);continue}if(U.status===400){let I=await du(U);z.fail("Device authorization expired."),console.error(I??"Device authorization expired. Run xevol login again."),process.exitCode=1;return}if(U.ok){let I=await U.json(),y=l(I,"token"),L=l(I,"accountId"),x=l(I,"email"),ED=l(I,"expiresAt");if(!y)throw z.fail("Authentication failed."),Error("No token received from device authorization.");if(await zu({apiUrl:B,token:y,accountId:L??E.accountId,email:x??E.email,expiresAt:ED??E.expiresAt}),z.succeed("Approved"),u.json){T(I);return}let qD=x?`Logged in as ${J.bold(x)}`:"Logged in";console.log(`${J.green("✓")} ${qD}`);return}let R=await du(U);z.fail("Authentication failed.");let h=R?`API ${U.status}: ${R}`:`API ${U.status} ${U.statusText}`;throw Error(h)}let M="Device authorization timed out. Run xevol login again.";z.fail("Timed out."),console.error(M),process.exitCode=1}catch(M){if(z.isSpinning)z.fail("Authentication failed.");throw M}}catch(E){console.error(E.message),process.exitCode=1}}),D.command("logout").description("Revoke CLI token and clear local config").option("--json","Raw JSON output").action(async(u,F)=>{try{let E=await f()??{},C=k(u,F),B=E.token,{token:A,expired:_}=v(E,C),Z=B??A;if(!Z){console.log(_?"Token expired. Run `xevol login` to re-authenticate.":"You are not logged in.");return}let q=S(E),$={ok:!0};try{$=await b("/auth/cli/revoke",{method:"POST",token:Z,apiUrl:q})}catch(Q){$={error:Q.message}}if(await I0(),u.json){T($);return}console.log(`${J.green("✓")} Logged out`)}catch(E){console.error(E.message),process.exitCode=1}}),D.command("whoami").description("Show the current authenticated account").option("--json","Raw JSON output").action(async(u,F)=>{try{let E=await f()??{},C=k(u,F),{token:B,expired:A}=v(E,C);if(!B){console.error(A?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login to authenticate."),process.exitCode=1;return}let _=S(E),Z=await b("/auth/session",{token:B,apiUrl:_});if(u.json){T(Z);return}console.log(uE(Z))}catch(E){console.error(E.message),process.exitCode=1}})}function $2(D){if(!D)return"—";try{let u=new Date(D);if(Number.isNaN(u.getTime()))return"—";let F=new Date,E=F.getTime()-u.getTime(),C=Math.floor(E/60000),B=Math.floor(E/3600000),A=Math.floor(E/86400000);if(C<1)return"just now";if(C<60)return`${C}m ago`;if(B<24)return`${B}h ago`;if(A<7)return`${A}d ago`;let _=String(u.getMonth()+1).padStart(2,"0"),Z=String(u.getDate()).padStart(2,"0");if(u.getFullYear()===F.getFullYear())return`${_}-${Z}`;return`${u.getFullYear()}-${_}-${Z}`}catch{return"—"}}function BE(D){let u=D.list??D.data??D.transcriptions??D.items??D.results??[],F=D.pagination??D.meta??{},E=D.page??F.page??1,C=D.limit??F.limit??u.length,B=D.total??F.total??u.length,A=D.totalPages??F.totalPages??(C?Math.ceil(B/C):1);return{items:u,page:E,limit:C,total:B,totalPages:A}}function q2(D){D.command("list").description("List transcriptions").option("--page <number>","Page number",(u)=>Number.parseInt(u,10),1).option("--limit <number>","Items per page",(u)=>Number.parseInt(u,10),20).option("--json","Raw JSON output").option("--csv","CSV output").option("--status <status>","Filter by status (complete, pending, error)").addHelpText("after",`
62
+ Examples:
63
+ $ xevol list
64
+ $ xevol list --limit 5 --page 2
65
+ $ xevol list --status complete --csv
66
+ $ xevol list --json`).action(async(u,F)=>{try{let E=await f()??{},C=k(u,F),{token:B,expired:A}=v(E,C);if(!B){console.error(A?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}let _=S(E),Z=await b("/v1/transcriptions",{query:{page:u.page,limit:u.limit,status:u.status},token:B,apiUrl:_});if(u.json){T(Z);return}let{items:q,page:$,total:Q,totalPages:X}=BE(Z);if(u.csv){let z=(Y)=>{let V=Y.replace(/\n/g," ");return V.includes(",")||V.includes('"')?`"${V.replace(/"/g,'""')}"`:V};console.log("ID,Status,Lang,Duration,Channel,Title,Created");for(let Y of q){let V=e(Y,["id","transcriptionId","_id"]),K=e(Y,["status","state"]),M=e(Y,["lang","outputLang","language"]),U=Y.duration??Y.durationSec??Y.durationSeconds??Y.lengthSec,R=YD(U??"—"),h=e(Y,["channel","channelTitle","author","uploader"]),I=e(Y,["title","videoTitle","name"]),y=$2(Y.createdAt);console.log([V,K,M,R,h,I,y].map(z).join(","))}return}console.log(""),console.log(` ${J.bold("Transcriptions")} ${J.dim(`${Q} total · page ${$}/${X}`)}`),console.log("");let H=q.map((z)=>{let Y=e(z,["id","transcriptionId","_id"]),V=e(z,["status","state"]),K=z.duration??z.durationSec??z.durationSeconds??z.lengthSec,M=oF(K??"—"),U=e(z,["channel","channelTitle","author","uploader"]),R=e(z,["title","videoTitle","name"]),h=$2(z.createdAt);return{title:R,channel:U,duration:M,status:V,id:Y,created:h}});if(H.length===0){console.log(" No transcriptions found.");return}let G=($-1)*(u.limit??20)+1;if(console.log(tF(H,{startIndex:G})),X>1&&$<X)console.log(""),console.log(J.dim(` Page ${$} of ${X} — use --page ${$+1} for next`));console.log("")}catch(E){console.error(J.red("Error:")+" "+E.message),process.exitCode=1}})}function pu(D){let u=D.spikes??D.data??D.items;if(Array.isArray(u))return u;if(D.content||D.markdown||D.text)return[D];return[]}function AE(D){return D.markdown??D.content??D.text??D.body}async function Z2(D,u,F,E="review",C="en"){return await b(`/spikes/${D}`,{method:"POST",body:{promptId:E,outputLang:C},token:u,apiUrl:F})}async function _E(D,u,F,E="review",C="en"){let B=t("Generating analysis..."),A=Date.now(),_=120;try{for(let Z=0;Z<120;Z+=1){let q=await Z2(D,u,F,E,C),$=pu(q),Q=Math.floor((Date.now()-A)/1000);if(B.text=`Generating analysis... (${Q}s)`,$.length>0)return B.succeed("Analysis ready"),q;await new Promise((X)=>setTimeout(X,5000))}return B.fail("Timed out waiting for analysis to generate."),null}catch(Z){return B.fail(Z.message),null}}function X2(D){D.command("analyze").alias("spikes").description("View or generate analysis for a transcription").argument("<id>","Transcription ID").option("--generate","Generate analysis if missing").option("--prompt <id>","Prompt ID for generation").option("--lang <code>","Output language","en").option("--json","Raw JSON output").option("--no-stream","Disable live streaming (use polling instead)").addHelpText("after",`
67
+ Examples:
68
+ $ xevol analyze abc123
69
+ $ xevol analyze abc123 --prompt facts --lang kk
70
+ $ xevol analyze abc123 --generate --prompt review --json`).action(async(u,F,E)=>{try{let C=await f()??{},B=k(F,E),{token:A,expired:_}=v(C,B);if(!A){console.error(_?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}let Z=S(C),q=F.prompt??"review",$=F.lang??"en",Q=await Z2(u,A,Z,q,$),X=pu(Q),H=Q.spikeId,G=F.stream!==!1&&!F.json;if(X.length===0&&H){if(G){let K=Q.title??Q.transcriptionTitle??u;if(console.log(J.bold(`Analysis for "${K}"`)),console.log(KD()),!(await _D(H,A,Z)).content)console.log("No analysis content available.");return}let V=await _E(u,A,Z,q,$);if(!V){process.exitCode=1;return}Q=V,X=pu(Q)}if(F.json){T(Q);return}let z=Q.title??Q.transcriptionTitle??X[0]?.title??u;console.log(J.bold(`Analysis for "${z}"`)),console.log(KD());let Y=X.map((V)=>AE(V)).filter((V)=>Boolean(V)).join(`
3
71
 
4
- // src/index.ts
5
- console.log("xevol v0.0.1 \u2014 coming soon");
72
+ `);if(Y)console.log(Y);else console.log("No analysis content available.")}catch(C){console.error(J.red("Error:")+" "+C.message),process.exitCode=1}})}function $E(D){if(D.analysis&&typeof D.analysis==="object")return D.analysis;if(D.data&&typeof D.data==="object")return D.data;return D}function Q2(D){D.command("view").description("View a transcription").argument("<id>","Transcription ID").option("--raw","Print the full transcript").option("--clean","Use cleanContent instead of content").option("--json","Raw JSON output").action(async(u,F,E)=>{try{let C=await f()??{},B=k(F,E),{token:A,expired:_}=v(C,B);if(!A){console.error(_?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}if(F.clean&&!F.raw){console.error("--clean can only be used with --raw."),process.exitCode=1;return}let Z=S(C),q=await b(`/v1/analysis/${u}`,{token:A,apiUrl:Z});if(F.json){T(q);return}let $=$E(q),Q=n($,["title","videoTitle","name"])??"Untitled",X=n($,["channel","channelTitle","author"])??"Unknown",H=n($,["channelHandle","handle","channelTag"]),G=YD($.duration??$.durationSec??$.durationSeconds),z=n($,["lang","outputLang","language"])??"—",Y=n($,["status","state"])??"—",V=n($,["url","youtubeUrl","videoUrl"]);if(F.raw){let U=F.clean?"cleanContent":"content",R=$[U];if(!R){console.error("No transcript content available."),process.exitCode=1;return}console.log(R);return}let K=H?`${X} (${H.startsWith("@")?H:`@${H}`})`:X;if(console.log(J.bold(Q)),console.log(`Channel: ${K}`),console.log(`Duration: ${G} | Lang: ${z} | Status: ${Y}`),V)console.log(`URL: ${V}`);console.log(KD());let M=$.summary??$.overview??$.analysis?.summary?.toString();if(M)console.log(M);else console.log("No summary available.");console.log(KD()),console.log("Full transcript: use --raw")}catch(C){console.error(J.red("Error:")+" "+C.message),process.exitCode=1}})}function H2(D){D.command("prompts").description("List available prompts").option("--json","Raw JSON output").option("--csv","CSV output").action(async(u,F)=>{try{let E=await f()??{},C=k(u,F),{token:B}=v(E,C),A=S(E),_=await b("/v1/prompts",{token:B??void 0,apiUrl:A}),Z=_.prompts??[];if(u.json){T(_);return}if(u.csv){let Q=(X)=>{let H=X.replace(/\n/g," ");return H.includes(",")||H.includes('"')?`"${H.replace(/"/g,'""')}"`:H};console.log("ID,Description");for(let X of Z)console.log([X.id,X.description??"—"].map(Q).join(","));return}if(console.log(J.bold(`Available Prompts (${Z.length} total)`)),console.log(""),Z.length===0){console.log("No prompts found.");return}let q=(Q,X)=>{let H=Q.replace(/[\r\n]+/g," ").replace(/\s+/g," ").trim();return H.length>X?H.slice(0,X-1)+"…":H},$=Z.map((Q)=>[Q.id,Q.description?q(Q.description,60):"—"]);console.log(eF(["ID","Description"],$))}catch(E){console.error(J.red("Error:")+" "+E.message),process.exitCode=1}})}var G2=30000;async function qE(D,u,F,E={}){if(E.header)console.log(J.bold.cyan(`
73
+ ─── ${E.header} ───`));let C=E.lastEventId,B="",A=new AbortController,_=setTimeout(()=>A.abort(),G2),Z=()=>{clearTimeout(_),_=setTimeout(()=>A.abort(),G2)},q=oD(`/spikes/stream/${D}`,{token:u,apiUrl:F,lastEventId:E.lastEventId,signal:A.signal});try{for await(let $ of q){if(Z(),$.id)C=$.id;if(E.json){T($);continue}if($.event==="complete"){try{let Q=JSON.parse($.data),X=Q.data??Q.content??Q.markdown??"";B+=X,process.stdout.write(X)}catch{B+=$.data,process.stdout.write($.data)}continue}if($.event==="chunk"||$.event==="delta"||!$.event){try{let Q=JSON.parse($.data),X=Q.text??Q.content??Q.chunk??Q.delta??$.data;B+=X,process.stdout.write(X)}catch{B+=$.data,process.stdout.write($.data)}continue}if($.event==="done"||$.event==="end"){if($.data&&$.data!=="[DONE]")try{let Q=JSON.parse($.data),X=Q.content??Q.text;if(X&&!B)B=X,process.stdout.write(X)}catch{}continue}if($.event==="error"){console.error(J.red(`
74
+ Stream error: ${$.data}`));continue}}if(B&&!B.endsWith(`
75
+ `))process.stdout.write(`
76
+ `)}finally{clearTimeout(_)}return{lastEventId:C,content:B}}function z2(D){D.command("stream").description("Stream analysis content in real-time via SSE").argument("<spikeId>","Analysis ID to stream").option("--json","Output raw SSE events as JSON").option("--last-event-id <id>","Resume from a specific event ID").addHelpText("after",`
77
+ Examples:
78
+ $ xevol stream abc123
79
+ $ xevol stream abc123 --json
80
+ $ xevol stream abc123 --last-event-id 42`).action(async(u,F,E)=>{try{let C=await f()??{},B=k(F,E),{token:A,expired:_}=v(C,B);if(!A){console.error(_?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}let Z=S(C),q=await qE(u,A,Z,{json:F.json,lastEventId:F.lastEventId});if(!F.json&&q.content)console.log(J.green(`
81
+ ✔ Stream complete`))}catch(C){console.error(J.red(C.message)),process.exitCode=1}})}function J2(D){D.command("resume").description("Resume a previous streaming session").argument("<id>","Transcription ID").option("--json","Raw JSON output").action(async(u,F,E)=>{try{let C=await f()??{},B=k(F,E),{token:A,expired:_}=v(C,B);if(!A){console.error(_?"Token expired. Run `xevol login` to re-authenticate.":"Not logged in. Use xevol login --token <token> or set XEVOL_TOKEN."),process.exitCode=1;return}let Z=S(C),q=await C2(u);if(!q){console.error(J.red(`No job state found for ${u}.`),"\nMake sure you previously ran `xevol add --stream --analyze` for this transcription."),process.exitCode=1;return}let $=q.lang??q.outputLang??"en";if(!F.json)console.log(J.bold(`Resuming job for transcription: ${u}`)),console.log(J.dim(`URL: ${q.url}`)),console.log(J.dim(`Analyses: ${q.spikes.length}`)),console.log();let Q=[];for(let X of q.spikes){if(X.status==="complete"){if(!F.json)console.log(J.bold.cyan(`
82
+ ─── ${X.promptId} ───`)),console.log(J.dim("(cached)"));try{let H=await b(`/spikes/${u}`,{method:"POST",body:{promptId:X.promptId,outputLang:$},token:A,apiUrl:Z});if(F.json)Q.push(H);else{let G=H.content??H.markdown??H.text??"";if(G)console.log(G);console.log(J.green("✔ Analysis complete: "+X.promptId))}}catch(H){console.error(J.red(`Failed to fetch ${X.promptId}: ${H.message}`))}continue}if(X.status==="streaming"){if(!F.json)console.log(J.dim(`
83
+ Reconnecting to ${X.promptId}...`));try{let H=await _D(X.spikeId,A,Z,{json:F.json,lastEventId:X.lastEventId,header:X.promptId});if(X.status="complete",X.lastEventId=H.lastEventId,await d(q),!F.json)console.log(J.green("✔ Analysis complete: "+X.promptId));else Q.push({spikeId:X.spikeId,promptId:X.promptId,content:H.content})}catch(H){console.error(J.red(`Analysis stream failed for ${X.promptId}: ${H.message}`)),X.status="error",await d(q)}continue}if(X.status==="pending"||X.status==="error"){let H=t(`Starting analysis: ${X.promptId}...`);try{let G=await b(`/spikes/${u}`,{method:"POST",body:{promptId:X.promptId,outputLang:$},token:A,apiUrl:Z}),z=G.spikeId??X.spikeId;X.spikeId=z;let Y=G.content??G.markdown;if(Y){if(H.succeed(`Analysis ready: ${X.promptId}`),!F.json)console.log(J.bold.cyan(`
84
+ ─── ${X.promptId} ───`)),console.log(Y);if(X.status="complete",await d(q),F.json)Q.push(G);continue}H.succeed(`Analysis started: ${X.promptId}`),X.status="streaming",await d(q);let V=await _D(z,A,Z,{json:F.json,header:X.promptId});if(X.status="complete",X.lastEventId=V.lastEventId,await d(q),!F.json)console.log(J.green("✔ Analysis complete: "+X.promptId));else Q.push({spikeId:z,promptId:X.promptId,content:V.content})}catch(G){H.fail(`Failed: ${X.promptId} — ${G.message}`),X.status="error",await d(q)}}}if(F.json)T({transcriptionId:u,spikes:Q});else console.log(J.green(`
85
+ ✔ All analyses resumed.`))}catch(C){console.error(J.red(C.message)),process.exitCode=1}})}import{promises as ru}from"fs";import ZE from"os";import K2 from"path";var V2=K2.join(ZE.homedir(),".xevol"),M2=K2.join(V2,"config.json"),$D={apiUrl:"Base API URL","default.lang":"Default output language for transcriptions","default.limit":"Default page size for list command","api.timeout":"API request timeout in milliseconds"};async function lu(){try{let D=await ru.readFile(M2,"utf8");return JSON.parse(D)}catch(D){if(D.code==="ENOENT")return{};if(D instanceof SyntaxError)return console.error(J.yellow("Warning:")+" config.json is corrupt, starting fresh."),{};throw D}}async function XE(D){await ru.mkdir(V2,{recursive:!0});let u=JSON.stringify(D,null,2)+`
86
+ `;await ru.writeFile(M2,u,{encoding:"utf8",mode:384})}function Y2(D,u){let F=u.split("."),E=D;for(let C of F){if(E===null||E===void 0||typeof E!=="object")return;E=E[C]}return E}function QE(D,u,F){let E=u.split("."),C=D;for(let B=0;B<E.length-1;B++){let A=E[B];if(C[A]===void 0||typeof C[A]!=="object")C[A]={};C=C[A]}C[E[E.length-1]]=F}function U2(D){let u=D.command("config").description("Manage local CLI configuration");u.command("get").description("Get a config value").argument("<key>",`Config key (${Object.keys($D).join(", ")})`).action(async(F)=>{try{if(!(F in $D)){console.error(J.red("Error:")+` Unknown config key: ${F}`),console.error(`Allowed keys: ${Object.keys($D).join(", ")}`),process.exitCode=1;return}let E=await lu(),C=Y2(E,F);if(C===void 0)console.log(J.dim("(not set)"));else console.log(String(C))}catch(E){console.error(J.red("Error:")+" "+E.message),process.exitCode=1}}),u.command("set").description("Set a config value").argument("<key>",`Config key (${Object.keys($D).join(", ")})`).argument("<value>","Value to set").action(async(F,E)=>{try{if(!(F in $D)){console.error(J.red("Error:")+` Unknown config key: ${F}`),console.error(`Allowed keys: ${Object.keys($D).join(", ")}`),process.exitCode=1;return}let C=await lu(),B=E;if(F==="default.limit"||F==="api.timeout"){let A=Number(E);if(!Number.isFinite(A)||A<=0){console.error(J.red("Error:")+` ${F} must be a positive number`),process.exitCode=1;return}B=A}QE(C,F,B),await XE(C),console.log(`${J.green("✔")} ${F} = ${E}`)}catch(C){console.error(J.red("Error:")+" "+C.message),process.exitCode=1}}),u.command("list").description("List all config values").action(async()=>{try{let F=await lu(),E=!1;for(let C of Object.keys($D)){let B=Y2(F,C);if(B!==void 0)console.log(`${J.dim(C)} = ${B}`),E=!0}if(!E)console.log(J.dim("No config values set."))}catch(F){console.error(J.red("Error:")+" "+F.message),process.exitCode=1}})}var GE=HE(import.meta.url),{version:zE}=GE("../package.json"),r=new X0;r.name("xevol").description("XEVol \u2014 your info manager. Transcribe, analyze, and explore YouTube content from the terminal.").version(zE).option("--token <token>","Override auth token").option("--no-color","Disable colored output").hook("preAction",()=>{if(r.opts().color===!1)M0.level=0});_2(r);q2(r);A2(r);Q2(r);X2(r);H2(r);z2(r);J2(r);U2(r);await r.parseAsync(process.argv);
package/package.json CHANGED
@@ -1,19 +1,44 @@
1
1
  {
2
2
  "name": "xevol",
3
- "version": "0.0.1",
4
- "description": "CLI for XEVol — transcribe, analyze, and explore YouTube content",
3
+ "version": "0.2.1",
4
+ "description": "XEVol — your info manager. Transcribe, analyze, and explore YouTube content from the terminal.",
5
5
  "type": "module",
6
6
  "bin": {
7
- "xevol": "./src/index.ts"
7
+ "xvl": "./dist/index.js",
8
+ "xevol": "./dist/index.js"
8
9
  },
9
10
  "scripts": {
10
11
  "dev": "bun run src/index.ts",
11
- "build": "bun build src/index.ts --outdir dist --target node",
12
+ "build": "bun build src/index.ts --outdir dist --target node --minify",
12
13
  "prepublishOnly": "bun run build"
13
14
  },
14
- "keywords": ["xevol", "transcription", "youtube", "cli"],
15
+ "dependencies": {
16
+ "@inquirer/prompts": "^7.0.0",
17
+ "chalk": "^5.4.0",
18
+ "cli-table3": "^0.6.5",
19
+ "commander": "^13.0.0",
20
+ "ora": "^8.0.0"
21
+ },
22
+ "keywords": [
23
+ "xevol",
24
+ "transcription",
25
+ "transcribe",
26
+ "youtube",
27
+ "analysis",
28
+ "cli",
29
+ "ai",
30
+ "video",
31
+ "subtitles",
32
+ "intelligence"
33
+ ],
34
+ "files": [
35
+ "dist",
36
+ "README.md",
37
+ "package.json"
38
+ ],
15
39
  "author": "Kuan <kuka@xevol.com>",
16
- "license": "MIT",
40
+ "license": "UNLICENSED",
41
+ "private": false,
17
42
  "repository": {
18
43
  "type": "git",
19
44
  "url": "https://github.com/xevol/xevol-cli"
@@ -21,5 +46,9 @@
21
46
  "homepage": "https://xevol.com",
22
47
  "engines": {
23
48
  "node": ">=18"
49
+ },
50
+ "devDependencies": {
51
+ "@types/bun": "latest",
52
+ "typescript": "^5.7.0"
24
53
  }
25
54
  }
package/PLAN.md DELETED
@@ -1,310 +0,0 @@
1
- # xevol-cli — Plan
2
-
3
- Minimal CLI for xevol-api. Auth + transcriptions only.
4
-
5
- ## Scope
6
-
7
- 4 features, nothing else:
8
-
9
- 1. **Auth** — login/logout + token-based auth
10
- 2. **List transcriptions** — paginated, filterable
11
- 3. **Add YouTube URL** — submit for processing, poll status
12
- 4. **View transcript** — raw content + formatted spikes
13
-
14
- ## Tech
15
-
16
- - **Runtime:** Bun
17
- - **Framework:** Commander.js
18
- - **HTTP:** native fetch
19
- - **Output:** `cli-table3` + `chalk`
20
- - **Config:** `~/.xevol/config.json`
21
- - **Lang:** TypeScript
22
-
23
- ## Auth — Device Authorization Flow (public-facing)
24
-
25
- No passwords in the CLI. Browser handles all auth complexity (2FA, OAuth, SSO, password managers).
26
-
27
- ### Login flow
28
- ```
29
- xevol login
30
- ```
31
-
32
- 1. CLI calls `POST /auth/cli/device-code` → gets `{ deviceCode, userCode, verificationUrl, expiresIn, interval }`
33
- 2. Opens browser to `https://xevol.com/cli-auth?code=ABCD-1234`
34
- 3. Prints fallback for headless environments:
35
-
36
- ```
37
- Open this URL to authenticate:
38
- https://xevol.com/cli-auth?code=ABCD-1234
39
-
40
- Waiting for approval... (expires in 5 min)
41
- ```
42
-
43
- 4. CLI polls `POST /auth/cli/device-token` with `{ deviceCode }` every `interval` seconds
44
- 5. User logs in on browser (existing session or fresh), sees "Authorize XEVol CLI?" + the user code for verification
45
- 6. User clicks Approve
46
- 7. CLI receives long-lived token, stores in `~/.xevol/config.json`:
47
-
48
- ```json
49
- {
50
- "apiUrl": "https://api.xevol.com",
51
- "token": "xevol_cli_...",
52
- "accountId": "...",
53
- "email": "kuka@xevol.com",
54
- "expiresAt": "2026-08-02T00:00:00Z"
55
- }
56
- ```
57
-
58
- ### Token mode (CI/CD, servers)
59
- ```
60
- xevol login --token <token>
61
- ```
62
- Validates via `GET /auth/session`, stores if valid. For automation where browser isn't available.
63
-
64
- ### Logout
65
- ```
66
- xevol logout
67
- ```
68
- Revokes token server-side, clears local config.
69
-
70
- ### Who am I
71
- ```
72
- xevol whoami
73
- > kuka@xevol.com (Pro plan, 47 transcriptions this month)
74
- ```
75
-
76
- ### Env override
77
- ```
78
- XEVOL_API_URL=http://localhost:8081
79
- XEVOL_TOKEN=<token>
80
- ```
81
-
82
- ### Precedence
83
- 1. `--token` flag
84
- 2. `XEVOL_TOKEN` env var
85
- 3. `~/.xevol/config.json`
86
-
87
- ### New API endpoints needed (xevol-api)
88
-
89
- | Endpoint | Method | Description |
90
- |---|---|---|
91
- | `/auth/cli/device-code` | POST | Generate device code + user code |
92
- | `/auth/cli/device-token` | POST | Poll for token (pending/approved/expired) |
93
- | `/auth/cli/revoke` | POST | Revoke CLI token |
94
- | `/cli-auth` (frontend) | GET | Browser page showing user code + approve button |
95
-
96
- Token format: `xevol_cli_<random>` — separate from session tokens, longer-lived (6 months), revocable from account settings.
97
-
98
- ## Commands
99
-
100
- ### `xevol list`
101
-
102
- List transcriptions with pagination.
103
-
104
- ```
105
- xevol list
106
- xevol list --page 2 --limit 50
107
- xevol list --json
108
- ```
109
-
110
- **API:** `GET /v1/transcription/transcriptions?page=N&limit=N`
111
- **Auth:** session token in cookie header
112
-
113
- **Default output:**
114
- ```
115
- Transcriptions (page 1/3, 47 total)
116
-
117
- ID Status Lang Duration Channel Title
118
- ─────────────────────────────────────────────────────────────────────────
119
- abc123def45 completed en 12:34 Y Combinator How to Build a Startup
120
- xyz789ghi01 completed de 45:12 Lex Fridman Interview with...
121
- ...
122
-
123
- Page 1 of 3 — use --page 2 for next
124
- ```
125
-
126
- **JSON output:** raw API response.
127
-
128
- ### `xevol add <youtube-url>`
129
-
130
- Submit a YouTube URL for transcription.
131
-
132
- ```
133
- xevol add "https://youtube.com/watch?v=abc123"
134
- xevol add "https://youtube.com/watch?v=abc123" --lang de
135
- xevol add "https://youtube.com/watch?v=abc123" --wait
136
- ```
137
-
138
- **API:** `GET /v1/transcription/add?url=<url>&outputLang=<lang>`
139
- **Auth:** session token in cookie header
140
-
141
- **Default output:**
142
- ```
143
- ✓ Transcription created: abc123def45
144
- Status: pending
145
- ```
146
-
147
- **With `--wait`:** polls `GET /v1/transcription/status/:id` every 5s until completed/error.
148
- ```
149
- ✓ Transcription created: abc123def45
150
- ⠋ Processing... (30s)
151
- ✓ Completed: "How to Build a Startup" (12:34)
152
- ```
153
-
154
- **Options:**
155
- - `--lang <code>` — output language (default: `en`)
156
- - `--wait` — poll until complete
157
- - `--json` — raw JSON response
158
-
159
- ### `xevol view <id>`
160
-
161
- View a transcription's raw content.
162
-
163
- ```
164
- xevol view abc123def45
165
- xevol view abc123def45 --raw
166
- xevol view abc123def45 --json
167
- ```
168
-
169
- **API:** `GET /v1/transcription/analysis/:id`
170
-
171
- **Default output:**
172
- ```
173
- How to Build a Startup
174
- Channel: Y Combinator (@ycombinator)
175
- Duration: 12:34 | Lang: en | Status: completed
176
- URL: https://youtube.com/watch?v=abc123
177
- ───────────────────────────────────────
178
-
179
- [summary text]
180
-
181
- ───────────────────────────────────────
182
- Full transcript: use --raw
183
- ```
184
-
185
- **With `--raw`:** prints full `content` or `cleanContent` field to stdout (pipeable).
186
-
187
- ```
188
- xevol view abc123def45 --raw > transcript.txt
189
- xevol view abc123def45 --raw --clean # cleanContent instead of content
190
- ```
191
-
192
- ### `xevol spikes <id>`
193
-
194
- View formatted AI-generated spikes for a transcription.
195
-
196
- ```
197
- xevol spikes abc123def45
198
- xevol spikes abc123def45 --json
199
- ```
200
-
201
- **API:** Direct query — `GET /spikes` where `transcriptionId = :id`
202
-
203
- Since spikes are generated on-demand via `POST /spikes/:transcriptionId` with a `promptId`, the CLI needs to:
204
-
205
- 1. Check if spikes exist for this transcription
206
- 2. If yes, display them
207
- 3. If no, offer to generate (requires `--prompt <id>`)
208
-
209
- ```
210
- xevol spikes abc123def45
211
- ```
212
-
213
- **Output (if spikes exist):**
214
- ```
215
- Spikes for "How to Build a Startup"
216
- ───────────────────────────────────────
217
-
218
- [formatted spike content — markdown rendered to terminal]
219
- ```
220
-
221
- **Output (no spikes):**
222
- ```
223
- No spikes found for abc123def45.
224
- Generate with: xevol spikes abc123def45 --generate --prompt <promptId>
225
- ```
226
-
227
- **Generate:**
228
- ```
229
- xevol spikes abc123def45 --generate --prompt default --lang en
230
- ```
231
- Calls `POST /spikes/:id` with `{ promptId, outputLang }`, then polls stream until complete.
232
-
233
- ## Project Structure
234
-
235
- ```
236
- xevol-cli/
237
- ├── src/
238
- │ ├── index.ts # Entry: commander setup, register commands
239
- │ ├── commands/
240
- │ │ ├── login.ts # login + logout
241
- │ │ ├── list.ts # list transcriptions
242
- │ │ ├── add.ts # add youtube url
243
- │ │ ├── view.ts # view transcript
244
- │ │ └── spikes.ts # view/generate spikes
245
- │ └── lib/
246
- │ ├── api.ts # fetch wrapper (base URL, auth headers, error handling)
247
- │ ├── config.ts # read/write ~/.xevol/config.json
248
- │ └── output.ts # table formatting, spinners, colors
249
- ├── package.json
250
- ├── tsconfig.json
251
- ├── PLAN.md
252
- └── README.md
253
- ```
254
-
255
- ## package.json
256
-
257
- ```json
258
- {
259
- "name": "xevol-cli",
260
- "version": "0.1.0",
261
- "type": "module",
262
- "bin": {
263
- "xevol": "./src/index.ts"
264
- },
265
- "dependencies": {
266
- "commander": "^13.0.0",
267
- "chalk": "^5.4.0",
268
- "cli-table3": "^0.6.5",
269
- "ora": "^8.0.0",
270
- "@inquirer/prompts": "^7.0.0"
271
- },
272
- "devDependencies": {
273
- "@types/bun": "latest",
274
- "typescript": "^5.7.0"
275
- }
276
- }
277
- ```
278
-
279
- ## Install & Link
280
-
281
- ```bash
282
- cd ~/stack/xevol-cli
283
- bun install
284
- bun link # → `xevol` available globally
285
- ```
286
-
287
- ## Implementation Order
288
-
289
- ### Phase 1: API-side (xevol-api)
290
- 1. `POST /auth/cli/device-code` — generate device + user codes, store in Redis with TTL
291
- 2. `POST /auth/cli/device-token` — poll endpoint, returns pending/approved/expired
292
- 3. `POST /auth/cli/revoke` — revoke CLI token
293
- 4. CLI token model — new table or extend existing API keys with `type: "cli"`
294
- 5. Frontend: `/cli-auth` page — show user code, approve button, calls device-token approve
295
-
296
- ### Phase 2: CLI
297
- 1. `lib/config.ts` + `lib/api.ts` — foundation
298
- 2. `commands/login.ts` — device auth flow + `--token` fallback
299
- 3. `commands/list.ts` — list transcriptions
300
- 4. `commands/add.ts` — add URL + polling
301
- 5. `commands/view.ts` — view transcript
302
- 6. `commands/spikes.ts` — view/generate spikes
303
- 7. `lib/output.ts` — polish formatting
304
-
305
- ### Phase 3: Distribution
306
- 1. npm publish as `xevol-cli` (or `@xevol/cli`)
307
- 2. README with install + auth flow
308
- 3. `xevol update` — self-update command
309
-
310
- Estimate: Phase 1 ~3-4h, Phase 2 ~2-3h, Phase 3 ~1h.
package/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env bun
2
- console.log("xevol v0.0.1 — coming soon");