sv 0.8.2 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -1,18 +1,21 @@
1
1
  #!/usr/bin/env node
2
- import { AGENT_NAMES, Command, Element, Option, Tag, __commonJS, __export, __require, __toESM as __toESM$1, __toESM$1 as __toESM, addPnpmBuildDependencies, box, cancel, confirm, create, detect, esm_exports, from, getUserAgent, group, installDependencies, installOption, intro, isCancel, log, multiselect, note, outro, packageManagerPrompt, parseCss$1, parseHtml, parseHtml$1, parseJson$1, parseScript$1, parseSvelte, program, require_picocolors, resolveCommand, select, spinner, templates, text, up, walk_exports } from "./package-manager-D3PRQ-L_.js";
3
- import { addFromString, applyAddons, array_exports, common_exports, createWorkspace, dedent_default, exports_exports, formatFiles, function_exports, getHighlighter, imports_exports, kit_exports, object_exports, require_picocolors$1, setupAddons, variables_exports } from "./install-iBxCFLH9.js";
2
+ import { AGENT_NAMES, Command, E, Element, Ge, J, Le, Ne, Option, Ou, Pe, Tag, Ue, Ve, __commonJS as __commonJS$1, __commonJS$1 as __commonJS, __export, __require, __toESM, __toESM$1, addPnpmBuildDependencies, create, detect, esm_exports, from, getUserAgent, installDependencies, installOption, je, ke, packageManagerPrompt, parseCss$1, parseHtml, parseHtml$1, parseJson$1, parseScript$1, parseSvelte, program, qe, require_picocolors as require_picocolors$1, require_picocolors$1 as require_picocolors, resolveCommand, templates, up, walk_exports } from "./package-manager-CZaGcCtM.js";
3
+ import { addFromString, applyAddons, array_exports, common_exports, createWorkspace, dedent_default, exports_exports, formatFiles, function_exports, getHighlighter, imports_exports, kit_exports, object_exports, setupAddons, variables_exports } from "./install-CfRQUz9L.js";
4
4
  import fs, { existsSync } from "node:fs";
5
5
  import path, { dirname, join } from "node:path";
6
6
  import { fileURLToPath } from "node:url";
7
- import process$1 from "node:process";
7
+ import process$1, { stdin, stdout } from "node:process";
8
+ import * as y from "node:readline";
9
+ import Eu from "node:readline";
10
+ import { ReadStream, WriteStream } from "node:tty";
11
+ import { promisify, stripVTControlCharacters } from "node:util";
8
12
  import { exec, execSync } from "node:child_process";
9
13
  import { createGunzip } from "node:zlib";
10
14
  import { pipeline } from "node:stream/promises";
11
- import { promisify } from "node:util";
12
15
 
13
16
  //#region packages/cli/package.json
14
17
  var name = "sv";
15
- var version = "0.8.2";
18
+ var version = "0.8.4";
16
19
  var type = "module";
17
20
  var description = "A CLI for creating and updating SvelteKit projects";
18
21
  var license = "MIT";
@@ -40,8 +43,8 @@ var exports$1 = {
40
43
  }
41
44
  };
42
45
  var devDependencies = {
46
+ "@clack/prompts": "^1.0.0-alpha.0",
43
47
  "@sveltejs/addons": "workspace:*",
44
- "@sveltejs/clack-prompts": "workspace:*",
45
48
  "@sveltejs/cli-core": "workspace:*",
46
49
  "@sveltejs/create": "workspace:*",
47
50
  "@types/degit": "^2.8.6",
@@ -138,6 +141,9 @@ function _addIssue(context, label, dataset, config2, other) {
138
141
  if (dataset.issues) dataset.issues.push(issue);
139
142
  else dataset.issues = [issue];
140
143
  }
144
+ function _isValidObjectKey(object2, key) {
145
+ return Object.hasOwn(object2, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
146
+ }
141
147
  function _joinExpects(values, separator) {
142
148
  const list = [...new Set(values)];
143
149
  if (list.length > 1) return `(${list.join(` ${separator} `)})`;
@@ -237,53 +243,6 @@ else _addIssue(this, "type", dataset, config2);
237
243
  }
238
244
  };
239
245
  }
240
- function object(entries, message) {
241
- return {
242
- kind: "schema",
243
- type: "object",
244
- reference: object,
245
- expects: "Object",
246
- async: false,
247
- entries,
248
- message,
249
- _run(dataset, config2) {
250
- const input = dataset.value;
251
- if (input && typeof input === "object") {
252
- dataset.typed = true;
253
- dataset.value = {};
254
- for (const key in this.entries) {
255
- const value2 = input[key];
256
- const valueDataset = this.entries[key]._run({
257
- typed: false,
258
- value: value2
259
- }, config2);
260
- if (valueDataset.issues) {
261
- const pathItem = {
262
- type: "object",
263
- origin: "value",
264
- input,
265
- key,
266
- value: value2
267
- };
268
- for (const issue of valueDataset.issues) {
269
- if (issue.path) issue.path.unshift(pathItem);
270
- else issue.path = [pathItem];
271
- dataset.issues?.push(issue);
272
- }
273
- if (!dataset.issues) dataset.issues = valueDataset.issues;
274
- if (config2.abortEarly) {
275
- dataset.typed = false;
276
- break;
277
- }
278
- }
279
- if (!valueDataset.typed) dataset.typed = false;
280
- if (valueDataset.value !== void 0 || key in input) dataset.value[key] = valueDataset.value;
281
- }
282
- } else _addIssue(this, "type", dataset, config2);
283
- return dataset;
284
- }
285
- };
286
- }
287
246
  function optional(wrapped, ...args) {
288
247
  const schema = {
289
248
  kind: "schema",
@@ -322,6 +281,76 @@ else _addIssue(this, "type", dataset, config2);
322
281
  }
323
282
  };
324
283
  }
284
+ function record(key, value2, message) {
285
+ return {
286
+ kind: "schema",
287
+ type: "record",
288
+ reference: record,
289
+ expects: "Object",
290
+ async: false,
291
+ key,
292
+ value: value2,
293
+ message,
294
+ _run(dataset, config2) {
295
+ const input = dataset.value;
296
+ if (input && typeof input === "object") {
297
+ dataset.typed = true;
298
+ dataset.value = {};
299
+ for (const entryKey in input) if (_isValidObjectKey(input, entryKey)) {
300
+ const entryValue = input[entryKey];
301
+ const keyDataset = this.key._run({
302
+ typed: false,
303
+ value: entryKey
304
+ }, config2);
305
+ if (keyDataset.issues) {
306
+ const pathItem = {
307
+ type: "object",
308
+ origin: "key",
309
+ input,
310
+ key: entryKey,
311
+ value: entryValue
312
+ };
313
+ for (const issue of keyDataset.issues) {
314
+ issue.path = [pathItem];
315
+ dataset.issues?.push(issue);
316
+ }
317
+ if (!dataset.issues) dataset.issues = keyDataset.issues;
318
+ if (config2.abortEarly) {
319
+ dataset.typed = false;
320
+ break;
321
+ }
322
+ }
323
+ const valueDataset = this.value._run({
324
+ typed: false,
325
+ value: entryValue
326
+ }, config2);
327
+ if (valueDataset.issues) {
328
+ const pathItem = {
329
+ type: "object",
330
+ origin: "value",
331
+ input,
332
+ key: entryKey,
333
+ value: entryValue
334
+ };
335
+ for (const issue of valueDataset.issues) {
336
+ if (issue.path) issue.path.unshift(pathItem);
337
+ else issue.path = [pathItem];
338
+ dataset.issues?.push(issue);
339
+ }
340
+ if (!dataset.issues) dataset.issues = valueDataset.issues;
341
+ if (config2.abortEarly) {
342
+ dataset.typed = false;
343
+ break;
344
+ }
345
+ }
346
+ if (!keyDataset.typed || !valueDataset.typed) dataset.typed = false;
347
+ if (keyDataset.typed) dataset.value[keyDataset.value] = valueDataset.value;
348
+ }
349
+ } else _addIssue(this, "type", dataset, config2);
350
+ return dataset;
351
+ }
352
+ };
353
+ }
325
354
  function strictObject(entries, message) {
326
355
  return {
327
356
  kind: "schema",
@@ -484,178 +513,132 @@ function defineAddon(config) {
484
513
  function defineAddonOptions(options$6) {
485
514
  return options$6;
486
515
  }
487
- var __create$1 = Object.create;
488
- var __defProp$1 = Object.defineProperty;
489
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
490
- var __getOwnPropNames$1 = Object.getOwnPropertyNames;
491
- var __getProtoOf$1 = Object.getPrototypeOf;
492
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
493
- var __commonJS$1 = (cb, mod) => function() {
494
- return mod || (0, cb[__getOwnPropNames$1(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
495
- };
496
- var __copyProps$1 = (to, from$2, except, desc) => {
497
- if (from$2 && typeof from$2 === "object" || typeof from$2 === "function") for (var keys$1 = __getOwnPropNames$1(from$2), i = 0, n$1 = keys$1.length, key; i < n$1; i++) {
498
- key = keys$1[i];
499
- if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, {
500
- get: ((k) => from$2[k]).bind(null, key),
501
- enumerable: !(desc = __getOwnPropDesc$1(from$2, key)) || desc.enumerable
502
- });
503
- }
504
- return to;
505
- };
506
- var __toESM$1$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$1(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", {
507
- value: mod,
508
- enumerable: true
509
- }) : target, mod));
510
- var __create = Object.create;
511
- var __defProp = Object.defineProperty;
512
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
513
- var __getOwnPropNames = Object.getOwnPropertyNames;
514
- var __getProtoOf = Object.getPrototypeOf;
515
- var __hasOwnProp = Object.prototype.hasOwnProperty;
516
- var __commonJS$2 = (cb, mod) => function() {
517
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
518
- };
519
- var __copyProps = (to, from$2, except, desc) => {
520
- if (from$2 && typeof from$2 === "object" || typeof from$2 === "function") for (var keys$1 = __getOwnPropNames(from$2), i = 0, n$1 = keys$1.length, key; i < n$1; i++) {
521
- key = keys$1[i];
522
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
523
- get: ((k) => from$2[k]).bind(null, key),
524
- enumerable: !(desc = __getOwnPropDesc(from$2, key)) || desc.enumerable
525
- });
526
- }
527
- return to;
528
- };
529
- var __toESM$2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
530
- value: mod,
531
- enumerable: true
532
- }) : target, mod));
533
- var require_src$1 = __commonJS$2({ "node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports$2, module$1) {
534
- const ESC$1 = "\x1B";
535
- const CSI$1 = `${ESC$1}[`;
536
- const beep$1 = "\x07";
537
- const cursor$3 = {
538
- to(x, y) {
539
- if (!y) return `${CSI$1}${x + 1}G`;
540
- return `${CSI$1}${y + 1};${x + 1}H`;
516
+ var require_src = __commonJS$1({ "node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports$2, module$1) {
517
+ const ESC = "\x1B";
518
+ const CSI = `${ESC}[`;
519
+ const beep = "\x07";
520
+ const cursor = {
521
+ to(x$1, y$1) {
522
+ if (!y$1) return `${CSI}${x$1 + 1}G`;
523
+ return `${CSI}${y$1 + 1};${x$1 + 1}H`;
541
524
  },
542
- move(x, y) {
525
+ move(x$1, y$1) {
543
526
  let ret = "";
544
- if (x < 0) ret += `${CSI$1}${-x}D`;
545
- else if (x > 0) ret += `${CSI$1}${x}C`;
546
- if (y < 0) ret += `${CSI$1}${-y}A`;
547
- else if (y > 0) ret += `${CSI$1}${y}B`;
527
+ if (x$1 < 0) ret += `${CSI}${-x$1}D`;
528
+ else if (x$1 > 0) ret += `${CSI}${x$1}C`;
529
+ if (y$1 < 0) ret += `${CSI}${-y$1}A`;
530
+ else if (y$1 > 0) ret += `${CSI}${y$1}B`;
548
531
  return ret;
549
532
  },
550
- up: (count = 1) => `${CSI$1}${count}A`,
551
- down: (count = 1) => `${CSI$1}${count}B`,
552
- forward: (count = 1) => `${CSI$1}${count}C`,
553
- backward: (count = 1) => `${CSI$1}${count}D`,
554
- nextLine: (count = 1) => `${CSI$1}E`.repeat(count),
555
- prevLine: (count = 1) => `${CSI$1}F`.repeat(count),
556
- left: `${CSI$1}G`,
557
- hide: `${CSI$1}?25l`,
558
- show: `${CSI$1}?25h`,
559
- save: `${ESC$1}7`,
560
- restore: `${ESC$1}8`
533
+ up: (count = 1) => `${CSI}${count}A`,
534
+ down: (count = 1) => `${CSI}${count}B`,
535
+ forward: (count = 1) => `${CSI}${count}C`,
536
+ backward: (count = 1) => `${CSI}${count}D`,
537
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
538
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
539
+ left: `${CSI}G`,
540
+ hide: `${CSI}?25l`,
541
+ show: `${CSI}?25h`,
542
+ save: `${ESC}7`,
543
+ restore: `${ESC}8`
561
544
  };
562
- const scroll$1 = {
563
- up: (count = 1) => `${CSI$1}S`.repeat(count),
564
- down: (count = 1) => `${CSI$1}T`.repeat(count)
545
+ const scroll = {
546
+ up: (count = 1) => `${CSI}S`.repeat(count),
547
+ down: (count = 1) => `${CSI}T`.repeat(count)
565
548
  };
566
- const erase$1$1 = {
567
- screen: `${CSI$1}2J`,
568
- up: (count = 1) => `${CSI$1}1J`.repeat(count),
569
- down: (count = 1) => `${CSI$1}J`.repeat(count),
570
- line: `${CSI$1}2K`,
571
- lineEnd: `${CSI$1}K`,
572
- lineStart: `${CSI$1}1K`,
549
+ const erase = {
550
+ screen: `${CSI}2J`,
551
+ up: (count = 1) => `${CSI}1J`.repeat(count),
552
+ down: (count = 1) => `${CSI}J`.repeat(count),
553
+ line: `${CSI}2K`,
554
+ lineEnd: `${CSI}K`,
555
+ lineStart: `${CSI}1K`,
573
556
  lines(count) {
574
557
  let clear = "";
575
- for (let i = 0; i < count; i++) clear += this.line + (i < count - 1 ? cursor$3.up() : "");
576
- if (count) clear += cursor$3.left;
558
+ for (let i = 0; i < count; i++) clear += this.line + (i < count - 1 ? cursor.up() : "");
559
+ if (count) clear += cursor.left;
577
560
  return clear;
578
561
  }
579
562
  };
580
563
  module$1.exports = {
581
- cursor: cursor$3,
582
- scroll: scroll$1,
583
- erase: erase$1$1,
584
- beep: beep$1
564
+ cursor,
565
+ scroll,
566
+ erase,
567
+ beep
585
568
  };
586
569
  } });
587
- function ansiRegex$1({ onlyFirst = false } = {}) {
588
- const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
589
- const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
590
- return new RegExp(pattern, onlyFirst ? undefined : "g");
570
+ var import_src$1 = __toESM(require_src(), 1);
571
+ var import_picocolors$3$1 = __toESM(require_picocolors$1(), 1);
572
+ function hu({ onlyFirst: e$1 = !1 } = {}) {
573
+ const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
574
+ return new RegExp(t, e$1 ? void 0 : "g");
591
575
  }
592
- const regex = ansiRegex$1();
593
- var require_eastasianwidth = __commonJS$2({ "node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js"(exports$2, module$1) {
594
- var eaw = {};
595
- if ("undefined" == typeof module$1) window.eastasianwidth = eaw;
596
- else module$1.exports = eaw;
597
- eaw.eastAsianWidth = function(character) {
598
- var x = character.charCodeAt(0);
599
- var y = character.length == 2 ? character.charCodeAt(1) : 0;
600
- var codePoint = x;
601
- if (55296 <= x && x <= 56319 && 56320 <= y && y <= 57343) {
602
- x &= 1023;
603
- y &= 1023;
604
- codePoint = x << 10 | y;
605
- codePoint += 65536;
606
- }
607
- if (12288 == codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) return "F";
608
- if (8361 == codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518) return "H";
609
- if (4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141) return "W";
610
- if (32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 == codePoint || 175 == codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630) return "Na";
611
- if (161 == codePoint || 164 == codePoint || 167 <= codePoint && codePoint <= 168 || 170 == codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 == codePoint || 208 == codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 == codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 == codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 == codePoint || 254 == codePoint || 257 == codePoint || 273 == codePoint || 275 == codePoint || 283 == codePoint || 294 <= codePoint && codePoint <= 295 || 299 == codePoint || 305 <= codePoint && codePoint <= 307 || 312 == codePoint || 319 <= codePoint && codePoint <= 322 || 324 == codePoint || 328 <= codePoint && codePoint <= 331 || 333 == codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 == codePoint || 462 == codePoint || 464 == codePoint || 466 == codePoint || 468 == codePoint || 470 == codePoint || 472 == codePoint || 474 == codePoint || 476 == codePoint || 593 == codePoint || 609 == codePoint || 708 == codePoint || 711 == codePoint || 713 <= codePoint && codePoint <= 715 || 717 == codePoint || 720 == codePoint || 728 <= codePoint && codePoint <= 731 || 733 == codePoint || 735 == codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 == codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 == codePoint || 8208 == codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 == codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 == codePoint || 8251 == codePoint || 8254 == codePoint || 8308 == codePoint || 8319 == codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 == codePoint || 8451 == codePoint || 8453 == codePoint || 8457 == codePoint || 8467 == codePoint || 8470 == codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 == codePoint || 8491 == codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 == codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 == codePoint || 8660 == codePoint || 8679 == codePoint || 8704 == codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 == codePoint || 8719 == codePoint || 8721 == codePoint || 8725 == codePoint || 8730 == codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 == codePoint || 8741 == codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 == codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 == codePoint || 8780 == codePoint || 8786 == codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 == codePoint || 8857 == codePoint || 8869 == codePoint || 8895 == codePoint || 8978 == codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 == codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 == codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 == codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 == codePoint || 9758 == codePoint || 9792 == codePoint || 9794 == codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 == codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 == codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 == codePoint || 10071 == codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 == codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109) return "A";
612
- return "N";
613
- };
614
- eaw.characterLength = function(character) {
615
- var code = this.eastAsianWidth(character);
616
- if (code == "F" || code == "W" || code == "A") return 2;
617
- else return 1;
618
- };
619
- function stringToArray(string$1) {
620
- return string$1.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
621
- }
622
- eaw.length = function(string$1) {
623
- var characters = stringToArray(string$1);
624
- var len = 0;
625
- for (var i = 0; i < characters.length; i++) len = len + this.characterLength(characters[i]);
626
- return len;
576
+ const cu = hu();
577
+ function Y(e$1) {
578
+ if (typeof e$1 != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof e$1}\``);
579
+ return e$1.replace(cu, "");
580
+ }
581
+ function Z(e$1) {
582
+ return e$1 && e$1.__esModule && Object.prototype.hasOwnProperty.call(e$1, "default") ? e$1.default : e$1;
583
+ }
584
+ var q$1 = { exports: {} };
585
+ (function(e$1) {
586
+ var D$1 = {};
587
+ e$1.exports = D$1, D$1.eastAsianWidth = function(s) {
588
+ var i = s.charCodeAt(0), F$1 = s.length == 2 ? s.charCodeAt(1) : 0, u = i;
589
+ return 55296 <= i && i <= 56319 && 56320 <= F$1 && F$1 <= 57343 && (i &= 1023, F$1 &= 1023, u = i << 10 | F$1, u += 65536), u == 12288 || 65281 <= u && u <= 65376 || 65504 <= u && u <= 65510 ? "F" : u == 8361 || 65377 <= u && u <= 65470 || 65474 <= u && u <= 65479 || 65482 <= u && u <= 65487 || 65490 <= u && u <= 65495 || 65498 <= u && u <= 65500 || 65512 <= u && u <= 65518 ? "H" : 4352 <= u && u <= 4447 || 4515 <= u && u <= 4519 || 4602 <= u && u <= 4607 || 9001 <= u && u <= 9002 || 11904 <= u && u <= 11929 || 11931 <= u && u <= 12019 || 12032 <= u && u <= 12245 || 12272 <= u && u <= 12283 || 12289 <= u && u <= 12350 || 12353 <= u && u <= 12438 || 12441 <= u && u <= 12543 || 12549 <= u && u <= 12589 || 12593 <= u && u <= 12686 || 12688 <= u && u <= 12730 || 12736 <= u && u <= 12771 || 12784 <= u && u <= 12830 || 12832 <= u && u <= 12871 || 12880 <= u && u <= 13054 || 13056 <= u && u <= 19903 || 19968 <= u && u <= 42124 || 42128 <= u && u <= 42182 || 43360 <= u && u <= 43388 || 44032 <= u && u <= 55203 || 55216 <= u && u <= 55238 || 55243 <= u && u <= 55291 || 63744 <= u && u <= 64255 || 65040 <= u && u <= 65049 || 65072 <= u && u <= 65106 || 65108 <= u && u <= 65126 || 65128 <= u && u <= 65131 || 110592 <= u && u <= 110593 || 127488 <= u && u <= 127490 || 127504 <= u && u <= 127546 || 127552 <= u && u <= 127560 || 127568 <= u && u <= 127569 || 131072 <= u && u <= 194367 || 177984 <= u && u <= 196605 || 196608 <= u && u <= 262141 ? "W" : 32 <= u && u <= 126 || 162 <= u && u <= 163 || 165 <= u && u <= 166 || u == 172 || u == 175 || 10214 <= u && u <= 10221 || 10629 <= u && u <= 10630 ? "Na" : u == 161 || u == 164 || 167 <= u && u <= 168 || u == 170 || 173 <= u && u <= 174 || 176 <= u && u <= 180 || 182 <= u && u <= 186 || 188 <= u && u <= 191 || u == 198 || u == 208 || 215 <= u && u <= 216 || 222 <= u && u <= 225 || u == 230 || 232 <= u && u <= 234 || 236 <= u && u <= 237 || u == 240 || 242 <= u && u <= 243 || 247 <= u && u <= 250 || u == 252 || u == 254 || u == 257 || u == 273 || u == 275 || u == 283 || 294 <= u && u <= 295 || u == 299 || 305 <= u && u <= 307 || u == 312 || 319 <= u && u <= 322 || u == 324 || 328 <= u && u <= 331 || u == 333 || 338 <= u && u <= 339 || 358 <= u && u <= 359 || u == 363 || u == 462 || u == 464 || u == 466 || u == 468 || u == 470 || u == 472 || u == 474 || u == 476 || u == 593 || u == 609 || u == 708 || u == 711 || 713 <= u && u <= 715 || u == 717 || u == 720 || 728 <= u && u <= 731 || u == 733 || u == 735 || 768 <= u && u <= 879 || 913 <= u && u <= 929 || 931 <= u && u <= 937 || 945 <= u && u <= 961 || 963 <= u && u <= 969 || u == 1025 || 1040 <= u && u <= 1103 || u == 1105 || u == 8208 || 8211 <= u && u <= 8214 || 8216 <= u && u <= 8217 || 8220 <= u && u <= 8221 || 8224 <= u && u <= 8226 || 8228 <= u && u <= 8231 || u == 8240 || 8242 <= u && u <= 8243 || u == 8245 || u == 8251 || u == 8254 || u == 8308 || u == 8319 || 8321 <= u && u <= 8324 || u == 8364 || u == 8451 || u == 8453 || u == 8457 || u == 8467 || u == 8470 || 8481 <= u && u <= 8482 || u == 8486 || u == 8491 || 8531 <= u && u <= 8532 || 8539 <= u && u <= 8542 || 8544 <= u && u <= 8555 || 8560 <= u && u <= 8569 || u == 8585 || 8592 <= u && u <= 8601 || 8632 <= u && u <= 8633 || u == 8658 || u == 8660 || u == 8679 || u == 8704 || 8706 <= u && u <= 8707 || 8711 <= u && u <= 8712 || u == 8715 || u == 8719 || u == 8721 || u == 8725 || u == 8730 || 8733 <= u && u <= 8736 || u == 8739 || u == 8741 || 8743 <= u && u <= 8748 || u == 8750 || 8756 <= u && u <= 8759 || 8764 <= u && u <= 8765 || u == 8776 || u == 8780 || u == 8786 || 8800 <= u && u <= 8801 || 8804 <= u && u <= 8807 || 8810 <= u && u <= 8811 || 8814 <= u && u <= 8815 || 8834 <= u && u <= 8835 || 8838 <= u && u <= 8839 || u == 8853 || u == 8857 || u == 8869 || u == 8895 || u == 8978 || 9312 <= u && u <= 9449 || 9451 <= u && u <= 9547 || 9552 <= u && u <= 9587 || 9600 <= u && u <= 9615 || 9618 <= u && u <= 9621 || 9632 <= u && u <= 9633 || 9635 <= u && u <= 9641 || 9650 <= u && u <= 9651 || 9654 <= u && u <= 9655 || 9660 <= u && u <= 9661 || 9664 <= u && u <= 9665 || 9670 <= u && u <= 9672 || u == 9675 || 9678 <= u && u <= 9681 || 9698 <= u && u <= 9701 || u == 9711 || 9733 <= u && u <= 9734 || u == 9737 || 9742 <= u && u <= 9743 || 9748 <= u && u <= 9749 || u == 9756 || u == 9758 || u == 9792 || u == 9794 || 9824 <= u && u <= 9825 || 9827 <= u && u <= 9829 || 9831 <= u && u <= 9834 || 9836 <= u && u <= 9837 || u == 9839 || 9886 <= u && u <= 9887 || 9918 <= u && u <= 9919 || 9924 <= u && u <= 9933 || 9935 <= u && u <= 9953 || u == 9955 || 9960 <= u && u <= 9983 || u == 10045 || u == 10071 || 10102 <= u && u <= 10111 || 11093 <= u && u <= 11097 || 12872 <= u && u <= 12879 || 57344 <= u && u <= 63743 || 65024 <= u && u <= 65039 || u == 65533 || 127232 <= u && u <= 127242 || 127248 <= u && u <= 127277 || 127280 <= u && u <= 127337 || 127344 <= u && u <= 127386 || 917760 <= u && u <= 917999 || 983040 <= u && u <= 1048573 || 1048576 <= u && u <= 1114109 ? "A" : "N";
590
+ }, D$1.characterLength = function(s) {
591
+ var i = this.eastAsianWidth(s);
592
+ return i == "F" || i == "W" || i == "A" ? 2 : 1;
627
593
  };
628
- eaw.slice = function(text$1, start, end) {
629
- textLen = eaw.length(text$1);
630
- start = start ? start : 0;
631
- end = end ? end : 1;
632
- if (start < 0) start = textLen + start;
633
- if (end < 0) end = textLen + end;
634
- var result = "";
635
- var eawLen = 0;
636
- var chars$1 = stringToArray(text$1);
637
- for (var i = 0; i < chars$1.length; i++) {
638
- var char = chars$1[i];
639
- var charLen = eaw.length(char);
640
- if (eawLen >= start - (charLen == 2 ? 1 : 0)) if (eawLen + charLen <= end) result += char;
594
+ function t(s) {
595
+ return s.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
596
+ }
597
+ D$1.length = function(s) {
598
+ for (var i = t(s), F$1 = 0, u = 0; u < i.length; u++) F$1 = F$1 + this.characterLength(i[u]);
599
+ return F$1;
600
+ }, D$1.slice = function(s, i, F$1) {
601
+ textLen = D$1.length(s), i = i || 0, F$1 = F$1 || 1, i < 0 && (i = textLen + i), F$1 < 0 && (F$1 = textLen + F$1);
602
+ for (var u = "", r = 0, a = t(s), n$1 = 0; n$1 < a.length; n$1++) {
603
+ var l = a[n$1], o$1 = D$1.length(l);
604
+ if (r >= i - (o$1 == 2 ? 1 : 0)) if (r + o$1 <= F$1) u += l;
641
605
  else break;
642
- eawLen += charLen;
606
+ r += o$1;
643
607
  }
644
- return result;
608
+ return u;
645
609
  };
646
- } });
647
- var require_emoji_regex = __commonJS$2({ "node_modules/.pnpm/emoji-regex@9.2.2/node_modules/emoji-regex/index.js"(exports$2, module$1) {
648
- module$1.exports = function() {
649
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
650
- };
651
- } });
652
- var import_eastasianwidth = __toESM$2(require_eastasianwidth(), 1);
653
- var import_emoji_regex = __toESM$2(require_emoji_regex(), 1);
654
- const ANSI_BACKGROUND_OFFSET = 10;
655
- const wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
656
- const wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
657
- const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
658
- const styles = {
610
+ })(q$1);
611
+ var xu = q$1.exports;
612
+ const Bu = Z(xu);
613
+ var Au = function() {
614
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
615
+ };
616
+ const pu = Z(Au);
617
+ function m(e$1, D$1 = {}) {
618
+ if (typeof e$1 != "string" || e$1.length === 0 || (D$1 = {
619
+ ambiguousIsNarrow: !0,
620
+ ...D$1
621
+ }, e$1 = Y(e$1), e$1.length === 0)) return 0;
622
+ e$1 = e$1.replace(pu(), " ");
623
+ const t = D$1.ambiguousIsNarrow ? 1 : 2;
624
+ let s = 0;
625
+ for (const i of e$1) {
626
+ const F$1 = i.codePointAt(0);
627
+ if (F$1 <= 31 || F$1 >= 127 && F$1 <= 159 || F$1 >= 768 && F$1 <= 879) continue;
628
+ switch (Bu.eastAsianWidth(i)) {
629
+ case "F":
630
+ case "W":
631
+ s += 2;
632
+ break;
633
+ case "A":
634
+ s += t;
635
+ break;
636
+ default: s += 1;
637
+ }
638
+ }
639
+ return s;
640
+ }
641
+ const O$1 = 10, H$1 = (e$1 = 0) => (D$1) => `\x1B[${D$1 + e$1}m`, U$1 = (e$1 = 0) => (D$1) => `\x1B[${38 + e$1};5;${D$1}m`, J$1 = (e$1 = 0) => (D$1, t, s) => `\x1B[${38 + e$1};2;${D$1};${t};${s}m`, C = {
659
642
  modifier: {
660
643
  reset: [0, 0],
661
644
  bold: [1, 22],
@@ -708,363 +691,1223 @@ const styles = {
708
691
  bgWhiteBright: [107, 49]
709
692
  }
710
693
  };
711
- const modifierNames = Object.keys(styles.modifier);
712
- const foregroundColorNames = Object.keys(styles.color);
713
- const backgroundColorNames = Object.keys(styles.bgColor);
714
- const colorNames = [...foregroundColorNames, ...backgroundColorNames];
715
- function assembleStyles() {
716
- const codes = new Map();
717
- for (const [groupName, group$1] of Object.entries(styles)) {
718
- for (const [styleName, style] of Object.entries(group$1)) {
719
- styles[styleName] = {
720
- open: `\u001B[${style[0]}m`,
721
- close: `\u001B[${style[1]}m`
722
- };
723
- group$1[styleName] = styles[styleName];
724
- codes.set(style[0], style[1]);
725
- }
726
- Object.defineProperty(styles, groupName, {
727
- value: group$1,
728
- enumerable: false
694
+ Object.keys(C.modifier);
695
+ const fu = Object.keys(C.color), du = Object.keys(C.bgColor);
696
+ [...fu, ...du];
697
+ function gu() {
698
+ const e$1 = new Map();
699
+ for (const [D$1, t] of Object.entries(C)) {
700
+ for (const [s, i] of Object.entries(t)) C[s] = {
701
+ open: `\x1B[${i[0]}m`,
702
+ close: `\x1B[${i[1]}m`
703
+ }, t[s] = C[s], e$1.set(i[0], i[1]);
704
+ Object.defineProperty(C, D$1, {
705
+ value: t,
706
+ enumerable: !1
729
707
  });
730
708
  }
731
- Object.defineProperty(styles, "codes", {
732
- value: codes,
733
- enumerable: false
734
- });
735
- styles.color.close = "\x1B[39m";
736
- styles.bgColor.close = "\x1B[49m";
737
- styles.color.ansi = wrapAnsi16();
738
- styles.color.ansi256 = wrapAnsi256();
739
- styles.color.ansi16m = wrapAnsi16m();
740
- styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
741
- styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
742
- styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
743
- Object.defineProperties(styles, {
709
+ return Object.defineProperty(C, "codes", {
710
+ value: e$1,
711
+ enumerable: !1
712
+ }), C.color.close = "\x1B[39m", C.bgColor.close = "\x1B[49m", C.color.ansi = H$1(), C.color.ansi256 = U$1(), C.color.ansi16m = J$1(), C.bgColor.ansi = H$1(O$1), C.bgColor.ansi256 = U$1(O$1), C.bgColor.ansi16m = J$1(O$1), Object.defineProperties(C, {
744
713
  rgbToAnsi256: {
745
- value: (red, green, blue) => {
746
- if (red === green && green === blue) {
747
- if (red < 8) return 16;
748
- if (red > 248) return 231;
749
- return Math.round((red - 8) / 247 * 24) + 232;
750
- }
751
- return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
752
- },
753
- enumerable: false
714
+ value: (D$1, t, s) => D$1 === t && t === s ? D$1 < 8 ? 16 : D$1 > 248 ? 231 : Math.round((D$1 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(D$1 / 255 * 5) + 6 * Math.round(t / 255 * 5) + Math.round(s / 255 * 5),
715
+ enumerable: !1
754
716
  },
755
717
  hexToRgb: {
756
- value: (hex) => {
757
- const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
758
- if (!matches) return [
718
+ value: (D$1) => {
719
+ const t = /[a-f\d]{6}|[a-f\d]{3}/i.exec(D$1.toString(16));
720
+ if (!t) return [
759
721
  0,
760
722
  0,
761
723
  0
762
724
  ];
763
- let [colorString] = matches;
764
- if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
765
- const integer = Number.parseInt(colorString, 16);
725
+ let [s] = t;
726
+ s.length === 3 && (s = [...s].map((F$1) => F$1 + F$1).join(""));
727
+ const i = Number.parseInt(s, 16);
766
728
  return [
767
- integer >> 16 & 255,
768
- integer >> 8 & 255,
769
- integer & 255
729
+ i >> 16 & 255,
730
+ i >> 8 & 255,
731
+ i & 255
770
732
  ];
771
733
  },
772
- enumerable: false
734
+ enumerable: !1
773
735
  },
774
736
  hexToAnsi256: {
775
- value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
776
- enumerable: false
737
+ value: (D$1) => C.rgbToAnsi256(...C.hexToRgb(D$1)),
738
+ enumerable: !1
777
739
  },
778
740
  ansi256ToAnsi: {
779
- value: (code) => {
780
- if (code < 8) return 30 + code;
781
- if (code < 16) return 90 + (code - 8);
782
- let red;
783
- let green;
784
- let blue;
785
- if (code >= 232) {
786
- red = ((code - 232) * 10 + 8) / 255;
787
- green = red;
788
- blue = red;
789
- } else {
790
- code -= 16;
791
- const remainder = code % 36;
792
- red = Math.floor(code / 36) / 5;
793
- green = Math.floor(remainder / 6) / 5;
794
- blue = remainder % 6 / 5;
741
+ value: (D$1) => {
742
+ if (D$1 < 8) return 30 + D$1;
743
+ if (D$1 < 16) return 90 + (D$1 - 8);
744
+ let t, s, i;
745
+ if (D$1 >= 232) t = ((D$1 - 232) * 10 + 8) / 255, s = t, i = t;
746
+ else {
747
+ D$1 -= 16;
748
+ const r = D$1 % 36;
749
+ t = Math.floor(D$1 / 36) / 5, s = Math.floor(r / 6) / 5, i = r % 6 / 5;
795
750
  }
796
- const value = Math.max(red, green, blue) * 2;
797
- if (value === 0) return 30;
798
- let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
799
- if (value === 2) result += 60;
800
- return result;
751
+ const F$1 = Math.max(t, s, i) * 2;
752
+ if (F$1 === 0) return 30;
753
+ let u = 30 + (Math.round(i) << 2 | Math.round(s) << 1 | Math.round(t));
754
+ return F$1 === 2 && (u += 60), u;
801
755
  },
802
- enumerable: false
756
+ enumerable: !1
803
757
  },
804
758
  rgbToAnsi: {
805
- value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
806
- enumerable: false
759
+ value: (D$1, t, s) => C.ansi256ToAnsi(C.rgbToAnsi256(D$1, t, s)),
760
+ enumerable: !1
807
761
  },
808
762
  hexToAnsi: {
809
- value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
810
- enumerable: false
763
+ value: (D$1) => C.ansi256ToAnsi(C.hexToAnsi256(D$1)),
764
+ enumerable: !1
811
765
  }
812
- });
813
- return styles;
766
+ }), C;
814
767
  }
815
- const ansiStyles = assembleStyles();
816
- const ANSI_OSC = "]";
817
- const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
818
- var import_src$2 = __toESM$2(require_src$1(), 1);
819
- const cancel$1 = Symbol("clack:cancel");
820
- var import_src$1 = __toESM$2(require_src$1(), 1);
821
- var require_picocolors$1$1 = __commonJS$2({ "node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports$2, module$1) {
822
- let p$1 = process || {}, argv$1 = p$1.argv || [], env$1 = p$1.env || {};
823
- let isColorSupported$1 = !(!!env$1.NO_COLOR || argv$1.includes("--no-color")) && (!!env$1.FORCE_COLOR || argv$1.includes("--color") || p$1.platform === "win32" || (p$1.stdout || {}).isTTY && env$1.TERM !== "dumb" || !!env$1.CI);
824
- let formatter$1 = (open, close, replace = open) => (input) => {
825
- let string$1 = "" + input, index = string$1.indexOf(close, open.length);
826
- return ~index ? open + replaceClose$1(string$1, close, replace, index) + close : open + string$1 + close;
827
- };
828
- let replaceClose$1 = (string$1, close, replace, index) => {
829
- let result = "", cursor$4 = 0;
830
- do {
831
- result += string$1.substring(cursor$4, index) + replace;
832
- cursor$4 = index + close.length;
833
- index = string$1.indexOf(close, cursor$4);
834
- } while (~index);
835
- return result + string$1.substring(cursor$4);
836
- };
837
- let createColors$1 = (enabled = isColorSupported$1) => {
838
- let f = enabled ? formatter$1 : () => String;
839
- return {
840
- isColorSupported: enabled,
841
- reset: f("\x1B[0m", "\x1B[0m"),
842
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
843
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
844
- italic: f("\x1B[3m", "\x1B[23m"),
845
- underline: f("\x1B[4m", "\x1B[24m"),
846
- inverse: f("\x1B[7m", "\x1B[27m"),
847
- hidden: f("\x1B[8m", "\x1B[28m"),
848
- strikethrough: f("\x1B[9m", "\x1B[29m"),
849
- black: f("\x1B[30m", "\x1B[39m"),
850
- red: f("\x1B[31m", "\x1B[39m"),
851
- green: f("\x1B[32m", "\x1B[39m"),
852
- yellow: f("\x1B[33m", "\x1B[39m"),
853
- blue: f("\x1B[34m", "\x1B[39m"),
854
- magenta: f("\x1B[35m", "\x1B[39m"),
855
- cyan: f("\x1B[36m", "\x1B[39m"),
856
- white: f("\x1B[37m", "\x1B[39m"),
857
- gray: f("\x1B[90m", "\x1B[39m"),
858
- bgBlack: f("\x1B[40m", "\x1B[49m"),
859
- bgRed: f("\x1B[41m", "\x1B[49m"),
860
- bgGreen: f("\x1B[42m", "\x1B[49m"),
861
- bgYellow: f("\x1B[43m", "\x1B[49m"),
862
- bgBlue: f("\x1B[44m", "\x1B[49m"),
863
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
864
- bgCyan: f("\x1B[46m", "\x1B[49m"),
865
- bgWhite: f("\x1B[47m", "\x1B[49m"),
866
- blackBright: f("\x1B[90m", "\x1B[39m"),
867
- redBright: f("\x1B[91m", "\x1B[39m"),
868
- greenBright: f("\x1B[92m", "\x1B[39m"),
869
- yellowBright: f("\x1B[93m", "\x1B[39m"),
870
- blueBright: f("\x1B[94m", "\x1B[39m"),
871
- magentaBright: f("\x1B[95m", "\x1B[39m"),
872
- cyanBright: f("\x1B[96m", "\x1B[39m"),
873
- whiteBright: f("\x1B[97m", "\x1B[39m"),
874
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
875
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
876
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
877
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
878
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
879
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
880
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
881
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
882
- };
883
- };
884
- module$1.exports = createColors$1();
885
- module$1.exports.createColors = createColors$1;
886
- } });
887
- var import_picocolors$1$1 = __toESM$2(require_picocolors$1$1(), 1);
888
- var import_picocolors$2$1 = __toESM$2(require_picocolors$1$1(), 1);
889
- var import_src$3 = __toESM$2(require_src$1(), 1);
890
- const isWindows = process$1.platform.startsWith("win");
891
- function isUnicodeSupported() {
892
- if (process$1.platform !== "win32") return process$1.env.TERM !== "linux";
893
- return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
768
+ const mu = gu(), _$1 = new Set(["\x1B", "›"]), vu = 39, M$1 = "\x07", Q = "[", bu = "]", X$1 = "m", T$1 = `${bu}8;;`, uu = (e$1) => `${_$1.values().next().value}${Q}${e$1}${X$1}`, Du = (e$1) => `${_$1.values().next().value}${T$1}${e$1}${M$1}`, wu = (e$1) => e$1.split(" ").map((D$1) => m(D$1)), j$1 = (e$1, D$1, t) => {
769
+ const s = [...D$1];
770
+ let i = !1, F$1 = !1, u = m(Y(e$1[e$1.length - 1]));
771
+ for (const [r, a] of s.entries()) {
772
+ const n$1 = m(a);
773
+ if (u + n$1 <= t ? e$1[e$1.length - 1] += a : (e$1.push(a), u = 0), _$1.has(a) && (i = !0, F$1 = s.slice(r + 1).join("").startsWith(T$1)), i) {
774
+ F$1 ? a === M$1 && (i = !1, F$1 = !1) : a === X$1 && (i = !1);
775
+ continue;
776
+ }
777
+ u += n$1, u === t && r < s.length - 1 && (e$1.push(""), u = 0);
778
+ }
779
+ !u && e$1[e$1.length - 1].length > 0 && e$1.length > 1 && (e$1[e$1.length - 2] += e$1.pop());
780
+ }, yu = (e$1) => {
781
+ const D$1 = e$1.split(" ");
782
+ let t = D$1.length;
783
+ for (; t > 0 && !(m(D$1[t - 1]) > 0);) t--;
784
+ return t === D$1.length ? e$1 : D$1.slice(0, t).join(" ") + D$1.slice(t).join("");
785
+ }, _u = (e$1, D$1, t = {}) => {
786
+ if (t.trim !== !1 && e$1.trim() === "") return "";
787
+ let s = "", i, F$1;
788
+ const u = wu(e$1);
789
+ let r = [""];
790
+ for (const [n$1, l] of e$1.split(" ").entries()) {
791
+ t.trim !== !1 && (r[r.length - 1] = r[r.length - 1].trimStart());
792
+ let o$1 = m(r[r.length - 1]);
793
+ if (n$1 !== 0 && (o$1 >= D$1 && (t.wordWrap === !1 || t.trim === !1) && (r.push(""), o$1 = 0), (o$1 > 0 || t.trim === !1) && (r[r.length - 1] += " ", o$1++)), t.hard && u[n$1] > D$1) {
794
+ const A$1 = D$1 - o$1, w = 1 + Math.floor((u[n$1] - A$1 - 1) / D$1);
795
+ Math.floor((u[n$1] - 1) / D$1) < w && r.push(""), j$1(r, l, D$1);
796
+ continue;
797
+ }
798
+ if (o$1 + u[n$1] > D$1 && o$1 > 0 && u[n$1] > 0) {
799
+ if (t.wordWrap === !1 && o$1 < D$1) {
800
+ j$1(r, l, D$1);
801
+ continue;
802
+ }
803
+ r.push("");
804
+ }
805
+ if (o$1 + u[n$1] > D$1 && t.wordWrap === !1) {
806
+ j$1(r, l, D$1);
807
+ continue;
808
+ }
809
+ r[r.length - 1] += l;
810
+ }
811
+ t.trim !== !1 && (r = r.map((n$1) => yu(n$1)));
812
+ const a = [...r.join(`
813
+ `)];
814
+ for (const [n$1, l] of a.entries()) {
815
+ if (s += l, _$1.has(l)) {
816
+ const { groups: A$1 } = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${T$1}(?<uri>.*)${M$1})`).exec(a.slice(n$1).join("")) || { groups: {} };
817
+ if (A$1.code !== void 0) {
818
+ const w = Number.parseFloat(A$1.code);
819
+ i = w === vu ? void 0 : w;
820
+ } else A$1.uri !== void 0 && (F$1 = A$1.uri.length === 0 ? void 0 : A$1.uri);
821
+ }
822
+ const o$1 = mu.codes.get(Number(i));
823
+ a[n$1 + 1] === `
824
+ ` ? (F$1 && (s += Du("")), i && o$1 && (s += uu(o$1))) : l === `
825
+ ` && (i && o$1 && (s += uu(i)), F$1 && (s += Du(F$1)));
826
+ }
827
+ return s;
828
+ };
829
+ function tu(e$1, D$1, t) {
830
+ return String(e$1).normalize().replace(/\r\n/g, `
831
+ `).split(`
832
+ `).map((s) => _u(s, D$1, t)).join(`
833
+ `);
894
834
  }
895
- var require_picocolors$2 = __commonJS$1({ "node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports$2, module$1) {
896
- let p = process || {}, argv = p.argv || [], env$1 = p.env || {};
897
- let isColorSupported = !(!!env$1.NO_COLOR || argv.includes("--no-color")) && (!!env$1.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env$1.TERM !== "dumb" || !!env$1.CI);
898
- let formatter = (open, close, replace = open) => (input) => {
899
- let string$1 = "" + input, index = string$1.indexOf(close, open.length);
900
- return ~index ? open + replaceClose(string$1, close, replace, index) + close : open + string$1 + close;
901
- };
902
- let replaceClose = (string$1, close, replace, index) => {
903
- let result = "", cursor$2 = 0;
904
- do {
905
- result += string$1.substring(cursor$2, index) + replace;
906
- cursor$2 = index + close.length;
907
- index = string$1.indexOf(close, cursor$2);
908
- } while (~index);
909
- return result + string$1.substring(cursor$2);
910
- };
911
- let createColors = (enabled = isColorSupported) => {
912
- let f = enabled ? formatter : () => String;
913
- return {
914
- isColorSupported: enabled,
915
- reset: f("\x1B[0m", "\x1B[0m"),
916
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
917
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
918
- italic: f("\x1B[3m", "\x1B[23m"),
919
- underline: f("\x1B[4m", "\x1B[24m"),
920
- inverse: f("\x1B[7m", "\x1B[27m"),
921
- hidden: f("\x1B[8m", "\x1B[28m"),
922
- strikethrough: f("\x1B[9m", "\x1B[29m"),
923
- black: f("\x1B[30m", "\x1B[39m"),
924
- red: f("\x1B[31m", "\x1B[39m"),
925
- green: f("\x1B[32m", "\x1B[39m"),
926
- yellow: f("\x1B[33m", "\x1B[39m"),
927
- blue: f("\x1B[34m", "\x1B[39m"),
928
- magenta: f("\x1B[35m", "\x1B[39m"),
929
- cyan: f("\x1B[36m", "\x1B[39m"),
930
- white: f("\x1B[37m", "\x1B[39m"),
931
- gray: f("\x1B[90m", "\x1B[39m"),
932
- bgBlack: f("\x1B[40m", "\x1B[49m"),
933
- bgRed: f("\x1B[41m", "\x1B[49m"),
934
- bgGreen: f("\x1B[42m", "\x1B[49m"),
935
- bgYellow: f("\x1B[43m", "\x1B[49m"),
936
- bgBlue: f("\x1B[44m", "\x1B[49m"),
937
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
938
- bgCyan: f("\x1B[46m", "\x1B[49m"),
939
- bgWhite: f("\x1B[47m", "\x1B[49m"),
940
- blackBright: f("\x1B[90m", "\x1B[39m"),
941
- redBright: f("\x1B[91m", "\x1B[39m"),
942
- greenBright: f("\x1B[92m", "\x1B[39m"),
943
- yellowBright: f("\x1B[93m", "\x1B[39m"),
944
- blueBright: f("\x1B[94m", "\x1B[39m"),
945
- magentaBright: f("\x1B[95m", "\x1B[39m"),
946
- cyanBright: f("\x1B[96m", "\x1B[39m"),
947
- whiteBright: f("\x1B[97m", "\x1B[39m"),
948
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
949
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
950
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
951
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
952
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
953
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
954
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
955
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
956
- };
957
- };
958
- module$1.exports = createColors();
959
- module$1.exports.createColors = createColors;
960
- } });
961
- var require_src = __commonJS$1({ "node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports$2, module$1) {
962
- const ESC = "\x1B";
963
- const CSI = `${ESC}[`;
964
- const beep = "\x07";
965
- const cursor$1 = {
966
- to(x, y) {
967
- if (!y) return `${CSI}${x + 1}G`;
968
- return `${CSI}${y + 1};${x + 1}H`;
969
- },
970
- move(x, y) {
971
- let ret = "";
972
- if (x < 0) ret += `${CSI}${-x}D`;
973
- else if (x > 0) ret += `${CSI}${x}C`;
974
- if (y < 0) ret += `${CSI}${-y}A`;
975
- else if (y > 0) ret += `${CSI}${y}B`;
976
- return ret;
977
- },
978
- up: (count = 1) => `${CSI}${count}A`,
979
- down: (count = 1) => `${CSI}${count}B`,
980
- forward: (count = 1) => `${CSI}${count}C`,
981
- backward: (count = 1) => `${CSI}${count}D`,
982
- nextLine: (count = 1) => `${CSI}E`.repeat(count),
983
- prevLine: (count = 1) => `${CSI}F`.repeat(count),
984
- left: `${CSI}G`,
985
- hide: `${CSI}?25l`,
986
- show: `${CSI}?25h`,
987
- save: `${ESC}7`,
988
- restore: `${ESC}8`
835
+ const $u = [
836
+ "up",
837
+ "down",
838
+ "left",
839
+ "right",
840
+ "space",
841
+ "enter",
842
+ "cancel"
843
+ ], c = {
844
+ actions: new Set($u),
845
+ aliases: new Map([
846
+ ["k", "up"],
847
+ ["j", "down"],
848
+ ["h", "left"],
849
+ ["l", "right"],
850
+ ["", "cancel"],
851
+ ["escape", "cancel"]
852
+ ]),
853
+ messages: {
854
+ cancel: "Canceled",
855
+ error: "Something went wrong"
856
+ }
857
+ };
858
+ function P$1(e$1, D$1) {
859
+ if (typeof e$1 == "string") return c.aliases.get(e$1) === D$1;
860
+ for (const t of e$1) if (t !== void 0 && P$1(t, D$1)) return !0;
861
+ return !1;
862
+ }
863
+ function Su(e$1, D$1) {
864
+ if (e$1 === D$1) return;
865
+ const t = e$1.split(`
866
+ `), s = D$1.split(`
867
+ `), i = [];
868
+ for (let F$1 = 0; F$1 < Math.max(t.length, s.length); F$1++) t[F$1] !== s[F$1] && i.push(F$1);
869
+ return i;
870
+ }
871
+ const Vu = globalThis.process.platform.startsWith("win"), N$1 = Symbol("clack:cancel");
872
+ function Ou$1(e$1) {
873
+ return e$1 === N$1;
874
+ }
875
+ function $(e$1, D$1) {
876
+ const t = e$1;
877
+ t.isTTY && t.setRawMode(D$1);
878
+ }
879
+ function Mu({ input: e$1 = stdin, output: D$1 = stdout, overwrite: t = !0, hideCursor: s = !0 } = {}) {
880
+ const i = y.createInterface({
881
+ input: e$1,
882
+ output: D$1,
883
+ prompt: "",
884
+ tabSize: 1
885
+ });
886
+ y.emitKeypressEvents(e$1, i), e$1 instanceof ReadStream && e$1.isTTY && e$1.setRawMode(!0);
887
+ const F$1 = (u, { name: r, sequence: a }) => {
888
+ const n$1 = String(u);
889
+ if (P$1([
890
+ n$1,
891
+ r,
892
+ a
893
+ ], "cancel")) {
894
+ s && D$1.write(import_src$1.cursor.show), process.exit(0);
895
+ return;
896
+ }
897
+ if (!t) return;
898
+ const l = r === "return" ? 0 : -1, o$1 = r === "return" ? -1 : 0;
899
+ y.moveCursor(D$1, l, o$1, () => {
900
+ y.clearLine(D$1, 1, () => {
901
+ e$1.once("keypress", F$1);
902
+ });
903
+ });
989
904
  };
990
- const scroll = {
991
- up: (count = 1) => `${CSI}S`.repeat(count),
992
- down: (count = 1) => `${CSI}T`.repeat(count)
905
+ return s && D$1.write(import_src$1.cursor.hide), e$1.once("keypress", F$1), () => {
906
+ e$1.off("keypress", F$1), s && D$1.write(import_src$1.cursor.show), e$1 instanceof ReadStream && e$1.isTTY && !Vu && e$1.setRawMode(!1), i.terminal = !1, i.close();
993
907
  };
994
- const erase$1 = {
995
- screen: `${CSI}2J`,
996
- up: (count = 1) => `${CSI}1J`.repeat(count),
997
- down: (count = 1) => `${CSI}J`.repeat(count),
998
- line: `${CSI}2K`,
999
- lineEnd: `${CSI}K`,
1000
- lineStart: `${CSI}1K`,
1001
- lines(count) {
1002
- let clear = "";
1003
- for (let i = 0; i < count; i++) clear += this.line + (i < count - 1 ? cursor$1.up() : "");
1004
- if (count) clear += cursor$1.left;
1005
- return clear;
908
+ }
909
+ const Tu = (e$1) => e$1 instanceof WriteStream && e$1.columns ? e$1.columns : 80;
910
+ var ju = Object.defineProperty, Pu = (e$1, D$1, t) => D$1 in e$1 ? ju(e$1, D$1, {
911
+ enumerable: !0,
912
+ configurable: !0,
913
+ writable: !0,
914
+ value: t
915
+ }) : e$1[D$1] = t, E$1 = (e$1, D$1, t) => (Pu(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t);
916
+ var B = class {
917
+ constructor(D$1, t = !0) {
918
+ E$1(this, "input"), E$1(this, "output"), E$1(this, "_abortSignal"), E$1(this, "rl"), E$1(this, "opts"), E$1(this, "_render"), E$1(this, "_track", !1), E$1(this, "_prevFrame", ""), E$1(this, "_subscribers", new Map()), E$1(this, "_cursor", 0), E$1(this, "_usePlaceholderAsValue", !0), E$1(this, "state", "initial"), E$1(this, "error", ""), E$1(this, "value");
919
+ const { input: s = stdin, output: i = stdout, render: F$1, signal: u,...r } = D$1;
920
+ this.opts = r, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = F$1.bind(this), this._track = t, this._abortSignal = u, this.input = s, this.output = i;
921
+ }
922
+ unsubscribe() {
923
+ this._subscribers.clear();
924
+ }
925
+ setSubscriber(D$1, t) {
926
+ const s = this._subscribers.get(D$1) ?? [];
927
+ s.push(t), this._subscribers.set(D$1, s);
928
+ }
929
+ on(D$1, t) {
930
+ this.setSubscriber(D$1, { cb: t });
931
+ }
932
+ once(D$1, t) {
933
+ this.setSubscriber(D$1, {
934
+ cb: t,
935
+ once: !0
936
+ });
937
+ }
938
+ emit(D$1, ...t) {
939
+ const s = this._subscribers.get(D$1) ?? [], i = [];
940
+ for (const F$1 of s) F$1.cb(...t), F$1.once && i.push(() => s.splice(s.indexOf(F$1), 1));
941
+ for (const F$1 of i) F$1();
942
+ }
943
+ prompt() {
944
+ return new Promise((D$1, t) => {
945
+ if (this._abortSignal) {
946
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), D$1(N$1);
947
+ this._abortSignal.addEventListener("abort", () => {
948
+ this.state = "cancel", this.close();
949
+ }, { once: !0 });
950
+ }
951
+ this.rl = Eu.createInterface({
952
+ input: this.input,
953
+ tabSize: 2,
954
+ prompt: "",
955
+ escapeCodeTimeout: 50,
956
+ terminal: !0
957
+ }), this.rl.prompt(), this.opts.initialValue !== void 0 && (this._track && this.rl.write(this.opts.initialValue), this._setValue(this.opts.initialValue)), this.input.on("keypress", this.onKeypress), $(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
958
+ this.output.write(import_src$1.cursor.show), this.output.off("resize", this.render), $(this.input, !1), D$1(this.value);
959
+ }), this.once("cancel", () => {
960
+ this.output.write(import_src$1.cursor.show), this.output.off("resize", this.render), $(this.input, !1), D$1(N$1);
961
+ });
962
+ });
963
+ }
964
+ _isActionKey(D$1, t) {
965
+ return D$1 === " ";
966
+ }
967
+ _setValue(D$1) {
968
+ this.value = D$1, this.emit("value", this.value);
969
+ }
970
+ onKeypress(D$1, t) {
971
+ if (this._track && t.name !== "return" && (t.name && this._isActionKey(D$1, t) && this.rl?.write(null, {
972
+ ctrl: !0,
973
+ name: "h"
974
+ }), this._cursor = this.rl?.cursor ?? 0, this._setValue(this.rl?.line)), this.state === "error" && (this.state = "active"), t?.name && (!this._track && c.aliases.has(t.name) && this.emit("cursor", c.aliases.get(t.name)), c.actions.has(t.name) && this.emit("cursor", t.name)), D$1 && (D$1.toLowerCase() === "y" || D$1.toLowerCase() === "n") && this.emit("confirm", D$1.toLowerCase() === "y"), this._usePlaceholderAsValue && D$1 === " " && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this._setValue(this.opts.placeholder))), this.emit("key", D$1?.toLowerCase(), t), t?.name === "return") {
975
+ if (!this.value && this.opts.placeholder && (this.rl?.write(this.opts.placeholder), this._setValue(this.opts.placeholder)), this.opts.validate) {
976
+ const s = this.opts.validate(this.value);
977
+ s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.value));
978
+ }
979
+ this.state !== "error" && (this.state = "submit");
980
+ }
981
+ P$1([
982
+ D$1,
983
+ t?.name,
984
+ t?.sequence
985
+ ], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
986
+ }
987
+ close() {
988
+ this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
989
+ `), $(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
990
+ }
991
+ restoreCursor() {
992
+ const D$1 = tu(this._prevFrame, process.stdout.columns, { hard: !0 }).split(`
993
+ `).length - 1;
994
+ this.output.write(import_src$1.cursor.move(-999, D$1 * -1));
995
+ }
996
+ render() {
997
+ const D$1 = tu(this._render(this) ?? "", process.stdout.columns, { hard: !0 });
998
+ if (D$1 !== this._prevFrame) {
999
+ if (this.state === "initial") this.output.write(import_src$1.cursor.hide);
1000
+ else {
1001
+ const t = Su(this._prevFrame, D$1);
1002
+ if (this.restoreCursor(), t && t?.length === 1) {
1003
+ const s = t[0];
1004
+ this.output.write(import_src$1.cursor.move(0, s)), this.output.write(import_src$1.erase.lines(1));
1005
+ const i = D$1.split(`
1006
+ `);
1007
+ this.output.write(i[s]), this._prevFrame = D$1, this.output.write(import_src$1.cursor.move(0, i.length - s - 1));
1008
+ return;
1009
+ }
1010
+ if (t && t?.length > 1) {
1011
+ const s = t[0];
1012
+ this.output.write(import_src$1.cursor.move(0, s)), this.output.write(import_src$1.erase.down());
1013
+ const i = D$1.split(`
1014
+ `).slice(s);
1015
+ this.output.write(i.join(`
1016
+ `)), this._prevFrame = D$1;
1017
+ return;
1018
+ }
1019
+ this.output.write(import_src$1.erase.down());
1020
+ }
1021
+ this.output.write(D$1), this.state === "initial" && (this.state = "active"), this._prevFrame = D$1;
1022
+ }
1023
+ }
1024
+ };
1025
+ var Nu = class extends B {
1026
+ get cursor() {
1027
+ return this.value ? 0 : 1;
1028
+ }
1029
+ get _value() {
1030
+ return this.cursor === 0;
1031
+ }
1032
+ constructor(D$1) {
1033
+ super(D$1, !1), this.value = !!D$1.initialValue, this.on("value", () => {
1034
+ this.value = this._value;
1035
+ }), this.on("confirm", (t) => {
1036
+ this.output.write(import_src$1.cursor.move(0, -1)), this.value = t, this.state = "submit", this.close();
1037
+ }), this.on("cursor", () => {
1038
+ this.value = !this.value;
1039
+ });
1040
+ }
1041
+ };
1042
+ var Wu = Object.defineProperty, Lu = (e$1, D$1, t) => D$1 in e$1 ? Wu(e$1, D$1, {
1043
+ enumerable: !0,
1044
+ configurable: !0,
1045
+ writable: !0,
1046
+ value: t
1047
+ }) : e$1[D$1] = t, eu = (e$1, D$1, t) => (Lu(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t), su = (e$1, D$1, t) => {
1048
+ if (!D$1.has(e$1)) throw TypeError("Cannot " + t);
1049
+ }, W$1 = (e$1, D$1, t) => (su(e$1, D$1, "read from private field"), t ? t.call(e$1) : D$1.get(e$1)), Iu = (e$1, D$1, t) => {
1050
+ if (D$1.has(e$1)) throw TypeError("Cannot add the same private member more than once");
1051
+ D$1 instanceof WeakSet ? D$1.add(e$1) : D$1.set(e$1, t);
1052
+ }, Ru = (e$1, D$1, t, s) => (su(e$1, D$1, "write to private field"), s ? s.call(e$1, t) : D$1.set(e$1, t), t), d;
1053
+ let Ku = class extends B {
1054
+ constructor(D$1) {
1055
+ super(D$1, !1), eu(this, "options"), eu(this, "cursor", 0), Iu(this, d, void 0);
1056
+ const { options: t } = D$1;
1057
+ Ru(this, d, D$1.selectableGroups !== !1), this.options = Object.entries(t).flatMap(([s, i]) => [{
1058
+ value: s,
1059
+ group: !0,
1060
+ label: s
1061
+ }, ...i.map((F$1) => ({
1062
+ ...F$1,
1063
+ group: s
1064
+ }))]), this.value = [...D$1.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: s }) => s === D$1.cursorAt), W$1(this, d) ? 0 : 1), this.on("cursor", (s) => {
1065
+ switch (s) {
1066
+ case "left":
1067
+ case "up": {
1068
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
1069
+ const i = this.options[this.cursor]?.group === !0;
1070
+ !W$1(this, d) && i && (this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1);
1071
+ break;
1072
+ }
1073
+ case "down":
1074
+ case "right": {
1075
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
1076
+ const i = this.options[this.cursor]?.group === !0;
1077
+ !W$1(this, d) && i && (this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1);
1078
+ break;
1079
+ }
1080
+ case "space":
1081
+ this.toggleValue();
1082
+ break;
1083
+ }
1084
+ });
1085
+ }
1086
+ getGroupItems(D$1) {
1087
+ return this.options.filter((t) => t.group === D$1);
1088
+ }
1089
+ isGroupSelected(D$1) {
1090
+ return this.getGroupItems(D$1).every((t) => this.value.includes(t.value));
1091
+ }
1092
+ toggleValue() {
1093
+ const D$1 = this.options[this.cursor];
1094
+ if (D$1.group === !0) {
1095
+ const t = D$1.value, s = this.getGroupItems(t);
1096
+ this.isGroupSelected(t) ? this.value = this.value.filter((i) => s.findIndex((F$1) => F$1.value === i) === -1) : this.value = [...this.value, ...s.map((i) => i.value)], this.value = Array.from(new Set(this.value));
1097
+ } else {
1098
+ const t = this.value.includes(D$1.value);
1099
+ this.value = t ? this.value.filter((s) => s !== D$1.value) : [...this.value, D$1.value];
1006
1100
  }
1101
+ }
1102
+ };
1103
+ d = new WeakMap();
1104
+ var Gu = Object.defineProperty, zu = (e$1, D$1, t) => D$1 in e$1 ? Gu(e$1, D$1, {
1105
+ enumerable: !0,
1106
+ configurable: !0,
1107
+ writable: !0,
1108
+ value: t
1109
+ }) : e$1[D$1] = t, iu = (e$1, D$1, t) => (zu(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t);
1110
+ let Yu = class extends B {
1111
+ constructor(D$1) {
1112
+ super(D$1, !1), iu(this, "options"), iu(this, "cursor", 0), this.options = D$1.options, this.value = [...D$1.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: t }) => t === D$1.cursorAt), 0), this.on("key", (t) => {
1113
+ t === "a" && this.toggleAll();
1114
+ }), this.on("cursor", (t) => {
1115
+ switch (t) {
1116
+ case "left":
1117
+ case "up":
1118
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
1119
+ break;
1120
+ case "down":
1121
+ case "right":
1122
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
1123
+ break;
1124
+ case "space":
1125
+ this.toggleValue();
1126
+ break;
1127
+ }
1128
+ });
1129
+ }
1130
+ get _value() {
1131
+ return this.options[this.cursor].value;
1132
+ }
1133
+ toggleAll() {
1134
+ const D$1 = this.value.length === this.options.length;
1135
+ this.value = D$1 ? [] : this.options.map((t) => t.value);
1136
+ }
1137
+ toggleValue() {
1138
+ const D$1 = this.value.includes(this._value);
1139
+ this.value = D$1 ? this.value.filter((t) => t !== this._value) : [...this.value, this._value];
1140
+ }
1141
+ };
1142
+ var Zu = Object.defineProperty, qu = (e$1, D$1, t) => D$1 in e$1 ? Zu(e$1, D$1, {
1143
+ enumerable: !0,
1144
+ configurable: !0,
1145
+ writable: !0,
1146
+ value: t
1147
+ }) : e$1[D$1] = t, Hu = (e$1, D$1, t) => (qu(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t);
1148
+ let Uu = class extends B {
1149
+ constructor({ mask: D$1,...t }) {
1150
+ super(t), Hu(this, "_mask", "•"), this._mask = D$1 ?? "•";
1151
+ }
1152
+ get cursor() {
1153
+ return this._cursor;
1154
+ }
1155
+ get masked() {
1156
+ return this.value?.replaceAll(/./g, this._mask) ?? "";
1157
+ }
1158
+ get valueWithCursor() {
1159
+ if (this.state === "submit" || this.state === "cancel") return this.masked;
1160
+ const D$1 = this.value ?? "";
1161
+ if (this.cursor >= D$1.length) return `${this.masked}${import_picocolors$3$1.default.inverse(import_picocolors$3$1.default.hidden("_"))}`;
1162
+ const t = this.masked.slice(0, this.cursor), s = this.masked.slice(this.cursor);
1163
+ return `${t}${import_picocolors$3$1.default.inverse(s[0])}${s.slice(1)}`;
1164
+ }
1165
+ };
1166
+ var Ju = Object.defineProperty, Qu = (e$1, D$1, t) => D$1 in e$1 ? Ju(e$1, D$1, {
1167
+ enumerable: !0,
1168
+ configurable: !0,
1169
+ writable: !0,
1170
+ value: t
1171
+ }) : e$1[D$1] = t, Fu = (e$1, D$1, t) => (Qu(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t);
1172
+ let Xu = class extends B {
1173
+ constructor(D$1) {
1174
+ super(D$1, !1), Fu(this, "options"), Fu(this, "cursor", 0), this.options = D$1.options, this.cursor = this.options.findIndex(({ value: t }) => t === D$1.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (t) => {
1175
+ switch (t) {
1176
+ case "left":
1177
+ case "up":
1178
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
1179
+ break;
1180
+ case "down":
1181
+ case "right":
1182
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
1183
+ break;
1184
+ }
1185
+ this.changeValue();
1186
+ });
1187
+ }
1188
+ get _value() {
1189
+ return this.options[this.cursor];
1190
+ }
1191
+ changeValue() {
1192
+ this.value = this._value.value;
1193
+ }
1194
+ };
1195
+ var uD = Object.defineProperty, DD = (e$1, D$1, t) => D$1 in e$1 ? uD(e$1, D$1, {
1196
+ enumerable: !0,
1197
+ configurable: !0,
1198
+ writable: !0,
1199
+ value: t
1200
+ }) : e$1[D$1] = t, ru = (e$1, D$1, t) => (DD(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t);
1201
+ let tD = class extends B {
1202
+ constructor(D$1) {
1203
+ super(D$1, !1), ru(this, "options"), ru(this, "cursor", 0), this.options = D$1.options;
1204
+ const t = this.options.map(({ value: [s] }) => s?.toLowerCase());
1205
+ this.cursor = Math.max(t.indexOf(D$1.initialValue), 0), this.on("key", (s) => {
1206
+ if (!t.includes(s)) return;
1207
+ const i = this.options.find(({ value: [F$1] }) => F$1?.toLowerCase() === s);
1208
+ i && (this.value = i.value, this.state = "submit", this.emit("submit"));
1209
+ });
1210
+ }
1211
+ }, eD = class extends B {
1212
+ get valueWithCursor() {
1213
+ if (this.state === "submit") return this.value;
1214
+ const D$1 = this.value ?? "";
1215
+ if (this.cursor >= D$1.length) return `${this.value}\u2588`;
1216
+ const t = D$1.slice(0, this.cursor), [s, ...i] = D$1.slice(this.cursor);
1217
+ return `${t}${import_picocolors$3$1.default.inverse(s)}${i.join("")}`;
1218
+ }
1219
+ get cursor() {
1220
+ return this._cursor;
1221
+ }
1222
+ constructor(D$1) {
1223
+ super(D$1), this.on("finalize", () => {
1224
+ this.value || (this.value = D$1.defaultValue);
1225
+ });
1226
+ }
1227
+ };
1228
+ var sD = Object.defineProperty, iD = (e$1, D$1, t) => D$1 in e$1 ? sD(e$1, D$1, {
1229
+ enumerable: !0,
1230
+ configurable: !0,
1231
+ writable: !0,
1232
+ value: t
1233
+ }) : e$1[D$1] = t, g = (e$1, D$1, t) => (iD(e$1, typeof D$1 != "symbol" ? D$1 + "" : D$1, t), t), L$1 = (e$1, D$1, t) => {
1234
+ if (!D$1.has(e$1)) throw TypeError("Cannot " + t);
1235
+ }, f$1 = (e$1, D$1, t) => (L$1(e$1, D$1, "read from private field"), t ? t.call(e$1) : D$1.get(e$1)), v = (e$1, D$1, t) => {
1236
+ if (D$1.has(e$1)) throw TypeError("Cannot add the same private member more than once");
1237
+ D$1 instanceof WeakSet ? D$1.add(e$1) : D$1.set(e$1, t);
1238
+ }, b = (e$1, D$1, t, s) => (L$1(e$1, D$1, "write to private field"), s ? s.call(e$1, t) : D$1.set(e$1, t), t), Cu = (e$1, D$1, t) => (L$1(e$1, D$1, "access private method"), t), x, k$1, S, I, nu, R$1, ou;
1239
+ function FD(e$1, D$1) {
1240
+ if (e$1 === void 0 || D$1.length === 0) return 0;
1241
+ const t = D$1.findIndex((s) => s.value === e$1);
1242
+ return t !== -1 ? t : 0;
1243
+ }
1244
+ function rD(e$1, D$1) {
1245
+ return (D$1.label ?? String(D$1.value)).toLowerCase().includes(e$1.toLowerCase());
1246
+ }
1247
+ function au(e$1, D$1) {
1248
+ if (D$1) return e$1 ? D$1 : D$1[0];
1249
+ }
1250
+ var CD = class extends B {
1251
+ constructor(D$1) {
1252
+ super(D$1), v(this, I), v(this, R$1), g(this, "options"), g(this, "filteredOptions"), g(this, "multiple"), g(this, "isNavigating", !1), g(this, "selectedValues", []), g(this, "focusedValue"), v(this, x, 0), v(this, k$1, void 0), v(this, S, void 0), this.options = D$1.options, this.filteredOptions = [...this.options], this.multiple = D$1.multiple === !0, this._usePlaceholderAsValue = !1, b(this, S, D$1.filter ?? rD);
1253
+ let t;
1254
+ if (D$1.initialValue && Array.isArray(D$1.initialValue) && (this.multiple ? t = D$1.initialValue : t = D$1.initialValue.slice(0, 1)), t) {
1255
+ this.selectedValues = t;
1256
+ for (const s of t) {
1257
+ const i = this.options.findIndex((F$1) => F$1.value === s);
1258
+ i !== -1 && (this.toggleSelected(s), b(this, x, i), this.focusedValue = this.options[f$1(this, x)]?.value);
1259
+ }
1260
+ }
1261
+ this.on("finalize", () => {
1262
+ this.value || (this.value = au(this.multiple, t)), this.state === "submit" && (this.value = au(this.multiple, this.selectedValues));
1263
+ }), this.on("key", (s, i) => Cu(this, I, nu).call(this, s, i)), this.on("value", (s) => Cu(this, R$1, ou).call(this, s));
1264
+ }
1265
+ get cursor() {
1266
+ return f$1(this, x);
1267
+ }
1268
+ get valueWithCursor() {
1269
+ if (!this.value) return import_picocolors$3$1.default.inverse(import_picocolors$3$1.default.hidden("_"));
1270
+ if (this._cursor >= this.value.length) return `${this.value}\u2588`;
1271
+ const D$1 = this.value.slice(0, this._cursor), [t, ...s] = this.value.slice(this._cursor);
1272
+ return `${D$1}${import_picocolors$3$1.default.inverse(t)}${s.join("")}`;
1273
+ }
1274
+ _isActionKey(D$1, t) {
1275
+ return D$1 === " " || this.multiple && this.isNavigating && t.name === "space" && D$1 !== void 0 && D$1 !== "";
1276
+ }
1277
+ toggleSelected(D$1) {
1278
+ this.filteredOptions.length !== 0 && (this.multiple ? this.selectedValues.includes(D$1) ? this.selectedValues = this.selectedValues.filter((t) => t !== D$1) : this.selectedValues = [...this.selectedValues, D$1] : this.selectedValues = [D$1]);
1279
+ }
1280
+ };
1281
+ x = new WeakMap(), k$1 = new WeakMap(), S = new WeakMap(), I = new WeakSet(), nu = function(e$1, D$1) {
1282
+ const t = D$1.name === "up", s = D$1.name === "down";
1283
+ t || s ? (b(this, x, Math.max(0, Math.min(f$1(this, x) + (t ? -1 : 1), this.filteredOptions.length - 1))), this.focusedValue = this.filteredOptions[f$1(this, x)]?.value, this.multiple || (this.selectedValues = [this.focusedValue]), this.isNavigating = !0) : this.multiple && this.focusedValue !== void 0 && (D$1.name === "tab" || this.isNavigating && D$1.name === "space") ? this.toggleSelected(this.focusedValue) : this.isNavigating = !1;
1284
+ }, R$1 = new WeakSet(), ou = function(e$1) {
1285
+ e$1 !== f$1(this, k$1) && (b(this, k$1, e$1), e$1 ? this.filteredOptions = this.options.filter((D$1) => f$1(this, S).call(this, e$1, D$1)) : this.filteredOptions = [...this.options], b(this, x, FD(this.focusedValue, this.filteredOptions)), this.focusedValue = this.filteredOptions[f$1(this, x)]?.value);
1286
+ };
1287
+ var import_picocolors$1$1 = __toESM(require_picocolors$1(), 1);
1288
+ var import_picocolors$2$1 = __toESM(require_picocolors$1(), 1);
1289
+ var import_src = __toESM(require_src(), 1);
1290
+ function Me() {
1291
+ return process$1.platform !== "win32" ? process$1.env.TERM !== "linux" : !!process$1.env.CI || !!process$1.env.WT_SESSION || !!process$1.env.TERMINUS_SUBLIME || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1292
+ }
1293
+ const P = Me(), W = () => process.env.CI === "true", h = (t, r) => P ? t : r, re = h("◆", "*"), D = h("■", "x"), F = h("▲", "x"), M = h("◇", "o"), ie = h("┌", "T"), o = h("│", "|"), f = h("└", "—"), j = h("●", ">"), N = h("○", " "), L = h("◻", "[•]"), O = h("◼", "[+]"), k = h("◻", "[ ]"), ne = h("▪", "•"), q = h("─", "-"), oe = h("╮", "+"), ae = h("├", "+"), ue = h("╯", "+"), H = h("●", "•"), K = h("◆", "*"), U = h("▲", "!"), X = h("■", "x"), T = (t) => {
1294
+ switch (t) {
1295
+ case "initial":
1296
+ case "active": return import_picocolors$2$1.default.cyan(re);
1297
+ case "cancel": return import_picocolors$2$1.default.red(D);
1298
+ case "error": return import_picocolors$2$1.default.yellow(F);
1299
+ case "submit": return import_picocolors$2$1.default.green(M);
1300
+ }
1301
+ }, A = (t) => {
1302
+ const { cursor: r, options: s, style: i } = t, n$1 = t.output ?? process.stdout, a = n$1 instanceof WriteStream && n$1.rows !== void 0 ? n$1.rows : 10, u = import_picocolors$2$1.default.dim("..."), l = t.maxItems ?? Number.POSITIVE_INFINITY, c$1 = Math.max(a - 4, 0), $$1 = Math.min(c$1, Math.max(l, 5));
1303
+ let p$1 = 0;
1304
+ r >= p$1 + $$1 - 3 ? p$1 = Math.max(Math.min(r - $$1 + 3, s.length - $$1), 0) : r < p$1 + 2 && (p$1 = Math.max(r - 2, 0));
1305
+ const g$1 = $$1 < s.length && p$1 > 0, m$1 = $$1 < s.length && p$1 + $$1 < s.length;
1306
+ return s.slice(p$1, p$1 + $$1).map((y$1, d$1, v$1) => {
1307
+ const S$1 = d$1 === 0 && g$1, b$1 = d$1 === v$1.length - 1 && m$1;
1308
+ return S$1 || b$1 ? u : i(y$1, d$1 + p$1 === r);
1309
+ });
1310
+ };
1311
+ function ce(t) {
1312
+ return t.label ?? String(t.value ?? "");
1313
+ }
1314
+ function le(t, r) {
1315
+ if (!t) return !0;
1316
+ const s = (r.label ?? String(r.value ?? "")).toLowerCase(), i = (r.hint ?? "").toLowerCase(), n$1 = String(r.value).toLowerCase(), a = t.toLowerCase();
1317
+ return s.includes(a) || i.includes(a) || n$1.includes(a);
1318
+ }
1319
+ function Oe(t, r) {
1320
+ const s = [];
1321
+ for (const i of r) t.includes(i.value) && s.push(i);
1322
+ return s;
1323
+ }
1324
+ const Re = (t) => new CD({
1325
+ options: t.options,
1326
+ placeholder: t.placeholder,
1327
+ initialValue: t.initialValue ? [t.initialValue] : void 0,
1328
+ filter: (r, s) => le(r, s),
1329
+ input: t.input,
1330
+ output: t.output,
1331
+ render() {
1332
+ const r = `${import_picocolors$2$1.default.gray(o)}
1333
+ ${T(this.state)} ${t.message}
1334
+ `, s = String(this.value ?? "");
1335
+ switch (this.state) {
1336
+ case "submit": {
1337
+ const i = Oe(this.selectedValues, this.options), n$1 = i.length > 0 ? i.map(ce).join(", ") : "";
1338
+ return `${r}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.dim(n$1)}`;
1339
+ }
1340
+ case "cancel": return `${r}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(this.value ?? ""))}`;
1341
+ default: {
1342
+ const i = this.isNavigating ? import_picocolors$2$1.default.dim(s) : this.valueWithCursor, n$1 = this.filteredOptions.length !== this.options.length ? import_picocolors$2$1.default.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length === 1 ? "" : "es"})`) : "", a = this.filteredOptions.length === 0 ? [] : A({
1343
+ cursor: this.cursor,
1344
+ options: this.filteredOptions,
1345
+ style: (c$1, $$1) => {
1346
+ const p$1 = ce(c$1), g$1 = c$1.hint && c$1.value === this.focusedValue ? import_picocolors$2$1.default.dim(` (${c$1.hint})`) : "";
1347
+ return $$1 ? `${import_picocolors$2$1.default.green(j)} ${p$1}${g$1}` : `${import_picocolors$2$1.default.dim(N)} ${import_picocolors$2$1.default.dim(p$1)}${g$1}`;
1348
+ },
1349
+ maxItems: t.maxItems,
1350
+ output: t.output
1351
+ }), u = [
1352
+ `${import_picocolors$2$1.default.dim("↑/↓")} to select`,
1353
+ `${import_picocolors$2$1.default.dim("Enter:")} confirm`,
1354
+ `${import_picocolors$2$1.default.dim("Type:")} to search`
1355
+ ], l = this.filteredOptions.length === 0 && s ? [`${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.yellow("No matches found")}`] : [];
1356
+ return [
1357
+ r,
1358
+ `${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.dim("Search:")} ${i}${n$1}`,
1359
+ ...l,
1360
+ ...a.map((c$1) => `${import_picocolors$2$1.default.cyan(o)} ${c$1}`),
1361
+ `${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.dim(u.join(" • "))}`,
1362
+ `${import_picocolors$2$1.default.cyan(f)}`
1363
+ ].join(`
1364
+ `);
1365
+ }
1366
+ }
1367
+ }
1368
+ }).prompt(), xe = (t) => {
1369
+ const r = (s, i, n$1, a) => {
1370
+ const u = n$1.includes(s.value), l = s.label ?? String(s.value ?? ""), c$1 = s.hint && a !== void 0 && s.value === a ? import_picocolors$2$1.default.dim(` (${s.hint})`) : "", $$1 = u ? import_picocolors$2$1.default.green(O) : import_picocolors$2$1.default.dim(k);
1371
+ return i ? `${$$1} ${l}${c$1}` : `${$$1} ${import_picocolors$2$1.default.dim(l)}`;
1007
1372
  };
1008
- module$1.exports = {
1009
- cursor: cursor$1,
1010
- scroll,
1011
- erase: erase$1,
1012
- beep
1373
+ return new CD({
1374
+ options: t.options,
1375
+ multiple: !0,
1376
+ filter: (s, i) => le(s, i),
1377
+ placeholder: t.placeholder,
1378
+ initialValue: t.initialValues,
1379
+ input: t.input,
1380
+ output: t.output,
1381
+ render() {
1382
+ const s = `${import_picocolors$2$1.default.gray(o)}
1383
+ ${T(this.state)} ${t.message}
1384
+ `;
1385
+ this.selectedValues.length > 0 && import_picocolors$2$1.default.cyan(` (${this.selectedValues.length} selected)`);
1386
+ const i = String(this.value ?? ""), n$1 = this.isNavigating ? import_picocolors$2$1.default.dim(i) : this.valueWithCursor, a = this.filteredOptions.length !== t.options.length ? import_picocolors$2$1.default.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length === 1 ? "" : "es"})`) : "";
1387
+ switch (this.state) {
1388
+ case "submit": return `${s}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.dim(`${this.selectedValues.length} items selected`)}`;
1389
+ case "cancel": return `${s}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(i))}`;
1390
+ default: {
1391
+ const u = [
1392
+ `${import_picocolors$2$1.default.dim("↑/↓")} to navigate`,
1393
+ `${import_picocolors$2$1.default.dim("Space:")} select`,
1394
+ `${import_picocolors$2$1.default.dim("Enter:")} confirm`,
1395
+ `${import_picocolors$2$1.default.dim("Type:")} to search`
1396
+ ], l = this.filteredOptions.length === 0 && i ? [`${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.yellow("No matches found")}`] : [], c$1 = A({
1397
+ cursor: this.cursor,
1398
+ options: this.filteredOptions,
1399
+ style: ($$1, p$1) => r($$1, p$1, this.selectedValues, this.focusedValue),
1400
+ maxItems: t.maxItems,
1401
+ output: t.output
1402
+ });
1403
+ return [
1404
+ s,
1405
+ `${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.dim("Search:")} ${n$1}${a}`,
1406
+ ...l,
1407
+ ...c$1.map(($$1) => `${import_picocolors$2$1.default.cyan(o)} ${$$1}`),
1408
+ `${import_picocolors$2$1.default.cyan(o)} ${import_picocolors$2$1.default.dim(u.join(" • "))}`,
1409
+ `${import_picocolors$2$1.default.cyan(f)}`
1410
+ ].join(`
1411
+ `);
1412
+ }
1413
+ }
1414
+ }
1415
+ }).prompt();
1416
+ }, Ve$1 = (t) => {
1417
+ const r = t.active ?? "Yes", s = t.inactive ?? "No";
1418
+ return new Nu({
1419
+ active: r,
1420
+ inactive: s,
1421
+ input: t.input,
1422
+ output: t.output,
1423
+ initialValue: t.initialValue ?? !0,
1424
+ render() {
1425
+ const i = `${import_picocolors$2$1.default.gray(o)}
1426
+ ${T(this.state)} ${t.message}
1427
+ `, n$1 = this.value ? r : s;
1428
+ switch (this.state) {
1429
+ case "submit": return `${i}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.dim(n$1)}`;
1430
+ case "cancel": return `${i}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(n$1))}
1431
+ ${import_picocolors$2$1.default.gray(o)}`;
1432
+ default: return `${i}${import_picocolors$2$1.default.cyan(o)} ${this.value ? `${import_picocolors$2$1.default.green(j)} ${r}` : `${import_picocolors$2$1.default.dim(N)} ${import_picocolors$2$1.default.dim(r)}`} ${import_picocolors$2$1.default.dim("/")} ${this.value ? `${import_picocolors$2$1.default.dim(N)} ${import_picocolors$2$1.default.dim(s)}` : `${import_picocolors$2$1.default.green(j)} ${s}`}
1433
+ ${import_picocolors$2$1.default.cyan(f)}
1434
+ `;
1435
+ }
1436
+ }
1437
+ }).prompt();
1438
+ }, Ae = (t) => {
1439
+ const { selectableGroups: r = !0, groupSpacing: s = 0 } = t, i = (n$1, a, u = []) => {
1440
+ const l = n$1.label ?? String(n$1.value), c$1 = typeof n$1.group == "string", $$1 = c$1 && (u[u.indexOf(n$1) + 1] ?? { group: !0 }), p$1 = c$1 && $$1.group === !0, g$1 = c$1 ? r ? `${p$1 ? f : o} ` : " " : "", m$1 = s > 0 && !c$1 ? `
1441
+ ${import_picocolors$2$1.default.cyan(o)} `.repeat(s) : "";
1442
+ if (a === "active") return `${m$1}${import_picocolors$2$1.default.dim(g$1)}${import_picocolors$2$1.default.cyan(L)} ${l} ${n$1.hint ? import_picocolors$2$1.default.dim(`(${n$1.hint})`) : ""}`;
1443
+ if (a === "group-active") return `${m$1}${g$1}${import_picocolors$2$1.default.cyan(L)} ${import_picocolors$2$1.default.dim(l)}`;
1444
+ if (a === "group-active-selected") return `${m$1}${g$1}${import_picocolors$2$1.default.green(O)} ${import_picocolors$2$1.default.dim(l)}`;
1445
+ if (a === "selected") {
1446
+ const d$1 = c$1 || r ? import_picocolors$2$1.default.green(O) : "";
1447
+ return `${m$1}${import_picocolors$2$1.default.dim(g$1)}${d$1} ${import_picocolors$2$1.default.dim(l)} ${n$1.hint ? import_picocolors$2$1.default.dim(`(${n$1.hint})`) : ""}`;
1448
+ }
1449
+ if (a === "cancelled") return `${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(l))}`;
1450
+ if (a === "active-selected") return `${m$1}${import_picocolors$2$1.default.dim(g$1)}${import_picocolors$2$1.default.green(O)} ${l} ${n$1.hint ? import_picocolors$2$1.default.dim(`(${n$1.hint})`) : ""}`;
1451
+ if (a === "submitted") return `${import_picocolors$2$1.default.dim(l)}`;
1452
+ const y$1 = c$1 || r ? import_picocolors$2$1.default.dim(k) : "";
1453
+ return `${m$1}${import_picocolors$2$1.default.dim(g$1)}${y$1} ${import_picocolors$2$1.default.dim(l)}`;
1013
1454
  };
1014
- } });
1015
- var import_picocolors$3$1 = __toESM$1$1(require_picocolors$2(), 1);
1016
- var import_src = __toESM$1$1(require_src(), 1);
1017
- const unicode = isUnicodeSupported();
1018
- const s = (c, fallback) => unicode ? c : fallback;
1019
- const S_STEP_ACTIVE = s("◆", "*");
1020
- const S_STEP_CANCEL = s("■", "x");
1021
- const S_STEP_ERROR = s("▲", "x");
1022
- const S_STEP_SUBMIT = s("◇", "o");
1023
- const S_BAR_START = s("┌", "T");
1024
- const S_BAR = s("│", "|");
1025
- const S_BAR_END = s("└", "—");
1026
- const S_RADIO_ACTIVE = s("●", ">");
1027
- const S_RADIO_INACTIVE = s("○", " ");
1028
- const S_CHECKBOX_ACTIVE = s("◻", "[•]");
1029
- const S_CHECKBOX_SELECTED = s("◼", "[+]");
1030
- const S_CHECKBOX_INACTIVE = s("◻", "[ ]");
1031
- const S_PASSWORD_MASK = s("", "•");
1032
- const S_BAR_H = s("", "-");
1033
- const S_CORNER_TOP_RIGHT = s("", "+");
1034
- const S_CONNECT_LEFT = s("├", "+");
1035
- const S_CORNER_BOTTOM_RIGHT = s("", "+");
1036
- const S_INFO = s("●", "•");
1037
- const S_SUCCESS = s("", "*");
1038
- const S_WARN = s("▲", "!");
1039
- const S_ERROR = s("■", "x");
1040
- const log$1 = {
1041
- message: (message = "", { symbol: symbol$1 = import_picocolors$3$1.default.gray(S_BAR) } = {}) => {
1042
- const parts = [import_picocolors$3$1.default.gray(S_BAR)];
1043
- if (message) {
1044
- const [firstLine, ...lines] = message.split("\n");
1045
- parts.push(`${symbol$1} ${firstLine}`, ...lines.map((ln) => `${import_picocolors$3$1.default.gray(S_BAR)} ${ln}`));
1046
- }
1047
- process$1.stdout.write(`${parts.join("\n")}\n`);
1455
+ return new Ku({
1456
+ options: t.options,
1457
+ input: t.input,
1458
+ output: t.output,
1459
+ initialValues: t.initialValues,
1460
+ required: t.required ?? !0,
1461
+ cursorAt: t.cursorAt,
1462
+ selectableGroups: r,
1463
+ validate(n$1) {
1464
+ if (this.required && n$1.length === 0) return `Please select at least one option.
1465
+ ${import_picocolors$2$1.default.reset(import_picocolors$2$1.default.dim(`Press ${import_picocolors$2$1.default.gray(import_picocolors$2$1.default.bgWhite(import_picocolors$2$1.default.inverse(" space ")))} to select, ${import_picocolors$2$1.default.gray(import_picocolors$2$1.default.bgWhite(import_picocolors$2$1.default.inverse(" enter ")))} to submit`))}`;
1466
+ },
1467
+ render() {
1468
+ const n$1 = `${import_picocolors$2$1.default.gray(o)}
1469
+ ${T(this.state)} ${t.message}
1470
+ `;
1471
+ switch (this.state) {
1472
+ case "submit": return `${n$1}${import_picocolors$2$1.default.gray(o)} ${this.options.filter(({ value: a }) => this.value.includes(a)).map((a) => i(a, "submitted")).join(import_picocolors$2$1.default.dim(", "))}`;
1473
+ case "cancel": {
1474
+ const a = this.options.filter(({ value: u }) => this.value.includes(u)).map((u) => i(u, "cancelled")).join(import_picocolors$2$1.default.dim(", "));
1475
+ return `${n$1}${import_picocolors$2$1.default.gray(o)} ${a.trim() ? `${a}
1476
+ ${import_picocolors$2$1.default.gray(o)}` : ""}`;
1477
+ }
1478
+ case "error": {
1479
+ const a = this.error.split(`
1480
+ `).map((u, l) => l === 0 ? `${import_picocolors$2$1.default.yellow(f)} ${import_picocolors$2$1.default.yellow(u)}` : ` ${u}`).join(`
1481
+ `);
1482
+ return `${n$1}${import_picocolors$2$1.default.yellow(o)} ${this.options.map((u, l, c$1) => {
1483
+ const $$1 = this.value.includes(u.value) || u.group === !0 && this.isGroupSelected(`${u.value}`), p$1 = l === this.cursor;
1484
+ return !p$1 && typeof u.group == "string" && this.options[this.cursor].value === u.group ? i(u, $$1 ? "group-active-selected" : "group-active", c$1) : p$1 && $$1 ? i(u, "active-selected", c$1) : $$1 ? i(u, "selected", c$1) : i(u, p$1 ? "active" : "inactive", c$1);
1485
+ }).join(`
1486
+ ${import_picocolors$2$1.default.yellow(o)} `)}
1487
+ ${a}
1488
+ `;
1489
+ }
1490
+ default: return `${n$1}${import_picocolors$2$1.default.cyan(o)} ${this.options.map((a, u, l) => {
1491
+ const c$1 = this.value.includes(a.value) || a.group === !0 && this.isGroupSelected(`${a.value}`), $$1 = u === this.cursor;
1492
+ return !$$1 && typeof a.group == "string" && this.options[this.cursor].value === a.group ? i(a, c$1 ? "group-active-selected" : "group-active", l) : $$1 && c$1 ? i(a, "active-selected", l) : c$1 ? i(a, "selected", l) : i(a, $$1 ? "active" : "inactive", l);
1493
+ }).join(`
1494
+ ${import_picocolors$2$1.default.cyan(o)} `)}
1495
+ ${import_picocolors$2$1.default.cyan(f)}
1496
+ `;
1497
+ }
1498
+ }
1499
+ }).prompt();
1500
+ }, je$1 = async (t, r) => {
1501
+ const s = {}, i = Object.keys(t);
1502
+ for (const n$1 of i) {
1503
+ const a = t[n$1], u = await a({ results: s })?.catch((l) => {
1504
+ throw l;
1505
+ });
1506
+ if (typeof r?.onCancel == "function" && Ou$1(u)) {
1507
+ s[n$1] = "canceled", r.onCancel({ results: s });
1508
+ continue;
1509
+ }
1510
+ s[n$1] = u;
1511
+ }
1512
+ return s;
1513
+ }, E$2 = {
1514
+ message: (t = [], { symbol: r = import_picocolors$2$1.default.gray(o), secondarySymbol: s = import_picocolors$2$1.default.gray(o), output: i = process.stdout, spacing: n$1 = 1 } = {}) => {
1515
+ const a = [];
1516
+ for (let l = 0; l < n$1; l++) a.push(`${s}`);
1517
+ const u = Array.isArray(t) ? t : t.split(`
1518
+ `);
1519
+ if (u.length > 0) {
1520
+ const [l, ...c$1] = u;
1521
+ l.length > 0 ? a.push(`${r} ${l}`) : a.push(r);
1522
+ for (const $$1 of c$1) $$1.length > 0 ? a.push(`${s} ${$$1}`) : a.push(s);
1523
+ }
1524
+ i.write(`${a.join(`
1525
+ `)}
1526
+ `);
1048
1527
  },
1049
- info: (message) => {
1050
- log$1.message(message, { symbol: import_picocolors$3$1.default.blue(S_INFO) });
1528
+ info: (t, r) => {
1529
+ E$2.message(t, {
1530
+ ...r,
1531
+ symbol: import_picocolors$2$1.default.blue(H)
1532
+ });
1051
1533
  },
1052
- success: (message) => {
1053
- log$1.message(message, { symbol: import_picocolors$3$1.default.green(S_SUCCESS) });
1534
+ success: (t, r) => {
1535
+ E$2.message(t, {
1536
+ ...r,
1537
+ symbol: import_picocolors$2$1.default.green(K)
1538
+ });
1054
1539
  },
1055
- step: (message) => {
1056
- log$1.message(message, { symbol: import_picocolors$3$1.default.green(S_STEP_SUBMIT) });
1540
+ step: (t, r) => {
1541
+ E$2.message(t, {
1542
+ ...r,
1543
+ symbol: import_picocolors$2$1.default.green(M)
1544
+ });
1057
1545
  },
1058
- warn: (message) => {
1059
- log$1.message(message, { symbol: import_picocolors$3$1.default.yellow(S_WARN) });
1546
+ warn: (t, r) => {
1547
+ E$2.message(t, {
1548
+ ...r,
1549
+ symbol: import_picocolors$2$1.default.yellow(U)
1550
+ });
1060
1551
  },
1061
- warning: (message) => {
1062
- log$1.warn(message);
1552
+ warning: (t, r) => {
1553
+ E$2.warn(t, r);
1063
1554
  },
1064
- error: (message) => {
1065
- log$1.message(message, { symbol: import_picocolors$3$1.default.red(S_ERROR) });
1555
+ error: (t, r) => {
1556
+ E$2.message(t, {
1557
+ ...r,
1558
+ symbol: import_picocolors$2$1.default.red(X)
1559
+ });
1066
1560
  }
1561
+ }, Ne$1 = (t = "", r) => {
1562
+ (r?.output ?? process.stdout).write(`${import_picocolors$2$1.default.gray(f)} ${import_picocolors$2$1.default.red(t)}
1563
+
1564
+ `);
1565
+ }, Pe$1 = (t = "", r) => {
1566
+ (r?.output ?? process.stdout).write(`${import_picocolors$2$1.default.gray(ie)} ${t}
1567
+ `);
1568
+ }, Le$1 = (t = "", r) => {
1569
+ (r?.output ?? process.stdout).write(`${import_picocolors$2$1.default.gray(o)}
1570
+ ${import_picocolors$2$1.default.gray(f)} ${t}
1571
+
1572
+ `);
1573
+ }, ke$1 = (t) => {
1574
+ const r = (s, i) => {
1575
+ const n$1 = s.label ?? String(s.value);
1576
+ return i === "active" ? `${import_picocolors$2$1.default.cyan(L)} ${n$1} ${s.hint ? import_picocolors$2$1.default.dim(`(${s.hint})`) : ""}` : i === "selected" ? `${import_picocolors$2$1.default.green(O)} ${import_picocolors$2$1.default.dim(n$1)} ${s.hint ? import_picocolors$2$1.default.dim(`(${s.hint})`) : ""}` : i === "cancelled" ? `${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(n$1))}` : i === "active-selected" ? `${import_picocolors$2$1.default.green(O)} ${n$1} ${s.hint ? import_picocolors$2$1.default.dim(`(${s.hint})`) : ""}` : i === "submitted" ? `${import_picocolors$2$1.default.dim(n$1)}` : `${import_picocolors$2$1.default.dim(k)} ${import_picocolors$2$1.default.dim(n$1)}`;
1577
+ };
1578
+ return new Yu({
1579
+ options: t.options,
1580
+ input: t.input,
1581
+ output: t.output,
1582
+ initialValues: t.initialValues,
1583
+ required: t.required ?? !0,
1584
+ cursorAt: t.cursorAt,
1585
+ validate(s) {
1586
+ if (this.required && s.length === 0) return `Please select at least one option.
1587
+ ${import_picocolors$2$1.default.reset(import_picocolors$2$1.default.dim(`Press ${import_picocolors$2$1.default.gray(import_picocolors$2$1.default.bgWhite(import_picocolors$2$1.default.inverse(" space ")))} to select, ${import_picocolors$2$1.default.gray(import_picocolors$2$1.default.bgWhite(import_picocolors$2$1.default.inverse(" enter ")))} to submit`))}`;
1588
+ },
1589
+ render() {
1590
+ const s = `${import_picocolors$2$1.default.gray(o)}
1591
+ ${T(this.state)} ${t.message}
1592
+ `, i = (n$1, a) => {
1593
+ const u = this.value.includes(n$1.value);
1594
+ return a && u ? r(n$1, "active-selected") : u ? r(n$1, "selected") : r(n$1, a ? "active" : "inactive");
1595
+ };
1596
+ switch (this.state) {
1597
+ case "submit": return `${s}${import_picocolors$2$1.default.gray(o)} ${this.options.filter(({ value: n$1 }) => this.value.includes(n$1)).map((n$1) => r(n$1, "submitted")).join(import_picocolors$2$1.default.dim(", ")) || import_picocolors$2$1.default.dim("none")}`;
1598
+ case "cancel": {
1599
+ const n$1 = this.options.filter(({ value: a }) => this.value.includes(a)).map((a) => r(a, "cancelled")).join(import_picocolors$2$1.default.dim(", "));
1600
+ return `${s}${import_picocolors$2$1.default.gray(o)} ${n$1.trim() ? `${n$1}
1601
+ ${import_picocolors$2$1.default.gray(o)}` : ""}`;
1602
+ }
1603
+ case "error": {
1604
+ const n$1 = this.error.split(`
1605
+ `).map((a, u) => u === 0 ? `${import_picocolors$2$1.default.yellow(f)} ${import_picocolors$2$1.default.yellow(a)}` : ` ${a}`).join(`
1606
+ `);
1607
+ return `${s + import_picocolors$2$1.default.yellow(o)} ${A({
1608
+ output: t.output,
1609
+ options: this.options,
1610
+ cursor: this.cursor,
1611
+ maxItems: t.maxItems,
1612
+ style: i
1613
+ }).join(`
1614
+ ${import_picocolors$2$1.default.yellow(o)} `)}
1615
+ ${n$1}
1616
+ `;
1617
+ }
1618
+ default: return `${s}${import_picocolors$2$1.default.cyan(o)} ${A({
1619
+ output: t.output,
1620
+ options: this.options,
1621
+ cursor: this.cursor,
1622
+ maxItems: t.maxItems,
1623
+ style: i
1624
+ }).join(`
1625
+ ${import_picocolors$2$1.default.cyan(o)} `)}
1626
+ ${import_picocolors$2$1.default.cyan(f)}
1627
+ `;
1628
+ }
1629
+ }
1630
+ }).prompt();
1631
+ }, Be = (t) => import_picocolors$2$1.default.dim(t), Ge$1 = (t = "", r = "", s) => {
1632
+ const i = s?.format ?? Be, n$1 = [
1633
+ "",
1634
+ ...t.split(`
1635
+ `).map(i),
1636
+ ""
1637
+ ], a = stripVTControlCharacters(r).length, u = s?.output ?? process.stdout, l = Math.max(n$1.reduce(($$1, p$1) => {
1638
+ const g$1 = stripVTControlCharacters(p$1);
1639
+ return g$1.length > $$1 ? g$1.length : $$1;
1640
+ }, 0), a) + 2, c$1 = n$1.map(($$1) => `${import_picocolors$2$1.default.gray(o)} ${$$1}${" ".repeat(l - stripVTControlCharacters($$1).length)}${import_picocolors$2$1.default.gray(o)}`).join(`
1641
+ `);
1642
+ u.write(`${import_picocolors$2$1.default.gray(o)}
1643
+ ${import_picocolors$2$1.default.green(M)} ${import_picocolors$2$1.default.reset(r)} ${import_picocolors$2$1.default.gray(q.repeat(Math.max(l - a - 1, 1)) + oe)}
1644
+ ${c$1}
1645
+ ${import_picocolors$2$1.default.gray(ae + q.repeat(l + 2) + ue)}
1646
+ `);
1647
+ }, We = (t) => new Uu({
1648
+ validate: t.validate,
1649
+ mask: t.mask ?? ne,
1650
+ input: t.input,
1651
+ output: t.output,
1652
+ render() {
1653
+ const r = `${import_picocolors$2$1.default.gray(o)}
1654
+ ${T(this.state)} ${t.message}
1655
+ `, s = this.valueWithCursor, i = this.masked;
1656
+ switch (this.state) {
1657
+ case "error": return `${r.trim()}
1658
+ ${import_picocolors$2$1.default.yellow(o)} ${i}
1659
+ ${import_picocolors$2$1.default.yellow(f)} ${import_picocolors$2$1.default.yellow(this.error)}
1660
+ `;
1661
+ case "submit": return `${r}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.dim(i)}`;
1662
+ case "cancel": return `${r}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(i ?? ""))}${i ? `
1663
+ ${import_picocolors$2$1.default.gray(o)}` : ""}`;
1664
+ default: return `${r}${import_picocolors$2$1.default.cyan(o)} ${s}
1665
+ ${import_picocolors$2$1.default.cyan(f)}
1666
+ `;
1667
+ }
1668
+ }
1669
+ }).prompt(), J$2 = ({ indicator: t = "dots", onCancel: r, output: s = process.stdout, cancelMessage: i, errorMessage: n$1, frames: a = P ? [
1670
+ "◒",
1671
+ "◐",
1672
+ "◓",
1673
+ "◑"
1674
+ ] : [
1675
+ "•",
1676
+ "o",
1677
+ "O",
1678
+ "0"
1679
+ ], delay: u = P ? 80 : 120 } = {}) => {
1680
+ const l = W();
1681
+ let c$1, $$1, p$1 = !1, g$1 = !1, m$1 = "", y$1, d$1 = performance.now();
1682
+ const v$1 = (w) => {
1683
+ const C$1 = w > 1 ? n$1 ?? c.messages.error : i ?? c.messages.cancel;
1684
+ g$1 = w === 1, p$1 && (Z$1(C$1, w), g$1 && typeof r == "function" && r());
1685
+ }, S$1 = () => v$1(2), b$1 = () => v$1(1), B$1 = () => {
1686
+ process.on("uncaughtExceptionMonitor", S$1), process.on("unhandledRejection", S$1), process.on("SIGINT", b$1), process.on("SIGTERM", b$1), process.on("exit", v$1);
1687
+ }, me = () => {
1688
+ process.removeListener("uncaughtExceptionMonitor", S$1), process.removeListener("unhandledRejection", S$1), process.removeListener("SIGINT", b$1), process.removeListener("SIGTERM", b$1), process.removeListener("exit", v$1);
1689
+ }, Y$1 = () => {
1690
+ if (y$1 === void 0) return;
1691
+ l && s.write(`
1692
+ `);
1693
+ const w = y$1.split(`
1694
+ `);
1695
+ s.write(import_src.cursor.move(-999, w.length - 1)), s.write(import_src.erase.down(w.length));
1696
+ }, z = (w) => w.replace(/\.+$/, ""), Q$1 = (w) => {
1697
+ const C$1 = (performance.now() - w) / 1e3, I$1 = Math.floor(C$1 / 60), x$1 = Math.floor(C$1 % 60);
1698
+ return I$1 > 0 ? `[${I$1}m ${x$1}s]` : `[${x$1}s]`;
1699
+ }, de = (w = "") => {
1700
+ p$1 = !0, c$1 = Mu({ output: s }), m$1 = z(w), d$1 = performance.now(), s.write(`${import_picocolors$2$1.default.gray(o)}
1701
+ `);
1702
+ let C$1 = 0, I$1 = 0;
1703
+ B$1(), $$1 = setInterval(() => {
1704
+ if (l && m$1 === y$1) return;
1705
+ Y$1(), y$1 = m$1;
1706
+ const x$1 = import_picocolors$2$1.default.magenta(a[C$1]);
1707
+ if (l) s.write(`${x$1} ${m$1}...`);
1708
+ else if (t === "timer") s.write(`${x$1} ${m$1} ${Q$1(d$1)}`);
1709
+ else {
1710
+ const he = ".".repeat(Math.floor(I$1)).slice(0, 3);
1711
+ s.write(`${x$1} ${m$1}${he}`);
1712
+ }
1713
+ C$1 = C$1 + 1 < a.length ? C$1 + 1 : 0, I$1 = I$1 < 4 ? I$1 + .125 : 0;
1714
+ }, u);
1715
+ }, Z$1 = (w = "", C$1 = 0) => {
1716
+ p$1 = !1, clearInterval($$1), Y$1();
1717
+ const I$1 = C$1 === 0 ? import_picocolors$2$1.default.green(M) : C$1 === 1 ? import_picocolors$2$1.default.red(D) : import_picocolors$2$1.default.red(F);
1718
+ m$1 = w ?? m$1, t === "timer" ? s.write(`${I$1} ${m$1} ${Q$1(d$1)}
1719
+ `) : s.write(`${I$1} ${m$1}
1720
+ `), me(), c$1();
1721
+ };
1722
+ return {
1723
+ start: de,
1724
+ stop: Z$1,
1725
+ message: (w = "") => {
1726
+ m$1 = z(w ?? m$1);
1727
+ },
1728
+ get isCancelled() {
1729
+ return g$1;
1730
+ }
1731
+ };
1732
+ }, $e = {
1733
+ light: h("─", "-"),
1734
+ heavy: h("━", "="),
1735
+ block: h("█", "#")
1067
1736
  };
1737
+ const Fe = (t) => {
1738
+ const r = (s, i = "inactive") => {
1739
+ const n$1 = s.label ?? String(s.value);
1740
+ return i === "selected" ? `${import_picocolors$2$1.default.dim(n$1)}` : i === "cancelled" ? `${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(n$1))}` : i === "active" ? `${import_picocolors$2$1.default.bgCyan(import_picocolors$2$1.default.gray(` ${s.value} `))} ${n$1} ${s.hint ? import_picocolors$2$1.default.dim(`(${s.hint})`) : ""}` : `${import_picocolors$2$1.default.gray(import_picocolors$2$1.default.bgWhite(import_picocolors$2$1.default.inverse(` ${s.value} `)))} ${n$1} ${s.hint ? import_picocolors$2$1.default.dim(`(${s.hint})`) : ""}`;
1741
+ };
1742
+ return new tD({
1743
+ options: t.options,
1744
+ input: t.input,
1745
+ output: t.output,
1746
+ initialValue: t.initialValue,
1747
+ render() {
1748
+ const s = `${import_picocolors$2$1.default.gray(o)}
1749
+ ${T(this.state)} ${t.message}
1750
+ `;
1751
+ switch (this.state) {
1752
+ case "submit": return `${s}${import_picocolors$2$1.default.gray(o)} ${r(this.options.find((i) => i.value === this.value) ?? t.options[0], "selected")}`;
1753
+ case "cancel": return `${s}${import_picocolors$2$1.default.gray(o)} ${r(this.options[0], "cancelled")}
1754
+ ${import_picocolors$2$1.default.gray(o)}`;
1755
+ default: return `${s}${import_picocolors$2$1.default.cyan(o)} ${this.options.map((i, n$1) => r(i, n$1 === this.cursor ? "active" : "inactive")).join(`
1756
+ ${import_picocolors$2$1.default.cyan(o)} `)}
1757
+ ${import_picocolors$2$1.default.cyan(f)}
1758
+ `;
1759
+ }
1760
+ }
1761
+ }).prompt();
1762
+ }, qe$1 = (t) => {
1763
+ const r = (s, i) => {
1764
+ const n$1 = s.label ?? String(s.value);
1765
+ switch (i) {
1766
+ case "selected": return `${import_picocolors$2$1.default.dim(n$1)}`;
1767
+ case "active": return `${import_picocolors$2$1.default.green(j)} ${n$1} ${s.hint ? import_picocolors$2$1.default.dim(`(${s.hint})`) : ""}`;
1768
+ case "cancelled": return `${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(n$1))}`;
1769
+ default: return `${import_picocolors$2$1.default.dim(N)} ${import_picocolors$2$1.default.dim(n$1)}`;
1770
+ }
1771
+ };
1772
+ return new Xu({
1773
+ options: t.options,
1774
+ input: t.input,
1775
+ output: t.output,
1776
+ initialValue: t.initialValue,
1777
+ render() {
1778
+ const s = `${import_picocolors$2$1.default.gray(o)}
1779
+ ${T(this.state)} ${t.message}
1780
+ `;
1781
+ switch (this.state) {
1782
+ case "submit": return `${s}${import_picocolors$2$1.default.gray(o)} ${r(this.options[this.cursor], "selected")}`;
1783
+ case "cancel": return `${s}${import_picocolors$2$1.default.gray(o)} ${r(this.options[this.cursor], "cancelled")}
1784
+ ${import_picocolors$2$1.default.gray(o)}`;
1785
+ default: return `${s}${import_picocolors$2$1.default.cyan(o)} ${A({
1786
+ output: t.output,
1787
+ cursor: this.cursor,
1788
+ options: this.options,
1789
+ maxItems: t.maxItems,
1790
+ style: (i, n$1) => r(i, n$1 ? "active" : "inactive")
1791
+ }).join(`
1792
+ ${import_picocolors$2$1.default.cyan(o)} `)}
1793
+ ${import_picocolors$2$1.default.cyan(f)}
1794
+ `;
1795
+ }
1796
+ }
1797
+ }).prompt();
1798
+ }, pe = `${import_picocolors$2$1.default.gray(o)} `, R = {
1799
+ message: async (t, { symbol: r = import_picocolors$2$1.default.gray(o) } = {}) => {
1800
+ process.stdout.write(`${import_picocolors$2$1.default.gray(o)}
1801
+ ${r} `);
1802
+ let s = 3;
1803
+ for await (let i of t) {
1804
+ i = i.replace(/\n/g, `
1805
+ ${pe}`), i.includes(`
1806
+ `) && (s = 3 + stripVTControlCharacters(i.slice(i.lastIndexOf(`
1807
+ `))).length);
1808
+ const n$1 = stripVTControlCharacters(i).length;
1809
+ s + n$1 < process.stdout.columns ? (s += n$1, process.stdout.write(i)) : (process.stdout.write(`
1810
+ ${pe}${i.trimStart()}`), s = 3 + stripVTControlCharacters(i.trimStart()).length);
1811
+ }
1812
+ process.stdout.write(`
1813
+ `);
1814
+ },
1815
+ info: (t) => R.message(t, { symbol: import_picocolors$2$1.default.blue(H) }),
1816
+ success: (t) => R.message(t, { symbol: import_picocolors$2$1.default.green(K) }),
1817
+ step: (t) => R.message(t, { symbol: import_picocolors$2$1.default.green(M) }),
1818
+ warn: (t) => R.message(t, { symbol: import_picocolors$2$1.default.yellow(U) }),
1819
+ warning: (t) => R.warn(t),
1820
+ error: (t) => R.message(t, { symbol: import_picocolors$2$1.default.red(X) })
1821
+ }, He = async (t, r) => {
1822
+ for (const s of t) {
1823
+ if (s.enabled === !1) continue;
1824
+ const i = J$2(r);
1825
+ i.start(s.title);
1826
+ const n$1 = await s.task(i.message);
1827
+ i.stop(n$1 || s.title);
1828
+ }
1829
+ }, Ke = (t) => {
1830
+ const r = t.output ?? process.stdout, s = Tu(r), i = import_picocolors$1$1.gray(o), n$1 = t.spacing ?? 1, a = 3, u = t.retainLog === !0, l = W();
1831
+ r.write(`${i}
1832
+ `), r.write(`${import_picocolors$1$1.green(M)} ${t.title}
1833
+ `);
1834
+ for (let d$1 = 0; d$1 < n$1; d$1++) r.write(`${i}
1835
+ `);
1836
+ let c$1 = "", $$1 = "", p$1 = !1;
1837
+ const g$1 = (d$1) => {
1838
+ if (c$1.length === 0) return;
1839
+ const v$1 = c$1.split(`
1840
+ `).reduce((S$1, b$1) => b$1 === "" ? S$1 + 1 : S$1 + Math.ceil((b$1.length + a) / s), 0) + 1 + (d$1 ? n$1 + 2 : 0);
1841
+ r.write(import_src.erase.lines(v$1));
1842
+ }, m$1 = (d$1, v$1) => {
1843
+ E$2.message(d$1.split(`
1844
+ `).map(import_picocolors$1$1.dim), {
1845
+ output: r,
1846
+ secondarySymbol: i,
1847
+ symbol: i,
1848
+ spacing: v$1 ?? n$1
1849
+ });
1850
+ }, y$1 = () => {
1851
+ u === !0 && $$1.length > 0 ? m$1(`${$$1}
1852
+ ${c$1}`) : m$1(c$1);
1853
+ };
1854
+ return {
1855
+ message(d$1, v$1) {
1856
+ if (g$1(!1), (v$1?.raw !== !0 || !p$1) && c$1 !== "" && (c$1 += `
1857
+ `), c$1 += d$1, p$1 = v$1?.raw === !0, t.limit !== void 0) {
1858
+ const S$1 = c$1.split(`
1859
+ `), b$1 = S$1.length - t.limit;
1860
+ if (b$1 > 0) {
1861
+ const B$1 = S$1.splice(0, b$1);
1862
+ u && ($$1 += ($$1 === "" ? "" : `
1863
+ `) + B$1.join(`
1864
+ `));
1865
+ }
1866
+ c$1 = S$1.join(`
1867
+ `);
1868
+ }
1869
+ l || m$1(c$1, 0);
1870
+ },
1871
+ error(d$1, v$1) {
1872
+ g$1(!0), E$2.error(d$1, {
1873
+ output: r,
1874
+ secondarySymbol: i,
1875
+ spacing: 1
1876
+ }), v$1?.showLog !== !1 && y$1(), c$1 = $$1 = "";
1877
+ },
1878
+ success(d$1, v$1) {
1879
+ g$1(!0), E$2.success(d$1, {
1880
+ output: r,
1881
+ secondarySymbol: i,
1882
+ spacing: 1
1883
+ }), v$1?.showLog === !0 && y$1(), c$1 = $$1 = "";
1884
+ }
1885
+ };
1886
+ }, Ue$1 = (t) => new eD({
1887
+ validate: t.validate,
1888
+ placeholder: t.placeholder,
1889
+ defaultValue: t.defaultValue,
1890
+ initialValue: t.initialValue,
1891
+ output: t.output,
1892
+ input: t.input,
1893
+ render() {
1894
+ const r = `${import_picocolors$2$1.default.gray(o)}
1895
+ ${T(this.state)} ${t.message}
1896
+ `, s = t.placeholder ? import_picocolors$2$1.default.inverse(t.placeholder[0]) + import_picocolors$2$1.default.dim(t.placeholder.slice(1)) : import_picocolors$2$1.default.inverse(import_picocolors$2$1.default.hidden("_")), i = this.value ? this.valueWithCursor : s;
1897
+ switch (this.state) {
1898
+ case "error": return `${r.trim()}
1899
+ ${import_picocolors$2$1.default.yellow(o)} ${i}
1900
+ ${import_picocolors$2$1.default.yellow(f)} ${import_picocolors$2$1.default.yellow(this.error)}
1901
+ `;
1902
+ case "submit": return `${r}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.dim(this.value || t.placeholder)}`;
1903
+ case "cancel": return `${r}${import_picocolors$2$1.default.gray(o)} ${import_picocolors$2$1.default.strikethrough(import_picocolors$2$1.default.dim(this.value ?? ""))}${this.value?.trim() ? `
1904
+ ${import_picocolors$2$1.default.gray(o)}` : ""}`;
1905
+ default: return `${r}${import_picocolors$2$1.default.cyan(o)} ${i}
1906
+ ${import_picocolors$2$1.default.cyan(f)}
1907
+ `;
1908
+ }
1909
+ }
1910
+ }).prompt();
1068
1911
  var utils_exports = {};
1069
1912
  __export(utils_exports, { createPrinter: () => createPrinter });
1070
1913
  function createPrinter(...conditions) {
@@ -1073,7 +1916,7 @@ function createPrinter(...conditions) {
1073
1916
  });
1074
1917
  return printers;
1075
1918
  }
1076
- var import_picocolors$4 = __toESM$1(require_picocolors(), 1);
1919
+ var import_picocolors$4 = __toESM(require_picocolors$1(), 1);
1077
1920
  var colors = import_picocolors$4.default;
1078
1921
 
1079
1922
  //#endregion
@@ -1212,8 +2055,16 @@ var drizzle_default = defineAddon({
1212
2055
  shortDescription: "database orm",
1213
2056
  homepage: "https://orm.drizzle.team",
1214
2057
  options: options$5,
1215
- setup: ({ kit, unsupported }) => {
2058
+ setup: ({ kit, unsupported, cwd, typescript }) => {
2059
+ const ext = typescript ? "ts" : "js";
1216
2060
  if (!kit) unsupported("Requires SvelteKit");
2061
+ const baseDBPath = path.resolve(kit.libDirectory, "server", "db");
2062
+ const paths = {
2063
+ "drizzle config": path.relative(cwd, path.resolve(cwd, `drizzle.config.${ext}`)),
2064
+ "database schema": path.relative(cwd, path.resolve(baseDBPath, `schema.${ext}`)),
2065
+ database: path.relative(cwd, path.resolve(baseDBPath, `index.${ext}`))
2066
+ };
2067
+ for (const [fileType, filePath] of Object.entries(paths)) if (fs.existsSync(filePath)) unsupported(`Preexisting ${fileType} file at '${filePath}'`);
1217
2068
  },
1218
2069
  run: ({ sv, typescript, options: options$6, kit }) => {
1219
2070
  const ext = typescript ? "ts" : "js";
@@ -1286,32 +2137,18 @@ var drizzle_default = defineAddon({
1286
2137
  sv.file(`drizzle.config.${ext}`, (content) => {
1287
2138
  const { ast, generateCode } = parseScript$1(content);
1288
2139
  imports_exports.addNamed(ast, "drizzle-kit", { defineConfig: "defineConfig" });
1289
- const envCheckStatement = common_exports.statementFromString("if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set');");
1290
- common_exports.addStatement(ast, envCheckStatement);
1291
- const fallback = common_exports.expressionFromString("defineConfig({})");
1292
- const { value: exportDefault } = exports_exports.defaultExport(ast, fallback);
1293
- if (exportDefault.type !== "CallExpression") return content;
1294
- const objExpression = exportDefault.arguments?.[0];
1295
- if (!objExpression || objExpression.type !== "ObjectExpression") return content;
1296
- const authToken = options$6.sqlite === "turso" ? common_exports.expressionFromString("process.env.DATABASE_AUTH_TOKEN") : undefined;
1297
- object_exports.properties(objExpression, {
1298
- schema: common_exports.createLiteral(`./src/lib/server/db/schema.${typescript ? "ts" : "js"}`),
1299
- dbCredentials: object_exports.create({
1300
- url: common_exports.expressionFromString("process.env.DATABASE_URL"),
1301
- authToken
1302
- }),
1303
- verbose: {
1304
- type: "Literal",
1305
- value: true
1306
- },
1307
- strict: {
1308
- type: "Literal",
1309
- value: true
1310
- }
1311
- });
1312
- const dialect = options$6.sqlite === "turso" ? "turso" : options$6.database;
1313
- object_exports.overrideProperties(objExpression, { dialect: common_exports.createLiteral(dialect) });
1314
- if (options$6.database !== "sqlite") object_exports.removeProperty(objExpression, "driver");
2140
+ common_exports.addStatement(ast, common_exports.statementFromString("if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set');"));
2141
+ exports_exports.defaultExport(ast, common_exports.expressionFromString(`
2142
+ defineConfig({
2143
+ schema: "./src/lib/server/db/schema.${typescript ? "ts" : "js"}",
2144
+ dialect: "${options$6.sqlite === "turso" ? "turso" : options$6.database}",
2145
+ dbCredentials: {
2146
+ ${options$6.sqlite === "turso" ? "authToken: process.env.DATABASE_AUTH_TOKEN," : ""}
2147
+ url: process.env.DATABASE_URL
2148
+ },
2149
+ verbose: true,
2150
+ strict: true
2151
+ })`));
1315
2152
  return generateCode();
1316
2153
  });
1317
2154
  sv.file(`${kit?.libDirectory}/server/db/schema.${ext}`, (content) => {
@@ -1547,12 +2384,12 @@ var eslint_default = defineAddon({
1547
2384
  exportExpression = tsConfigCall;
1548
2385
  } else {
1549
2386
  const eslintArray = array_exports.createEmpty();
1550
- eslintConfigs.map((x) => array_exports.push(eslintArray, x));
2387
+ eslintConfigs.map((x$1) => array_exports.push(eslintArray, x$1));
1551
2388
  exportExpression = eslintArray;
1552
2389
  }
1553
2390
  const defaultExport = exports_exports.defaultExport(ast, exportExpression);
1554
2391
  if (defaultExport.value !== exportExpression) {
1555
- log$1.warn("An eslint config is already defined. Skipping initialization.");
2392
+ E$2.warn("An eslint config is already defined. Skipping initialization.");
1556
2393
  return content;
1557
2394
  }
1558
2395
  if (!typescript) common_exports.addJsDocTypeComment(defaultExport.astNode, "import('eslint').Linter.Config[]");
@@ -1638,7 +2475,7 @@ var sveltekit_adapter_default = defineAddon({
1638
2475
  if (adapterImportDecl) {
1639
2476
  adapterImportDecl.source.value = adapter.package;
1640
2477
  adapterImportDecl.source.raw = undefined;
1641
- adapterName = adapterImportDecl.specifiers?.find((s$1) => s$1.type === "ImportDefaultSpecifier")?.local?.name;
2478
+ adapterName = adapterImportDecl.specifiers?.find((s) => s.type === "ImportDefaultSpecifier")?.local?.name;
1642
2479
  } else imports_exports.addDefault(ast, adapter.package, adapterName);
1643
2480
  const { value: config } = exports_exports.defaultExport(ast, object_exports.createEmpty());
1644
2481
  const kitConfig = config.properties.find((p) => p.type === "Property" && p.key.type === "Identifier" && p.key.name === "kit");
@@ -1660,9 +2497,9 @@ const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
1660
2497
  const intToChar = new Uint8Array(64);
1661
2498
  const charToInt = new Uint8Array(128);
1662
2499
  for (let i = 0; i < chars.length; i++) {
1663
- const c = chars.charCodeAt(i);
1664
- intToChar[i] = c;
1665
- charToInt[c] = i;
2500
+ const c$1 = chars.charCodeAt(i);
2501
+ intToChar[i] = c$1;
2502
+ charToInt[c$1] = i;
1666
2503
  }
1667
2504
  function encodeInteger(builder, num, relative) {
1668
2505
  let delta = num - relative;
@@ -1690,9 +2527,9 @@ var StringWriter = class {
1690
2527
  this.out = "";
1691
2528
  this.buffer = new Uint8Array(bufLength);
1692
2529
  }
1693
- write(v) {
2530
+ write(v$1) {
1694
2531
  const { buffer } = this;
1695
- buffer[this.pos++] = v;
2532
+ buffer[this.pos++] = v$1;
1696
2533
  if (this.pos === bufLength) {
1697
2534
  this.out += td.decode(buffer);
1698
2535
  this.pos = 0;
@@ -1714,9 +2551,9 @@ function encode(decoded) {
1714
2551
  if (i > 0) writer.write(semicolon);
1715
2552
  if (line.length === 0) continue;
1716
2553
  let genColumn = 0;
1717
- for (let j = 0; j < line.length; j++) {
1718
- const segment = line[j];
1719
- if (j > 0) writer.write(comma);
2554
+ for (let j$2 = 0; j$2 < line.length; j$2++) {
2555
+ const segment = line[j$2];
2556
+ if (j$2 > 0) writer.write(comma);
1720
2557
  genColumn = encodeInteger(writer, segment[0], genColumn);
1721
2558
  if (segment.length === 1) continue;
1722
2559
  sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
@@ -1935,11 +2772,11 @@ function getLocator(source) {
1935
2772
  }
1936
2773
  return function locate(index) {
1937
2774
  let i = 0;
1938
- let j = lineOffsets.length;
1939
- while (i < j) {
1940
- const m = i + j >> 1;
1941
- if (index < lineOffsets[m]) j = m;
1942
- else i = m + 1;
2775
+ let j$2 = lineOffsets.length;
2776
+ while (i < j$2) {
2777
+ const m$1 = i + j$2 >> 1;
2778
+ if (index < lineOffsets[m$1]) j$2 = m$1;
2779
+ else i = m$1 + 1;
1943
2780
  }
1944
2781
  const line = i - 1;
1945
2782
  const column = index - lineOffsets[line];
@@ -2616,10 +3453,10 @@ else this.outro = content + this.outro;
2616
3453
  });
2617
3454
  else return replacement(...match, match.index, str, match.groups);
2618
3455
  }
2619
- function matchAll(re, str) {
3456
+ function matchAll(re$1, str) {
2620
3457
  let match;
2621
3458
  const matches = [];
2622
- while (match = re.exec(str)) matches.push(match);
3459
+ while (match = re$1.exec(str)) matches.push(match);
2623
3460
  return matches;
2624
3461
  }
2625
3462
  if (searchValue.global) {
@@ -2685,9 +3522,10 @@ var lucia_default = defineAddon({
2685
3522
  shortDescription: "auth guide",
2686
3523
  homepage: "https://lucia-auth.com",
2687
3524
  options: options$3,
2688
- setup: ({ kit, dependencyVersion, unsupported, dependsOn }) => {
3525
+ setup: ({ kit, dependencyVersion, unsupported, dependsOn, runsAfter }) => {
2689
3526
  if (!kit) unsupported("Requires SvelteKit");
2690
3527
  if (!dependencyVersion("drizzle-orm")) dependsOn("drizzle");
3528
+ runsAfter("tailwindcss");
2691
3529
  },
2692
3530
  run: ({ sv, typescript, options: options$6, kit, dependencyVersion }) => {
2693
3531
  const ext = typescript ? "ts" : "js";
@@ -2921,7 +3759,7 @@ var lucia_default = defineAddon({
2921
3759
  sv.file(`${kit.routesDirectory}/demo/lucia/login/+page.server.${ext}`, (content) => {
2922
3760
  if (content) {
2923
3761
  const filePath = `${kit.routesDirectory}/demo/lucia/login/+page.server.${typescript ? "ts" : "js"}`;
2924
- log$1.warn(`Existing ${colors.yellow(filePath)} file. Could not update.`);
3762
+ E$2.warn(`Existing ${colors.yellow(filePath)} file. Could not update.`);
2925
3763
  return content;
2926
3764
  }
2927
3765
  const [ts] = utils_exports.createPrinter(typescript);
@@ -3042,9 +3880,12 @@ var lucia_default = defineAddon({
3042
3880
  sv.file(`${kit.routesDirectory}/demo/lucia/login/+page.svelte`, (content) => {
3043
3881
  if (content) {
3044
3882
  const filePath = `${kit.routesDirectory}/demo/lucia/login/+page.svelte`;
3045
- log$1.warn(`Existing ${colors.yellow(filePath)} file. Could not update.`);
3883
+ E$2.warn(`Existing ${colors.yellow(filePath)} file. Could not update.`);
3046
3884
  return content;
3047
3885
  }
3886
+ const tailwind = dependencyVersion("@tailwindcss/vite") !== undefined;
3887
+ const twInputClasses = "class=\"mt-1 px-3 py-2 bg-white border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500\"";
3888
+ const twBtnClasses = "class=\"bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition\"";
3048
3889
  const svelte5 = !!dependencyVersion("svelte")?.startsWith("5");
3049
3890
  const [ts, s5] = utils_exports.createPrinter(typescript, svelte5);
3050
3891
  return dedent_default`
@@ -3055,17 +3896,28 @@ var lucia_default = defineAddon({
3055
3896
  </script>
3056
3897
 
3057
3898
  <h1>Login/Register</h1>
3058
- <form method='post' action='?/login' use:enhance>
3899
+ <form method="post" action="?/login" use:enhance>
3059
3900
  <label>
3060
3901
  Username
3061
- <input name='username' />
3902
+ <input
3903
+ name="username"
3904
+ ${tailwind ? twInputClasses : ""}
3905
+ />
3062
3906
  </label>
3063
3907
  <label>
3064
3908
  Password
3065
- <input type='password' name='password' />
3909
+ <input
3910
+ type="password"
3911
+ name="password"
3912
+ ${tailwind ? twInputClasses : ""}
3913
+ />
3066
3914
  </label>
3067
- <button>Login</button>
3068
- <button formaction='?/register'>Register</button>
3915
+ <button ${tailwind ? twBtnClasses : ""}
3916
+ >Login</button>
3917
+ <button
3918
+ formaction="?/register"
3919
+ ${tailwind ? twBtnClasses : ""}
3920
+ >Register</button>
3069
3921
  </form>
3070
3922
  <p style='color: red'>{form?.message ?? ''}</p>
3071
3923
  `;
@@ -3073,19 +3925,18 @@ var lucia_default = defineAddon({
3073
3925
  sv.file(`${kit.routesDirectory}/demo/lucia/+page.server.${ext}`, (content) => {
3074
3926
  if (content) {
3075
3927
  const filePath = `${kit.routesDirectory}/demo/lucia/+page.server.${typescript ? "ts" : "js"}`;
3076
- log$1.warn(`Existing ${colors.yellow(filePath)} file. Could not update.`);
3928
+ E$2.warn(`Existing ${colors.yellow(filePath)} file. Could not update.`);
3077
3929
  return content;
3078
3930
  }
3079
3931
  const [ts] = utils_exports.createPrinter(typescript);
3080
3932
  return dedent_default`
3081
3933
  import * as auth from '$lib/server/auth';
3082
3934
  import { fail, redirect } from '@sveltejs/kit';
3935
+ import { getRequestEvent } from '$app/server';
3083
3936
  ${ts("import type { Actions, PageServerLoad } from './$types';\n")}
3084
- export const load${ts(": PageServerLoad")} = async (event) => {
3085
- if (!event.locals.user) {
3086
- return redirect(302, '/demo/lucia/login');
3087
- }
3088
- return { user: event.locals.user };
3937
+ export const load${ts(": PageServerLoad")} = async () => {
3938
+ const user = requireLogin()
3939
+ return { user };
3089
3940
  };
3090
3941
 
3091
3942
  export const actions${ts(": Actions")} = {
@@ -3099,12 +3950,22 @@ var lucia_default = defineAddon({
3099
3950
  return redirect(302, '/demo/lucia/login');
3100
3951
  },
3101
3952
  };
3953
+
3954
+ function requireLogin() {
3955
+ const { locals } = getRequestEvent();
3956
+
3957
+ if (!locals.user) {
3958
+ return redirect(302, "/demo/lucia/login");
3959
+ }
3960
+
3961
+ return locals.user;
3962
+ }
3102
3963
  `;
3103
3964
  });
3104
3965
  sv.file(`${kit.routesDirectory}/demo/lucia/+page.svelte`, (content) => {
3105
3966
  if (content) {
3106
3967
  const filePath = `${kit.routesDirectory}/demo/lucia/+page.svelte`;
3107
- log$1.warn(`Existing ${colors.yellow(filePath)} file. Could not update.`);
3968
+ E$2.warn(`Existing ${colors.yellow(filePath)} file. Could not update.`);
3108
3969
  return content;
3109
3970
  }
3110
3971
  const svelte5 = !!dependencyVersion("svelte")?.startsWith("5");
@@ -3260,7 +4121,7 @@ const DEFAULT_INLANG_PROJECT = {
3260
4121
  "plugin.inlang.messageFormat": { pathPattern: "./messages/{locale}.json" }
3261
4122
  };
3262
4123
  const options$2 = defineAddonOptions({
3263
- availableLanguageTags: {
4124
+ languageTags: {
3264
4125
  question: `Which languages would you like to support? ${colors.gray("(e.g. en,de-ch)")}`,
3265
4126
  type: "string",
3266
4127
  default: "en, es",
@@ -3272,7 +4133,7 @@ else {
3272
4133
  style: "long",
3273
4134
  type: "conjunction"
3274
4135
  });
3275
- return `The inputs ${listFormat.format(invalidLanguageTags.map((x) => `"${x}"`))} are not valid BCP47 language tags`;
4136
+ return `The inputs ${listFormat.format(invalidLanguageTags.map((x$1) => `"${x$1}"`))} are not valid BCP47 language tags`;
3276
4137
  }
3277
4138
  if (validLanguageTags.length === 0) return "Please enter at least one valid BCP47 language tag. Eg: en";
3278
4139
  return undefined;
@@ -3301,7 +4162,7 @@ var paraglide_default = defineAddon({
3301
4162
  if (content) return content;
3302
4163
  const { data, generateCode } = parseJson$1(content);
3303
4164
  for (const key in DEFAULT_INLANG_PROJECT) data[key] = DEFAULT_INLANG_PROJECT[key];
3304
- const { validLanguageTags: validLanguageTags$1 } = parseLanguageTagInput(options$6.availableLanguageTags);
4165
+ const { validLanguageTags: validLanguageTags$1 } = parseLanguageTagInput(options$6.languageTags);
3305
4166
  const baseLocale = validLanguageTags$1[0];
3306
4167
  data.baseLocale = baseLocale;
3307
4168
  data.locales = validLanguageTags$1;
@@ -3329,7 +4190,7 @@ var paraglide_default = defineAddon({
3329
4190
  const expression = common_exports.expressionFromString("(request) => deLocalizeUrl(request.url).pathname");
3330
4191
  const rerouteIdentifier = variables_exports.declaration(ast, "const", "reroute", expression);
3331
4192
  const existingExport = exports_exports.namedExport(ast, "reroute", rerouteIdentifier);
3332
- if (existingExport.declaration !== rerouteIdentifier) log$1.warn("Adding the reroute hook automatically failed. Add it manually");
4193
+ if (existingExport.declaration !== rerouteIdentifier) E$2.warn("Adding the reroute hook automatically failed. Add it manually");
3333
4194
  return generateCode();
3334
4195
  });
3335
4196
  sv.file(`src/hooks.server.${ext}`, (content) => {
@@ -3348,7 +4209,7 @@ var paraglide_default = defineAddon({
3348
4209
  const { ast, generateCode } = parseHtml$1(content);
3349
4210
  const htmlNode = ast.children.find((child) => child.type === esm_exports.Tag && child.name === "html");
3350
4211
  if (!htmlNode) {
3351
- log$1.warn("Could not find <html> node in app.html. You'll need to add the language placeholder manually");
4212
+ E$2.warn("Could not find <html> node in app.html. You'll need to add the language placeholder manually");
3352
4213
  return generateCode();
3353
4214
  }
3354
4215
  htmlNode.attribs = {
@@ -3375,8 +4236,8 @@ var paraglide_default = defineAddon({
3375
4236
  const scriptCode = new MagicString(script.generateCode());
3376
4237
  const templateCode = new MagicString(template.source);
3377
4238
  templateCode.append("\n\n<h1>{m.hello_world({ name: 'SvelteKit User' })}</h1>\n");
3378
- const { validLanguageTags: validLanguageTags$1 } = parseLanguageTagInput(options$6.availableLanguageTags);
3379
- const links = validLanguageTags$1.map((x) => `${templateCode.getIndentString()}<button onclick={() => setLocale('${x}')}>${x}</button>`).join("\n");
4239
+ const { validLanguageTags: validLanguageTags$1 } = parseLanguageTagInput(options$6.languageTags);
4240
+ const links = validLanguageTags$1.map((x$1) => `${templateCode.getIndentString()}<button onclick={() => setLocale('${x$1}')}>${x$1}</button>`).join("\n");
3380
4241
  templateCode.append(`<div>\n${links}\n</div>`);
3381
4242
  templateCode.append("<p>\nIf you use VSCode, install the <a href=\"https://marketplace.visualstudio.com/items?itemName=inlang.vs-code-extension\" target=\"_blank\">Sherlock i18n extension</a> for a better i18n experience.\n</p>");
3382
4243
  return generateCode({
@@ -3385,7 +4246,7 @@ var paraglide_default = defineAddon({
3385
4246
  });
3386
4247
  });
3387
4248
  }
3388
- const { validLanguageTags } = parseLanguageTagInput(options$6.availableLanguageTags);
4249
+ const { validLanguageTags } = parseLanguageTagInput(options$6.languageTags);
3389
4250
  for (const languageTag of validLanguageTags) sv.file(`messages/${languageTag}.json`, (content) => {
3390
4251
  const { data, generateCode } = parseJson$1(content);
3391
4252
  data["$schema"] = "https://inlang.com/schema/inlang-message-format";
@@ -3464,7 +4325,7 @@ var playwright_default = defineAddon({
3464
4325
  imports_exports.addNamed(ast, "@playwright/test", { defineConfig: "defineConfig" });
3465
4326
  object_exports.properties(defaultExport.value.arguments[0], config);
3466
4327
  } else if (defaultExport.value.type === "ObjectExpression") object_exports.properties(defaultExport.value, config);
3467
- else log$1.warn("Unexpected playwright config for playwright add-on. Could not update.");
4328
+ else E$2.warn("Unexpected playwright config for playwright add-on. Could not update.");
3468
4329
  return generateCode();
3469
4330
  });
3470
4331
  }
@@ -3496,7 +4357,7 @@ var prettier_default = defineAddon({
3496
4357
  try {
3497
4358
  ({data, generateCode} = parseJson$1(content));
3498
4359
  } catch {
3499
- log$1.warn(`A ${colors.yellow(".prettierrc")} config already exists and cannot be parsed as JSON. Skipping initialization.`);
4360
+ E$2.warn(`A ${colors.yellow(".prettierrc")} config already exists and cannot be parsed as JSON. Skipping initialization.`);
3500
4361
  return content;
3501
4362
  }
3502
4363
  if (Object.keys(data).length === 0) {
@@ -3510,7 +4371,7 @@ var prettier_default = defineAddon({
3510
4371
  const plugins$1 = data.plugins;
3511
4372
  if (!plugins$1.includes("prettier-plugin-svelte")) data.plugins.unshift("prettier-plugin-svelte");
3512
4373
  const overrides = data.overrides;
3513
- const override = overrides.find((o) => o?.options?.parser === "svelte");
4374
+ const override = overrides.find((o$1) => o$1?.options?.parser === "svelte");
3514
4375
  if (!override) overrides.push({
3515
4376
  files: "*.svelte",
3516
4377
  options: { parser: "svelte" }
@@ -3531,7 +4392,7 @@ var prettier_default = defineAddon({
3531
4392
  } else scripts$1["lint"] ??= CHECK_CMD;
3532
4393
  return generateCode();
3533
4394
  });
3534
- if (eslintVersion?.startsWith(SUPPORTED_ESLINT_VERSION) === false) log$1.warn(`An older major version of ${colors.yellow("eslint")} was detected. Skipping ${colors.yellow("eslint-config-prettier")} installation.`);
4395
+ if (eslintVersion?.startsWith(SUPPORTED_ESLINT_VERSION) === false) E$2.warn(`An older major version of ${colors.yellow("eslint")} was detected. Skipping ${colors.yellow("eslint-config-prettier")} installation.`);
3535
4396
  if (eslintInstalled) {
3536
4397
  sv.devDependency("eslint-config-prettier", "^10.0.1");
3537
4398
  sv.file("eslint.config.js", addEslintConfigPrettier);
@@ -3550,6 +4411,10 @@ var storybook_default = defineAddon({
3550
4411
  shortDescription: "frontend workshop",
3551
4412
  homepage: "https://storybook.js.org",
3552
4413
  options: {},
4414
+ setup: ({ runsAfter }) => {
4415
+ runsAfter("vitest");
4416
+ runsAfter("eslint");
4417
+ },
3553
4418
  run: async ({ sv }) => {
3554
4419
  await sv.execute([
3555
4420
  "storybook@latest",
@@ -3778,7 +4643,7 @@ else sv.file(`src/App.svelte.test.${ext}`, (content) => {
3778
4643
  });
3779
4644
  const defineConfigFallback = function_exports.call("defineConfig", []);
3780
4645
  const { value: defineWorkspaceCall } = exports_exports.defaultExport(ast, defineConfigFallback);
3781
- if (defineWorkspaceCall.type !== "CallExpression") log$1.warn("Unexpected vite config. Could not update.");
4646
+ if (defineWorkspaceCall.type !== "CallExpression") E$2.warn("Unexpected vite config. Could not update.");
3782
4647
  const vitestConfig = function_exports.argumentByIndex(defineWorkspaceCall, 0, object_exports.createEmpty());
3783
4648
  const testObject = object_exports.property(vitestConfig, "test", object_exports.createEmpty());
3784
4649
  const workspaceArray = object_exports.property(testObject, "workspace", array_exports.createEmpty());
@@ -3831,24 +4696,24 @@ var UnsupportedError = class extends Error {
3831
4696
 
3832
4697
  //#endregion
3833
4698
  //#region packages/cli/utils/common.ts
3834
- var import_picocolors$3 = __toESM(require_picocolors$1(), 1);
4699
+ var import_picocolors$3 = __toESM$1(require_picocolors(), 1);
3835
4700
  const NO_PREFIX = "--no-";
3836
4701
  let options = [];
3837
4702
  function getLongFlag(flags) {
3838
- return flags.split(",").map((f) => f.trim()).find((f) => f.startsWith("--"));
4703
+ return flags.split(",").map((f$2) => f$2.trim()).find((f$2) => f$2.startsWith("--"));
3839
4704
  }
3840
4705
  const helpConfig = {
3841
4706
  argumentDescription: formatDescription,
3842
4707
  optionDescription: formatDescription,
3843
4708
  visibleOptions(cmd) {
3844
4709
  options = cmd.options;
3845
- const visible = cmd.options.filter((o) => !o.hidden);
4710
+ const visible = cmd.options.filter((o$1) => !o$1.hidden);
3846
4711
  const show = [];
3847
4712
  for (const option of visible) {
3848
4713
  const flag = getLongFlag(option.flags);
3849
4714
  if (flag?.startsWith(NO_PREFIX)) {
3850
4715
  const stripped = flag.slice(NO_PREFIX.length);
3851
- const isNoVariant = visible.some((o) => getLongFlag(o.flags)?.startsWith(`--${stripped}`));
4716
+ const isNoVariant = visible.some((o$1) => getLongFlag(o$1.flags)?.startsWith(`--${stripped}`));
3852
4717
  if (isNoVariant) continue;
3853
4718
  }
3854
4719
  show.push(option);
@@ -3860,7 +4725,7 @@ const helpConfig = {
3860
4725
  const flag = longFlag?.split(" ").at(0);
3861
4726
  if (!flag || !longFlag) return option.flags;
3862
4727
  const noVariant = `--no-${flag.slice(2)}`;
3863
- const hasVariant = options.some((o) => getLongFlag(o.flags) === noVariant);
4728
+ const hasVariant = options.some((o$1) => getLongFlag(o$1.flags) === noVariant);
3864
4729
  if (hasVariant) return `--[no-]${longFlag.slice(2)}`;
3865
4730
  return option.flags;
3866
4731
  },
@@ -3879,24 +4744,24 @@ function formatDescription(arg) {
3879
4744
  }
3880
4745
  async function runCommand(action) {
3881
4746
  try {
3882
- intro(`Welcome to the Svelte CLI! ${import_picocolors$3.default.gray(`(v${package_default.version})`)}`);
4747
+ Pe(`Welcome to the Svelte CLI! ${import_picocolors$3.default.gray(`(v${package_default.version})`)}`);
3883
4748
  await action();
3884
- outro("You're all set!");
4749
+ Le("You're all set!");
3885
4750
  } catch (e) {
3886
4751
  if (e instanceof UnsupportedError) {
3887
4752
  const padding = getPadding(e.reasons.map((r) => r.id));
3888
4753
  const message = e.reasons.map((r) => ` ${r.id.padEnd(padding)} ${import_picocolors$3.default.red(r.reason)}`).join("\n");
3889
- log.error(`${e.name}\n\n${message}`);
3890
- log.message();
4754
+ E.error(`${e.name}\n\n${message}`);
4755
+ E.message();
3891
4756
  } else if (e instanceof Error) {
3892
- log.error(e.stack ?? String(e));
3893
- log.message();
4757
+ E.error(e.stack ?? String(e));
4758
+ E.message();
3894
4759
  }
3895
- cancel("Operation failed.");
4760
+ Ne("Operation failed.");
3896
4761
  }
3897
4762
  }
3898
4763
  function getPadding(lines) {
3899
- const lengths = lines.map((s$1) => s$1.length);
4764
+ const lengths = lines.map((s) => s.length);
3900
4765
  return Math.max(...lengths);
3901
4766
  }
3902
4767
  function forwardExitCode(error) {
@@ -4010,8 +4875,8 @@ var require_b4a = __commonJS({ "node_modules/.pnpm/b4a@1.6.7/node_modules/b4a/in
4010
4875
  function byteLength(string$1, encoding) {
4011
4876
  return Buffer.byteLength(string$1, encoding);
4012
4877
  }
4013
- function compare(a, b) {
4014
- return Buffer.compare(a, b);
4878
+ function compare(a, b$1) {
4879
+ return Buffer.compare(a, b$1);
4015
4880
  }
4016
4881
  function concat(buffers, totalLength) {
4017
4882
  return Buffer.concat(buffers, totalLength);
@@ -4019,8 +4884,8 @@ var require_b4a = __commonJS({ "node_modules/.pnpm/b4a@1.6.7/node_modules/b4a/in
4019
4884
  function copy(source, target, targetStart, start, end) {
4020
4885
  return toBuffer(source).copy(target, targetStart, start, end);
4021
4886
  }
4022
- function equals(a, b) {
4023
- return toBuffer(a).equals(b);
4887
+ function equals(a, b$1) {
4888
+ return toBuffer(a).equals(b$1);
4024
4889
  }
4025
4890
  function fill(buffer, value, offset, end, encoding) {
4026
4891
  return toBuffer(buffer).fill(value, offset, end, encoding);
@@ -5165,22 +6030,22 @@ else {
5165
6030
  if (autoDestroy) dest.on("close", () => done(error || (fin ? null : PREMATURE_CLOSE)));
5166
6031
  }
5167
6032
  return dest;
5168
- function errorHandle(s$1, rd, wr, onerror$1) {
5169
- s$1.on("error", onerror$1);
5170
- s$1.on("close", onclose);
6033
+ function errorHandle(s, rd, wr, onerror$1) {
6034
+ s.on("error", onerror$1);
6035
+ s.on("close", onclose);
5171
6036
  function onclose() {
5172
- if (rd && s$1._readableState && !s$1._readableState.ended) return onerror$1(PREMATURE_CLOSE);
5173
- if (wr && s$1._writableState && !s$1._writableState.ended) return onerror$1(PREMATURE_CLOSE);
6037
+ if (rd && s._readableState && !s._readableState.ended) return onerror$1(PREMATURE_CLOSE);
6038
+ if (wr && s._writableState && !s._writableState.ended) return onerror$1(PREMATURE_CLOSE);
5174
6039
  }
5175
6040
  }
5176
6041
  function onerror(err) {
5177
6042
  if (!err || error) return;
5178
6043
  error = err;
5179
- for (const s$1 of all) s$1.destroy(err);
6044
+ for (const s of all) s.destroy(err);
5180
6045
  }
5181
6046
  }
5182
- function echo$1(s$1) {
5183
- return s$1;
6047
+ function echo$1(s) {
6048
+ return s;
5184
6049
  }
5185
6050
  function isStream(stream) {
5186
6051
  return !!stream._readableState || !!stream._writableState;
@@ -5214,8 +6079,8 @@ else {
5214
6079
  function abort() {
5215
6080
  this.destroy(new Error("Stream aborted."));
5216
6081
  }
5217
- function isWritev(s$1) {
5218
- return s$1._writev !== Writable$2.prototype._writev && s$1._writev !== Duplex.prototype._writev;
6082
+ function isWritev(s) {
6083
+ return s._writev !== Writable$2.prototype._writev && s._writev !== Duplex.prototype._writev;
5219
6084
  }
5220
6085
  module.exports = {
5221
6086
  pipeline: pipeline$1,
@@ -5281,10 +6146,10 @@ var require_headers = __commonJS({ "node_modules/.pnpm/tar-stream@3.1.7/node_mod
5281
6146
  while (i < buf.length && buf[i] !== 32) i++;
5282
6147
  const len = parseInt(b4a$2.toString(buf.subarray(0, i)), 10);
5283
6148
  if (!len) return result;
5284
- const b = b4a$2.toString(buf.subarray(i + 1, len - 1));
5285
- const keyIndex = b.indexOf("=");
6149
+ const b$1 = b4a$2.toString(buf.subarray(i + 1, len - 1));
6150
+ const keyIndex = b$1.indexOf("=");
5286
6151
  if (keyIndex === -1) return result;
5287
- result[b.slice(0, keyIndex)] = b.slice(keyIndex + 1);
6152
+ result[b$1.slice(0, keyIndex)] = b$1.slice(keyIndex + 1);
5288
6153
  buf = buf.subarray(len);
5289
6154
  }
5290
6155
  return result;
@@ -5335,9 +6200,9 @@ var require_headers = __commonJS({ "node_modules/.pnpm/tar-stream@3.1.7/node_mod
5335
6200
  const gname = decodeStr(buf, 297, 32);
5336
6201
  const devmajor = decodeOct(buf, 329, 8);
5337
6202
  const devminor = decodeOct(buf, 337, 8);
5338
- const c = cksum(buf);
5339
- if (c === 256) return null;
5340
- if (c !== decodeOct(buf, 148, 8)) throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");
6203
+ const c$1 = cksum(buf);
6204
+ if (c$1 === 256) return null;
6205
+ if (c$1 !== decodeOct(buf, 148, 8)) throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");
5341
6206
  if (isUSTAR(buf)) {
5342
6207
  if (buf[345]) name$1 = decodeStr(buf, 345, 155, filenameEncoding) + "/" + name$1;
5343
6208
  } else if (isGNU(buf)) {} else if (!allowUnknownFormat) throw new Error("Invalid tar header: unknown format.");
@@ -5412,7 +6277,7 @@ var require_headers = __commonJS({ "node_modules/.pnpm/tar-stream@3.1.7/node_mod
5412
6277
  function cksum(block) {
5413
6278
  let sum = 256;
5414
6279
  for (let i = 0; i < 148; i++) sum += block[i];
5415
- for (let j = 156; j < 512; j++) sum += block[j];
6280
+ for (let j$2 = 156; j$2 < 512; j$2++) sum += block[j$2];
5416
6281
  return sum;
5417
6282
  }
5418
6283
  function encodeOct(val, n$1) {
@@ -6067,8 +6932,8 @@ var require_wrappy = __commonJS({ "node_modules/.pnpm/wrappy@1.0.2/node_modules/
6067
6932
  function wrappy$1(fn, cb) {
6068
6933
  if (fn && cb) return wrappy$1(fn)(cb);
6069
6934
  if (typeof fn !== "function") throw new TypeError("need wrapper function");
6070
- Object.keys(fn).forEach(function(k) {
6071
- wrapper[k] = fn[k];
6935
+ Object.keys(fn).forEach(function(k$2) {
6936
+ wrapper[k$2] = fn[k$2];
6072
6937
  });
6073
6938
  return wrapper;
6074
6939
  function wrapper() {
@@ -6076,8 +6941,8 @@ var require_wrappy = __commonJS({ "node_modules/.pnpm/wrappy@1.0.2/node_modules/
6076
6941
  for (var i = 0; i < args.length; i++) args[i] = arguments[i];
6077
6942
  var ret = fn.apply(this, args);
6078
6943
  var cb$1 = args[args.length - 1];
6079
- if (typeof ret === "function" && ret !== cb$1) Object.keys(cb$1).forEach(function(k) {
6080
- ret[k] = cb$1[k];
6944
+ if (typeof ret === "function" && ret !== cb$1) Object.keys(cb$1).forEach(function(k$2) {
6945
+ ret[k$2] = cb$1[k$2];
6081
6946
  });
6082
6947
  return ret;
6083
6948
  }
@@ -6105,24 +6970,24 @@ var require_once = __commonJS({ "node_modules/.pnpm/once@1.4.0/node_modules/once
6105
6970
  });
6106
6971
  });
6107
6972
  function once$2(fn) {
6108
- var f = function() {
6109
- if (f.called) return f.value;
6110
- f.called = true;
6111
- return f.value = fn.apply(this, arguments);
6973
+ var f$2 = function() {
6974
+ if (f$2.called) return f$2.value;
6975
+ f$2.called = true;
6976
+ return f$2.value = fn.apply(this, arguments);
6112
6977
  };
6113
- f.called = false;
6114
- return f;
6978
+ f$2.called = false;
6979
+ return f$2;
6115
6980
  }
6116
6981
  function onceStrict(fn) {
6117
- var f = function() {
6118
- if (f.called) throw new Error(f.onceError);
6119
- f.called = true;
6120
- return f.value = fn.apply(this, arguments);
6982
+ var f$2 = function() {
6983
+ if (f$2.called) throw new Error(f$2.onceError);
6984
+ f$2.called = true;
6985
+ return f$2.value = fn.apply(this, arguments);
6121
6986
  };
6122
6987
  var name$1 = fn.name || "Function wrapped with `once`";
6123
- f.onceError = name$1 + " shouldn't be called more than once";
6124
- f.called = false;
6125
- return f;
6988
+ f$2.onceError = name$1 + " shouldn't be called more than once";
6989
+ f$2.called = false;
6990
+ return f$2;
6126
6991
  }
6127
6992
  } });
6128
6993
 
@@ -6580,7 +7445,7 @@ else if (err) return cb(err);
6580
7445
 
6581
7446
  //#endregion
6582
7447
  //#region packages/cli/commands/add/fetch-packages.ts
6583
- var import_tar_fs = __toESM(require_tar_fs(), 1);
7448
+ var import_tar_fs = __toESM$1(require_tar_fs(), 1);
6584
7449
  const NODE_MODULES = fileURLToPath(new URL("../node_modules", import.meta.url));
6585
7450
  const REGISTRY = "https://registry.npmjs.org";
6586
7451
  const Directive = {
@@ -6702,24 +7567,101 @@ function getGlobalPreconditions(cwd, addons, addonSetupResult) {
6702
7567
 
6703
7568
  //#endregion
6704
7569
  //#region packages/cli/commands/add/index.ts
6705
- var import_picocolors$2 = __toESM(require_picocolors$1(), 1);
6706
- const aliases = officialAddons.map((c) => c.alias).filter((v) => v !== undefined);
6707
- const addonsOptions = getAddonOptionFlags();
7570
+ var import_picocolors$2 = __toESM$1(require_picocolors(), 1);
7571
+ const aliases = officialAddons.map((c$1) => c$1.alias).filter((v$1) => v$1 !== undefined);
7572
+ const addonOptions = getAddonOptionFlags();
6708
7573
  const communityDetails = [];
6709
- const OptionFlagSchema = optional(array(string()));
6710
- const addonOptionFlags = addonsOptions.reduce((flags, opt) => Object.assign(flags, { [opt.attributeName()]: OptionFlagSchema }), {});
6711
7574
  const AddonsSchema = array(string());
6712
- const AddonOptionFlagsSchema = object(addonOptionFlags);
6713
7575
  const OptionsSchema$1 = strictObject({
6714
7576
  cwd: string(),
6715
7577
  install: union([boolean(), picklist(AGENT_NAMES)]),
6716
7578
  preconditions: boolean(),
6717
7579
  community: optional(union([AddonsSchema, boolean()])),
6718
- ...AddonOptionFlagsSchema.entries
7580
+ addons: record(string(), optional(array(string())))
6719
7581
  });
6720
7582
  const defaultPkgPath = up$1();
6721
7583
  const defaultCwd = defaultPkgPath ? path.dirname(defaultPkgPath) : undefined;
6722
- const add = new Command("add").description("applies specified add-ons into a project").argument("[add-on...]", "add-ons to install").option("-C, --cwd <path>", "path to working directory", defaultCwd).option("--no-preconditions", "skip validating preconditions").option("--no-install", "skip installing dependencies").addOption(installOption).configureHelp(helpConfig).action((addonArgs, opts) => {
7584
+ const add = new Command("add").description("applies specified add-ons into a project").argument("[add-on...]", `add-ons to install`, (value, prev = []) => {
7585
+ const [addonId, optionFlags] = value.split("=", 2);
7586
+ const repeatedAddons = prev.find(({ id }) => id === addonId);
7587
+ if (repeatedAddons) {
7588
+ console.error(`Malformed arguments: Add-on '${addonId}' is repeated multiple times.`);
7589
+ process$1.exit(1);
7590
+ }
7591
+ if (optionFlags === undefined) {
7592
+ prev.push({
7593
+ id: addonId,
7594
+ options: undefined
7595
+ });
7596
+ return prev;
7597
+ }
7598
+ if (optionFlags.length > 0 && !/.+:.*/.test(optionFlags)) {
7599
+ console.error(`Malformed arguments: An add-on's option in '${value}' is missing it's option name or value (e.g. 'addon=option:value').`);
7600
+ process$1.exit(1);
7601
+ }
7602
+ const options$6 = optionFlags.match(/[^+]*:[^:]*(?=\+|$)/g) ?? [];
7603
+ prev.push({
7604
+ id: addonId,
7605
+ options: options$6
7606
+ });
7607
+ return prev;
7608
+ }).option("-C, --cwd <path>", "path to working directory", defaultCwd).option("--no-preconditions", "skip validating preconditions").option("--no-install", "skip installing dependencies").addOption(installOption).configureHelp({
7609
+ ...helpConfig,
7610
+ formatHelp(cmd, helper) {
7611
+ const termWidth = helper.padWidth(cmd, helper);
7612
+ const helpWidth = helper.helpWidth ?? 80;
7613
+ function callFormatItem(term, description$1) {
7614
+ return helper.formatItem(term, termWidth, description$1, helper);
7615
+ }
7616
+ let output = [`${helper.styleTitle("Usage:")} ${helper.styleUsage(helper.commandUsage(cmd))}`, ""];
7617
+ const commandDescription = helper.commandDescription(cmd);
7618
+ if (commandDescription.length > 0) output = output.concat([helper.boxWrap(helper.styleCommandDescription(commandDescription), helpWidth), ""]);
7619
+ const argumentList = helper.visibleArguments(cmd).map((argument) => {
7620
+ return callFormatItem(helper.styleArgumentTerm(helper.argumentTerm(argument)), helper.styleArgumentDescription(helper.argumentDescription(argument)));
7621
+ });
7622
+ if (argumentList.length > 0) output = output.concat([
7623
+ helper.styleTitle("Arguments:"),
7624
+ ...argumentList,
7625
+ ""
7626
+ ]);
7627
+ const addonList = addonOptions.map((option) => {
7628
+ const description$1 = option.choices;
7629
+ return callFormatItem(helper.styleArgumentTerm(option.id), helper.styleArgumentDescription(description$1));
7630
+ });
7631
+ if (addonList.length > 0) output = output.concat([
7632
+ helper.styleTitle("Add-On Options:"),
7633
+ ...addonList,
7634
+ ""
7635
+ ]);
7636
+ const optionList = helper.visibleOptions(cmd).map((option) => {
7637
+ return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
7638
+ });
7639
+ if (optionList.length > 0) output = output.concat([
7640
+ helper.styleTitle("Options:"),
7641
+ ...optionList,
7642
+ ""
7643
+ ]);
7644
+ if (helper.showGlobalOptions) {
7645
+ const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
7646
+ return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
7647
+ });
7648
+ if (globalOptionList.length > 0) output = output.concat([
7649
+ helper.styleTitle("Global Options:"),
7650
+ ...globalOptionList,
7651
+ ""
7652
+ ]);
7653
+ }
7654
+ const commandList = helper.visibleCommands(cmd).map((cmd$1) => {
7655
+ return callFormatItem(helper.styleSubcommandTerm(helper.subcommandTerm(cmd$1)), helper.styleSubcommandDescription(helper.subcommandDescription(cmd$1)));
7656
+ });
7657
+ if (commandList.length > 0) output = output.concat([
7658
+ helper.styleTitle("Commands:"),
7659
+ ...commandList,
7660
+ ""
7661
+ ]);
7662
+ return output.join("\n");
7663
+ }
7664
+ }).action((addonArgs, opts) => {
6723
7665
  if (opts.cwd === undefined) {
6724
7666
  console.error("Invalid workspace: Please verify that you are inside of a Svelte project. You can also specify the working directory with `--cwd <path>`");
6725
7667
  process$1.exit(1);
@@ -6727,21 +7669,24 @@ const add = new Command("add").description("applies specified add-ons into a pro
6727
7669
  console.error(`Invalid workspace: Path '${path.resolve(opts.cwd)}' is not a valid workspace.`);
6728
7670
  process$1.exit(1);
6729
7671
  }
6730
- const specifiedAddons = parse(AddonsSchema, addonArgs);
6731
- const options$6 = parse(OptionsSchema$1, opts);
6732
7672
  const addonIds = officialAddons.map((addon) => addon.id);
6733
- const invalidAddons = specifiedAddons.filter((a) => !addonIds.includes(a) && !aliases.includes(a));
7673
+ const invalidAddons = addonArgs.filter(({ id }) => !addonIds.includes(id) && !aliases.includes(id)).map(({ id }) => id);
6734
7674
  if (invalidAddons.length > 0) {
6735
7675
  console.error(`Invalid add-ons specified: ${invalidAddons.join(", ")}`);
6736
7676
  process$1.exit(1);
6737
7677
  }
6738
- const selectedAddons = transformAliases(specifiedAddons);
7678
+ const options$6 = parse(OptionsSchema$1, {
7679
+ ...opts,
7680
+ addons: {}
7681
+ });
7682
+ const selectedAddons = transformAliases(addonArgs);
7683
+ selectedAddons.forEach((addon) => options$6.addons[addon.id] = addon.options);
6739
7684
  runCommand(async () => {
6740
- const { nextSteps } = await runAddCommand(options$6, selectedAddons);
6741
- if (nextSteps) box(nextSteps, "Next steps");
7685
+ const selectedAddonIds = selectedAddons.map(({ id }) => id);
7686
+ const { nextSteps } = await runAddCommand(options$6, selectedAddonIds);
7687
+ if (nextSteps) Ge(nextSteps, "Next steps", { format: (line) => line });
6742
7688
  });
6743
7689
  });
6744
- for (const option of addonsOptions) add.addOption(option);
6745
7690
  async function runAddCommand(options$6, selectedAddonIds) {
6746
7691
  const selectedAddons = selectedAddonIds.map((id) => ({
6747
7692
  type: "official",
@@ -6749,38 +7694,37 @@ async function runAddCommand(options$6, selectedAddonIds) {
6749
7694
  }));
6750
7695
  const official = {};
6751
7696
  const community = {};
6752
- for (const addonOption of addonsOptions) {
6753
- const addonId = addonOption.name();
6754
- const aliased = addonOption.attributeName();
6755
- const specifiedOptions = options$6[addonId] || options$6[aliased];
7697
+ for (const addonOption of addonOptions) {
7698
+ const addonId = addonOption.id;
7699
+ const specifiedOptions = options$6.addons[addonId];
6756
7700
  if (!specifiedOptions) continue;
6757
7701
  const details$1 = getAddonDetails(addonId);
6758
- if (!selectedAddons.find((d) => d.addon === details$1)) selectedAddons.push({
7702
+ if (!selectedAddons.find((d$1) => d$1.addon === details$1)) selectedAddons.push({
6759
7703
  type: "official",
6760
7704
  addon: details$1
6761
7705
  });
6762
7706
  official[addonId] ??= {};
6763
7707
  const optionEntries = Object.entries(details$1.options);
6764
- for (const specifiedOption of specifiedOptions) {
6765
- if (!specifiedOption || specifiedOption === "none") continue;
6766
- const optionEntry = optionEntries.find(([id, question$1]) => {
6767
- if (question$1.type === "boolean") return id === specifiedOption || `no-${id}` === specifiedOption;
6768
- if (question$1.type === "select" || question$1.type === "multiselect") return question$1.options.some((o) => o.value === specifiedOption);
6769
- });
7708
+ for (const option of specifiedOptions) {
7709
+ let [optionId, optionValue] = option.split(":", 2);
7710
+ const optionEntry = optionEntries.find(([id, question$1]) => id === optionId || question$1.group === optionId);
6770
7711
  if (!optionEntry) {
6771
7712
  const { choices } = getOptionChoices(details$1);
6772
- throw new Error(`Invalid '--${addonId}' option: '${specifiedOption}'\nAvailable options: ${choices.join(", ")}`);
7713
+ throw new Error(`Invalid '${addonId}' option: '${option}'\nAvailable options: ${choices.join(", ")}`);
6773
7714
  }
6774
7715
  const [questionId, question] = optionEntry;
7716
+ if (question.type === "multiselect" && optionValue === "none") optionValue = "";
6775
7717
  let existingOption = official[addonId][questionId];
6776
7718
  if (existingOption !== undefined) {
6777
- if (typeof existingOption === "boolean") existingOption = existingOption ? questionId : `no-${questionId}`;
6778
- throw new Error(`Conflicting '--${addonId}' option: '${specifiedOption}' conflicts with '${existingOption}'`);
7719
+ if (typeof existingOption === "boolean") existingOption = existingOption ? "yes" : "no";
7720
+ throw new Error(`Conflicting '${addonId}' option: '${option}' conflicts with '${questionId}:${existingOption}'`);
6779
7721
  }
6780
- official[addonId][questionId] = question.type === "boolean" ? !specifiedOption.startsWith("no-") : specifiedOption;
7722
+ if (question.type === "boolean") official[addonId][questionId] = optionValue === "yes";
7723
+ else if (question.type === "number") official[addonId][questionId] = Number(optionValue);
7724
+ else official[addonId][questionId] = optionValue;
6781
7725
  }
6782
7726
  for (const [id, question] of Object.entries(details$1.options)) if (question.condition?.(official[addonId]) !== false) official[addonId][id] ??= question.default;
6783
- else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--${addonId}' option specified: '${official[addonId][id]}'`);
7727
+ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '${addonId}' option specified: '${official[addonId][id]}'`);
6784
7728
  }
6785
7729
  if (options$6.community === true) {
6786
7730
  const communityAddons = await Promise.all(communityAddonIds.map(async (id) => await getCommunityAddon(id)));
@@ -6789,16 +7733,16 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
6789
7733
  label: addon.id,
6790
7734
  hint: "https://www.npmjs.com/package/" + addon.id
6791
7735
  }));
6792
- const selected = await multiselect({
7736
+ const selected = await ke({
6793
7737
  message: "Which community tools would you like to add to your project?",
6794
7738
  options: promptOptions,
6795
7739
  required: false
6796
7740
  });
6797
- if (isCancel(selected)) {
6798
- cancel("Operation cancelled.");
7741
+ if (Ou(selected)) {
7742
+ Ne("Operation cancelled.");
6799
7743
  process$1.exit(1);
6800
7744
  } else if (selected.length === 0) {
6801
- cancel("No add-ons selected. Exiting.");
7745
+ Ne("No add-ons selected. Exiting.");
6802
7746
  process$1.exit(1);
6803
7747
  }
6804
7748
  options$6.community = selected;
@@ -6811,7 +7755,7 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
6811
7755
  if (!validAddon) throw new Error(`Invalid community add-on specified: '${id}'\nAvailable options: ${communityAddonIds.join(", ")}`);
6812
7756
  return id;
6813
7757
  });
6814
- const { start, stop } = spinner();
7758
+ const { start, stop } = J();
6815
7759
  try {
6816
7760
  start("Resolving community add-on packages");
6817
7761
  const pkgs = await Promise.all(addons.map(async (id) => {
@@ -6821,7 +7765,7 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
6821
7765
  });
6822
7766
  }));
6823
7767
  stop("Resolved community add-on packages");
6824
- log.warn("The Svelte maintainers have not reviewed community add-ons for malicious code. Use at your discretion.");
7768
+ E.warn("The Svelte maintainers have not reviewed community add-ons for malicious code. Use at your discretion.");
6825
7769
  const paddingName = getPadding(pkgs.map(({ pkg }) => pkg.name));
6826
7770
  const paddingVersion = getPadding(pkgs.map(({ pkg }) => `(v${pkg.version})`));
6827
7771
  const packageInfos = pkgs.map(({ pkg, repo: _repo }) => {
@@ -6830,10 +7774,10 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
6830
7774
  const repo = import_picocolors$2.default.dim(`(${_repo})`);
6831
7775
  return `${name$1} ${version$1} ${repo}`;
6832
7776
  });
6833
- log.message(packageInfos.join("\n"));
6834
- const confirm$1 = await confirm({ message: "Would you like to continue?" });
6835
- if (confirm$1 !== true) {
6836
- cancel("Operation cancelled.");
7777
+ E.message(packageInfos.join("\n"));
7778
+ const confirm = await Ve({ message: "Would you like to continue?" });
7779
+ if (confirm !== true) {
7780
+ Ne("Operation cancelled.");
6837
7781
  process$1.exit(1);
6838
7782
  }
6839
7783
  start("Downloading community add-on packages");
@@ -6856,18 +7800,18 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
6856
7800
  let workspace = await createWorkspace({ cwd: options$6.cwd });
6857
7801
  const addonSetupResults = setupAddons(officialAddons, workspace);
6858
7802
  if (selectedAddons.length === 0) {
6859
- const addonOptions = officialAddons.filter(({ id }) => addonSetupResults[id].unsupported.length === 0).map(({ id, homepage: homepage$1, shortDescription }) => ({
7803
+ const addonOptions$1 = officialAddons.filter(({ id }) => addonSetupResults[id].unsupported.length === 0).map(({ id, homepage: homepage$1, shortDescription }) => ({
6860
7804
  label: id,
6861
7805
  value: id,
6862
7806
  hint: `${shortDescription} - ${homepage$1}`
6863
7807
  }));
6864
- const selected = await multiselect({
7808
+ const selected = await ke({
6865
7809
  message: `What would you like to add to your project? ${import_picocolors$2.default.dim("(use arrow keys / space bar)")}`,
6866
- options: addonOptions,
7810
+ options: addonOptions$1,
6867
7811
  required: false
6868
7812
  });
6869
- if (isCancel(selected)) {
6870
- cancel("Operation cancelled.");
7813
+ if (Ou(selected)) {
7814
+ Ne("Operation cancelled.");
6871
7815
  process$1.exit(1);
6872
7816
  }
6873
7817
  for (const id of selected) {
@@ -6885,9 +7829,9 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
6885
7829
  for (const depId of missingDependencies) {
6886
7830
  const dependency = officialAddons.find((a) => a.id === depId);
6887
7831
  if (!dependency) throw new Error(`'${addon.id}' depends on an invalid add-on: '${depId}'`);
6888
- const install = await confirm({ message: `The ${import_picocolors$2.default.bold(import_picocolors$2.default.cyan(addon.id))} add-on requires ${import_picocolors$2.default.bold(import_picocolors$2.default.cyan(depId))} to also be setup. ${import_picocolors$2.default.green("Include it?")}` });
7832
+ const install = await Ve({ message: `The ${import_picocolors$2.default.bold(import_picocolors$2.default.cyan(addon.id))} add-on requires ${import_picocolors$2.default.bold(import_picocolors$2.default.cyan(depId))} to also be setup. ${import_picocolors$2.default.green("Include it?")}` });
6889
7833
  if (install !== true) {
6890
- cancel("Operation cancelled.");
7834
+ Ne("Operation cancelled.");
6891
7835
  process$1.exit(1);
6892
7836
  }
6893
7837
  selectedAddons.push({
@@ -6909,13 +7853,13 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
6909
7853
  }
6910
7854
  if (fails.length > 0) {
6911
7855
  const message = fails.map(({ name: name$1, message: message$1 }) => import_picocolors$2.default.yellow(`${name$1} (${message$1})`)).join("\n- ");
6912
- note(`- ${message}`, "Preconditions not met");
6913
- const force = await confirm({
7856
+ Ge(`- ${message}`, "Preconditions not met", { format: (line) => line });
7857
+ const force = await Ve({
6914
7858
  message: "Preconditions failed. Do you wish to continue?",
6915
7859
  initialValue: false
6916
7860
  });
6917
- if (isCancel(force) || !force) {
6918
- cancel("Operation cancelled.");
7861
+ if (Ou(force) || !force) {
7862
+ Ne("Operation cancelled.");
6919
7863
  process$1.exit(1);
6920
7864
  }
6921
7865
  }
@@ -6937,23 +7881,23 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
6937
7881
  if (shouldAsk === false || values[questionId] !== undefined) continue;
6938
7882
  let answer;
6939
7883
  const message = questionPrefix + question.question;
6940
- if (question.type === "boolean") answer = await confirm({
7884
+ if (question.type === "boolean") answer = await Ve({
6941
7885
  message,
6942
7886
  initialValue: question.default
6943
7887
  });
6944
- if (question.type === "select") answer = await select({
7888
+ if (question.type === "select") answer = await qe({
6945
7889
  message,
6946
7890
  initialValue: question.default,
6947
7891
  options: question.options
6948
7892
  });
6949
- if (question.type === "multiselect") answer = await multiselect({
7893
+ if (question.type === "multiselect") answer = await ke({
6950
7894
  message,
6951
7895
  initialValues: question.default,
6952
7896
  required: false,
6953
7897
  options: question.options
6954
7898
  });
6955
7899
  if (question.type === "string" || question.type === "number") {
6956
- answer = await text({
7900
+ answer = await Ue({
6957
7901
  message,
6958
7902
  initialValue: question.default.toString(),
6959
7903
  placeholder: question.placeholder,
@@ -6961,8 +7905,8 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
6961
7905
  });
6962
7906
  if (question.type === "number") answer = Number(answer);
6963
7907
  }
6964
- if (isCancel(answer)) {
6965
- cancel("Operation cancelled.");
7908
+ if (Ou(answer)) {
7909
+ Ne("Operation cancelled.");
6966
7910
  process$1.exit(1);
6967
7911
  }
6968
7912
  values[questionId] = answer;
@@ -6979,7 +7923,7 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
6979
7923
  addons: addonMap,
6980
7924
  options: official
6981
7925
  });
6982
- log.success("Successfully setup add-ons");
7926
+ E.success("Successfully setup add-ons");
6983
7927
  let packageManager;
6984
7928
  if (options$6.install) {
6985
7929
  packageManager = options$6.install === true ? await packageManagerPrompt(options$6.cwd) : options$6.install;
@@ -6991,7 +7935,7 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
6991
7935
  }
6992
7936
  workspace = await createWorkspace(workspace);
6993
7937
  if (filesToFormat.length > 0 && packageManager && !!workspace.dependencyVersion("prettier")) {
6994
- const { start, stop } = spinner();
7938
+ const { start, stop } = J();
6995
7939
  start("Formatting modified files");
6996
7940
  try {
6997
7941
  await formatFiles({
@@ -7002,7 +7946,7 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
7002
7946
  stop("Successfully formatted modified files");
7003
7947
  } catch (e) {
7004
7948
  stop("Failed to format files");
7005
- if (e instanceof Error) log.error(e.message);
7949
+ if (e instanceof Error) E.error(e.message);
7006
7950
  }
7007
7951
  }
7008
7952
  const highlighter = getHighlighter();
@@ -7025,13 +7969,16 @@ else if (official[addonId][id] !== undefined) throw new Error(`Incompatible '--$
7025
7969
  /**
7026
7970
  * Dedupes and transforms aliases into their respective addon id
7027
7971
  */
7028
- function transformAliases(ids) {
7029
- const set = new Set();
7030
- for (const id of ids) if (aliases.includes(id)) {
7031
- const addon = officialAddons.find((a) => a.alias === id);
7032
- set.add(addon.id);
7033
- } else set.add(id);
7034
- return Array.from(set);
7972
+ function transformAliases(addons) {
7973
+ const set = new Map();
7974
+ for (const addon of addons) if (aliases.includes(addon.id)) {
7975
+ const officialAddon = officialAddons.find((a) => a.alias === addon.id);
7976
+ set.set(officialAddon.id, {
7977
+ id: officialAddon.id,
7978
+ options: addon.options
7979
+ });
7980
+ } else set.set(addon.id, addon);
7981
+ return Array.from(set.values());
7035
7982
  }
7036
7983
  function getAddonOptionFlags() {
7037
7984
  const options$6 = [];
@@ -7040,14 +7987,13 @@ function getAddonOptionFlags() {
7040
7987
  const details = getAddonDetails(id);
7041
7988
  if (Object.values(details.options).length === 0) continue;
7042
7989
  const { defaults, groups } = getOptionChoices(details);
7043
- const choices = Object.entries(groups).map(([group$1, choices$1]) => `${import_picocolors$2.default.dim(`${group$1}:`)} ${choices$1.join(", ")}`).join("\n");
7990
+ const choices = Object.entries(groups).map(([group, choices$1]) => `${import_picocolors$2.default.dim(`${group}:`)} ${choices$1.join(", ")}`).join("\n");
7044
7991
  const preset = defaults.join(", ") || "none";
7045
- const option = new Option(`--${id} [options...]`, `${id} add-on options ${import_picocolors$2.default.dim(`(preset: ${preset})`)}\n${choices}`).preset(preset).argParser((value, prev) => {
7046
- prev ??= [];
7047
- prev = prev.concat(value.split(/\s|,/));
7048
- return prev;
7992
+ options$6.push({
7993
+ id,
7994
+ choices,
7995
+ preset
7049
7996
  });
7050
- options$6.push(option);
7051
7997
  }
7052
7998
  return options$6;
7053
7999
  }
@@ -7060,26 +8006,33 @@ function getOptionChoices(details) {
7060
8006
  let values = [];
7061
8007
  const applyDefault = question.condition?.(options$6) !== false;
7062
8008
  if (question.type === "boolean") {
7063
- values = [id, `no-${id}`];
8009
+ values = ["yes", `no`];
7064
8010
  if (applyDefault) {
7065
8011
  options$6[id] = question.default;
7066
8012
  defaults.push(question.default ? values[0] : values[1]);
7067
8013
  }
7068
8014
  }
7069
8015
  if (question.type === "select") {
7070
- values = question.options.map((o) => o.value);
8016
+ values = question.options.map((o$1) => o$1.value);
7071
8017
  if (applyDefault) {
7072
8018
  options$6[id] = question.default;
7073
8019
  defaults.push(question.default);
7074
8020
  }
7075
8021
  }
7076
8022
  if (question.type === "multiselect") {
7077
- values = question.options.map((o) => o.value);
8023
+ values = question.options.map((o$1) => o$1.value);
7078
8024
  if (applyDefault) {
7079
8025
  options$6[id] = question.default;
7080
8026
  defaults.push(...question.default);
7081
8027
  }
7082
8028
  }
8029
+ if (question.type === "string" || question.type === "number") {
8030
+ values = ["<user-input>"];
8031
+ if (applyDefault) {
8032
+ options$6[id] = question.default;
8033
+ defaults.push(question.default.toString());
8034
+ }
8035
+ }
7083
8036
  choices.push(...values);
7084
8037
  const groupId = question.group ?? id;
7085
8038
  groups[groupId] ??= [];
@@ -7094,7 +8047,7 @@ function getOptionChoices(details) {
7094
8047
 
7095
8048
  //#endregion
7096
8049
  //#region packages/cli/commands/create.ts
7097
- var import_picocolors$1 = __toESM(require_picocolors$1(), 1);
8050
+ var import_picocolors$1 = __toESM$1(require_picocolors(), 1);
7098
8051
  const langs = ["ts", "jsdoc"];
7099
8052
  const langMap = {
7100
8053
  ts: "typescript",
@@ -7140,36 +8093,36 @@ const create$1 = new Command("create").description("scaffolds a new SvelteKit pr
7140
8093
  "",
7141
8094
  `Stuck? Visit us at ${import_picocolors$1.default.cyan("https://svelte.dev/chat")}`
7142
8095
  ];
7143
- box(steps.join("\n"), "Project next steps");
7144
- if (addOnNextSteps) box(addOnNextSteps, "Add-on next steps");
8096
+ Ge(steps.join("\n"), "Project next steps", { format: (line) => line });
8097
+ if (addOnNextSteps) Ge(addOnNextSteps, "Add-on next steps", { format: (line) => line });
7145
8098
  });
7146
8099
  });
7147
8100
  async function createProject(cwd, options$6) {
7148
- const { directory, template, language } = await group({
8101
+ const { directory, template, language } = await je({
7149
8102
  directory: () => {
7150
8103
  if (cwd) return Promise.resolve(path.resolve(cwd));
7151
8104
  const defaultPath = "./";
7152
- return text({
8105
+ return Ue({
7153
8106
  message: "Where would you like your project to be created?",
7154
8107
  placeholder: ` (hit Enter to use '${defaultPath}')`,
7155
8108
  defaultValue: defaultPath
7156
8109
  });
7157
8110
  },
7158
8111
  force: async ({ results: { directory: directory$1 } }) => {
7159
- if (fs.existsSync(directory$1) && fs.readdirSync(directory$1).filter((x) => !x.startsWith(".git")).length > 0) {
7160
- const force = await confirm({
8112
+ if (fs.existsSync(directory$1) && fs.readdirSync(directory$1).filter((x$1) => !x$1.startsWith(".git")).length > 0) {
8113
+ const force = await Ve({
7161
8114
  message: "Directory not empty. Continue?",
7162
8115
  initialValue: false
7163
8116
  });
7164
- if (isCancel(force) || !force) {
7165
- cancel("Exiting.");
8117
+ if (Ou(force) || !force) {
8118
+ Ne("Exiting.");
7166
8119
  process$1.exit(0);
7167
8120
  }
7168
8121
  }
7169
8122
  },
7170
8123
  template: () => {
7171
8124
  if (options$6.template) return Promise.resolve(options$6.template);
7172
- return select({
8125
+ return qe({
7173
8126
  message: "Which template would you like?",
7174
8127
  initialValue: "minimal",
7175
8128
  options: templates.map((t) => ({
@@ -7181,7 +8134,7 @@ async function createProject(cwd, options$6) {
7181
8134
  },
7182
8135
  language: () => {
7183
8136
  if (options$6.types) return Promise.resolve(options$6.types);
7184
- return select({
8137
+ return qe({
7185
8138
  message: "Add type checking with TypeScript?",
7186
8139
  initialValue: "typescript",
7187
8140
  options: [
@@ -7201,7 +8154,7 @@ async function createProject(cwd, options$6) {
7201
8154
  });
7202
8155
  }
7203
8156
  }, { onCancel: () => {
7204
- cancel("Operation cancelled.");
8157
+ Ne("Operation cancelled.");
7205
8158
  process$1.exit(0);
7206
8159
  } });
7207
8160
  const projectPath = path.resolve(directory);
@@ -7210,7 +8163,7 @@ async function createProject(cwd, options$6) {
7210
8163
  template,
7211
8164
  types: language
7212
8165
  });
7213
- log.success("Project created");
8166
+ E.success("Project created");
7214
8167
  let packageManager;
7215
8168
  let addOnNextSteps;
7216
8169
  const installDeps = async (install) => {
@@ -7223,7 +8176,8 @@ async function createProject(cwd, options$6) {
7223
8176
  cwd: projectPath,
7224
8177
  install: options$6.install,
7225
8178
  preconditions: false,
7226
- community: []
8179
+ community: [],
8180
+ addons: {}
7227
8181
  }, []);
7228
8182
  packageManager = pm;
7229
8183
  addOnNextSteps = nextSteps;
@@ -7261,7 +8215,7 @@ function runMigrate(cwd, args) {
7261
8215
 
7262
8216
  //#endregion
7263
8217
  //#region packages/cli/commands/check.ts
7264
- var import_picocolors = __toESM(require_picocolors$1(), 1);
8218
+ var import_picocolors = __toESM$1(require_picocolors(), 1);
7265
8219
  const check = new Command("check").description("a CLI for checking your Svelte code").allowUnknownOption(true).allowExcessArguments(true).option("-C, --cwd <path>", "path to working directory", process$1.cwd()).configureHelp({ formatHelp() {
7266
8220
  runCheck(process$1.cwd(), ["--help"]);
7267
8221
  return "";